/* Temel Stil ve Animasyonlar */
:root {
  --primary-color: #4a4a4a;
  --secondary-color: #6a6a6a;
  --accent-color: #3498db;
  --background-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  --gradient-start: #6c63ff;
  --gradient-end: #3b5fe2;
  --text-color: #ffffff;
  --light-text: #fff;
  --background: #f2f2f7;
  --card-bg: #ffffff;
  --shadow: 0 10px 30px rgba(108, 99, 255, 0.1);
  --transition: all 0.3s ease;
  --background-color: #f2f2f7;
  --card-background: rgba(255, 255, 255, 0.1);
  --secondary-text: #8e8e93;
  --primary-gradient-start: #4a6df0;
  --primary-gradient-end: #7b4397;
  --secondary-gradient-start: #2c3e50;
  --secondary-gradient-end: #3498db;
  --border-color: rgba(255, 255, 255, 0.2);
  --gradient-primary-start: #8e4585; /* Yumuşak Mor */
  --gradient-primary-end: #5a2d82; /* Koyu Mor */
  --gradient-secondary-start: #6a5acd; /* Slate Mavi */
  --gradient-secondary-end: #483d8b; /* Koyu Slate Mavi */
  --background-gradient-1: linear-gradient(
    45deg,
    var(--gradient-primary-start),
    var(--gradient-primary-end)
  );
  --background-gradient-2: linear-gradient(
    135deg,
    var(--gradient-secondary-start),
    var(--gradient-secondary-end)
  );
  --text-primary: #ffffff; /* Beyaz metin */
  --text-secondary: #e0e0e0; /* Açık gri metin */
  --text-placeholder: #a0a0a0; /* Koyu Gri */
  --background-overlay: rgba(255, 255, 255, 0.1);
  --background-main: #7e57c2; /* Ana Mor Arka Plan */
  --background-card: rgba(
    255,
    255,
    255,
    0.1
  ); /* Hafif şeffaf kart arka planı */
  --shadow-color: rgba(0, 0, 0, 0.1);
  --button-gradient-start: #5c6bc0; /* Koyu mavi */
  --button-gradient-end: #3f51b5; /* Daha koyu mavi */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: all 0.3s ease;
  font-family: "Inter", "Arial", sans-serif;
}

body {
  font-family: "Arial", sans-serif;
  background-color: var(--background-main);
  background-image: linear-gradient(
    to right bottom,
    var(--background-main),
    #6a1b9a
  );
  color: var(--text-primary);
  line-height: 1.6;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  perspective: 1000px;
  background-attachment: fixed;
  animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.container {
  width: 100%;
  max-width: 380px;
  background: var(--background-card);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  box-shadow: 0 15px 35px var(--shadow-color);
  padding: 2.5rem;
  animation: fadeIn 1s;
  transform: translateZ(50px);
  transition: all 0.5s ease;
  position: relative;
}

.container::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: var(--background-gradient-2);
  opacity: 0.1;
  transform: rotate(-45deg);
  z-index: -1;
}

.container:hover {
  transform: translateZ(80px) rotateX(5deg);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
}

/* Animasyonlu Dalgalar */
.waves-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40vh;
  z-index: 1;
  overflow: hidden;
}

.wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%236c63ff" fill-opacity="0.2" d="M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
  background-size: 1440px 100px;
  animation: wave-animation 20s linear infinite;
}

.wave1 {
  opacity: 0.3;
  animation-duration: 20s;
  bottom: 0;
}

.wave2 {
  opacity: 0.2;
  animation-duration: 15s;
  animation-direction: reverse;
  bottom: 10px;
}

@keyframes wave-animation {
  0% {
    background-position-x: 0;
  }
  100% {
    background-position-x: 1440px;
  }
}

/* Başlık ve Logo Animasyonları */
header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--accent-color);
  position: relative;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.app-icon {
  font-size: 2.5rem;
  color: var(--text-primary);
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  animation: iconFloat 3s ease-in-out infinite;
  margin-bottom: 1rem;
}

@keyframes iconFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

h1 {
  font-size: 1.8rem;
  font-weight: 600;
  background: linear-gradient(
    to right,
    var(--text-primary),
    var(--text-secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.download-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

#video-url {
  width: 100%;
  padding: 15px 15px 15px 45px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

#video-url::placeholder {
  color: var(--text-secondary);
}

#video-url:focus {
  border-color: var(--text-secondary);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.format-selector {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.format-option {
  flex: 1;
}

.format-option input[type="radio"] {
  display: none;
}

.format-option label {
  display: block;
  text-align: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-primary);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.format-option label::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: all 0.4s ease;
}

.format-option label:hover::before {
  left: 100%;
}

.format-option input[type="radio"]:checked + label {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.download-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(
    to right,
    var(--button-gradient-start),
    var(--button-gradient-end)
  );
  color: var(--text-primary);
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.download-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: all 0.4s ease;
}

.download-btn:hover::before {
  left: 100%;
}

.download-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.15);
}

.status-message {
  text-align: center;
  color: var(--text-secondary);
  margin-top: 1rem;
}

/* Sonuç Konteyner Animasyonları */
.result-container {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 2rem;
  width: 100%;
  max-width: 600px;
  box-shadow: var(--shadow);
  text-align: center;
  animation: fadeInUp 0.5s ease-out;
}

.hidden {
  display: none;
}

/* Yükleme Animasyonu */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(108, 99, 255, 0.1);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Başarı ve Hata Mesajları */
.success-message,
.error-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  animation: fadeIn 0.5s ease-out;
}

.success-message i,
.error-message i {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.success-message i {
  color: #4caf50;
}

.error-message i {
  color: #f44336;
}

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-color);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 1rem;
  transition: var(--transition);
}

.download-link:hover {
  background: #5a52d5;
  transform: translateY(-2px);
}

/* Alt Bilgi ve Özellikler */
footer {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 1rem;
}

footer i {
  margin-right: 5px;
  color: var(--primary-color);
}

/* Animasyon Keyframes */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Mobil Uyumluluk */
@media (max-width: 600px) {
  .container {
    width: 95%;
    max-width: 350px;
    margin: 0 auto;
    padding: 1.5rem;
    transform: translateX(-2%);
  }

  .format-selector {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Ekstra Animasyonlar */
@keyframes shine {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.apiyt-iframe-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 15px;
  transition: all 0.3s ease;
}

.apiyt-iframe-wrapper iframe {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.apiyt-iframe-wrapper iframe:hover {
  transform: scale(1.02);
}
