:root {
  --bg-main: #060911;
  --bg-card: rgba(13, 19, 33, 0.85);
  --bg-input: rgba(7, 11, 20, 0.95);
  --primary: #06b6d4;
  --primary-glow: rgba(6, 182, 212, 0.4);
  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.35);
  --emerald: #10b981;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --purple: #a855f7;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border: rgba(255, 255, 255, 0.09);
  --border-glow: rgba(6, 182, 212, 0.3);
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Animated Glow Orbs */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  animation: floatAmbient 12s ease-in-out infinite alternate;
}

.glow-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.25), transparent 70%);
  top: -100px;
  left: 10%;
}

.glow-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.2), transparent 70%);
  top: 150px;
  right: 5%;
  animation-duration: 16s;
}

.glow-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.15), transparent 70%);
  bottom: 50px;
  left: 30%;
  animation-duration: 14s;
}

@keyframes floatAmbient {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 40px) scale(1.1); }
  100% { transform: translate(-20px, 20px) scale(0.95); }
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* Header */
.site-header {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 9, 17, 0.75);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.5px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo:hover {
  transform: scale(1.03);
}

.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--primary-glow);
  animation: pulseLogo 4s infinite ease-in-out;
}

@keyframes pulseLogo {
  0%, 100% { box-shadow: 0 0 15px var(--primary-glow); }
  50% { box-shadow: 0 0 25px rgba(6, 182, 212, 0.7); }
}

.logo-accent {
  background: linear-gradient(135deg, var(--primary), #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Clean Segmented UZ | RU | EN Switcher */
.lang-switch-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 34px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 3px;
  border-radius: 10px;
  backdrop-filter: blur(10px);
  box-sizing: border-box;
}

.lang-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0 11px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.lang-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.lang-pill.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 0 12px var(--primary-glow);
  transform: scale(1.02);
}

/* Telegram Bot Button — Exact Match with Lang Switcher */
.btn-tg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-decoration: none;
  backdrop-filter: blur(10px);
  box-sizing: border-box;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-tg:hover {
  background: rgba(56, 189, 248, 0.24);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
  color: #fff;
}

/* Hero Section */
.hero-section {
  padding: 65px 0 35px;
  text-align: center;
}

.hero-title {
  font-size: 46px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -1.2px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffffff 40%, #a5f3fc 70%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textFloat 8s ease-in-out infinite alternate;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 36px;
  line-height: 1.65;
}

/* Platform Badges */
.platforms-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
  cursor: default;
}

.platform-pill:hover {
  border-color: var(--primary);
  background: rgba(6, 182, 212, 0.08);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.15);
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.pill-dot.instagram { background: #e1306c; box-shadow: 0 0 6px #e1306c; }
.pill-dot.tiktok { background: #00f2fe; box-shadow: 0 0 6px #00f2fe; }
.pill-dot.youtube { background: #ff0000; box-shadow: 0 0 6px #ff0000; }
.pill-dot.pinterest { background: #e60023; box-shadow: 0 0 6px #e60023; }
.pill-dot.twitter { background: #1da1f2; box-shadow: 0 0 6px #1da1f2; }
.pill-dot.audio { background: var(--emerald); box-shadow: 0 0 6px var(--emerald); }

/* Downloader Box with Glowing Border Sweep */
.downloader-card-wrapper {
  position: relative;
  border-radius: 20px;
  padding: 1.5px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.6), rgba(59, 130, 246, 0.3), rgba(255, 255, 255, 0.05), rgba(168, 85, 247, 0.4));
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.65), 0 0 30px rgba(6, 182, 212, 0.15);
  transition: all 0.3s ease;
}

.downloader-box {
  background: var(--bg-card);
  border-radius: 19px;
  padding: 24px;
  backdrop-filter: blur(24px);
}

.input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 6px 8px 6px 16px;
  transition: all 0.25s ease;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
}

.input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow), inset 0 2px 6px rgba(0, 0, 0, 0.5);
}

.input-icon-left {
  color: var(--text-dim);
  display: flex;
  align-items: center;
}

.url-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  padding: 12px 10px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 500;
  outline: none;
}

.url-input::placeholder {
  color: var(--text-dim);
}

.btn-paste {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-paste:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn-download {
  position: relative;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
  padding: 13px 26px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 20px var(--primary-glow);
}

.btn-download:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.7);
}

.btn-download:active {
  transform: translateY(0) scale(0.98);
}

/* Light Sweep Reflection Animation */
.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-20deg);
  animation: buttonShine 4s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes buttonShine {
  0%, 70% { left: -100%; }
  100% { left: 200%; }
}

/* Results / Formats Area */
.result-container {
  margin-top: 24px;
  display: none;
  animation: resultSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.media-card {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

.media-thumbnail {
  width: 90px;
  height: 90px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.media-info {
  flex: 1;
  min-width: 0;
}

.media-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.media-meta {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 600;
}

.formats-header {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-align: left;
}

.formats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.format-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.format-card:hover {
  border-color: var(--primary);
  background: rgba(6, 182, 212, 0.08);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.15);
}

.format-card.active {
  border-color: var(--primary);
  background: rgba(6, 182, 212, 0.16);
  box-shadow: 0 0 20px var(--primary-glow);
  transform: translateY(-2px);
}

.format-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(6, 182, 212, 0.2);
  color: #a5f3fc;
  border: 1px solid var(--border-glow);
}

.format-label {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.format-ext {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 700;
}

.btn-get-file {
  position: relative;
  width: 100%;
  margin-top: 20px;
  padding: 16px;
  background: linear-gradient(135deg, var(--emerald), #059669);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-get-file:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.55);
}

/* Features Grid */
.features-section {
  padding: 60px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.feature-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  backdrop-filter: blur(15px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature-box:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  transition: transform 0.3s ease;
}

.feature-box:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
}

.glow-cyan {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid var(--border-glow);
  color: var(--primary);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

.glow-rose {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--rose);
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.2);
}

.glow-purple {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: var(--purple);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
}

.feature-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 8px;
  color: #fff;
}

.feature-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
}

/* =========================================================================
   MOBILE & RESPONSIVE PERFECTION (< 768px and < 480px)
   ========================================================================= */

@media (max-width: 768px) {
  .hero-title {
    font-size: clamp(26px, 6.5vw, 36px);
    letter-spacing: -0.8px;
  }

  .hero-subtitle {
    font-size: 14.5px;
    margin-bottom: 26px;
    padding: 0 8px;
  }

  .platforms-row {
    gap: 6px;
  }

  .platform-pill {
    padding: 5px 10px;
    font-size: 12px;
  }

  .formats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

@media (max-width: 520px) {
  .site-header {
    padding: 12px 0;
  }

  .header-inner {
    gap: 8px;
  }

  .logo {
    font-size: 17px;
    gap: 8px;
  }

  .logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .header-actions {
    gap: 6px;
  }

  .lang-switch-group {
    height: 30px;
    padding: 2px;
    gap: 2px;
    border-radius: 8px;
  }

  .lang-pill {
    height: 24px;
    padding: 0 7px;
    font-size: 11px;
    border-radius: 6px;
  }

  .btn-tg {
    height: 30px;
    padding: 0 10px;
    font-size: 11px;
    border-radius: 8px;
    gap: 5px;
  }

  .hero-section {
    padding: 35px 0 20px;
  }

  .hero-title {
    font-size: 26px;
    line-height: 1.2;
    margin-bottom: 12px;
  }

  .hero-subtitle {
    font-size: 13.5px;
    line-height: 1.55;
    margin-bottom: 22px;
  }

  .downloader-card-wrapper {
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  }

  .downloader-box {
    padding: 16px;
    border-radius: 15px;
  }

  .input-wrapper {
    flex-direction: column;
    padding: 10px;
    gap: 10px;
    border-radius: 12px;
  }

  .input-icon-left {
    display: none;
  }

  .url-input {
    width: 100%;
    padding: 8px 4px;
    font-size: 14px;
  }

  .btn-paste {
    width: 100%;
    justify-content: center;
    padding: 10px;
    font-size: 13px;
    border-radius: 8px;
  }

  .btn-download {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 15px;
    border-radius: 10px;
  }

  .media-card {
    flex-direction: column;
    text-align: center;
    padding: 14px;
    gap: 10px;
  }

  .media-thumbnail {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }

  .formats-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .format-card {
    flex-direction: row;
    justify-content: space-between;
    padding: 12px 14px;
  }

  .features-section {
    padding: 40px 0 20px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .feature-box {
    padding: 20px 16px;
  }

  .site-footer {
    padding: 18px 0;
    font-size: 12px;
  }
}