/* ==========================================================================
   docs.css — MoonDrowend Premium SaaS Theme
   redesign: clean white / soft-blue glassmorphism, Linear–Stripe–Framer inspired
   creator: moonDrowend
   ========================================================================== */

:root {
  /* ---- Core brand palette: royal blue + pastel blue + a touch of cyan ---- */
  --blue-700: #1D4ED8;
  --blue-600: #2563EB;
  --blue-500: #3B82F6;
  --blue-400: #60A5FA;
  --blue-300: #93C5FD;
  --blue-pastel: #DCE9FF;
  --cyan-accent: #22D3EE;
  --mint-accent: #10B981;
  --amber-accent: #F59E0B;
  --red-accent: #EF4444;

  --bg-0: #F5F8FD;
  --bg-1: #FFFFFF;
  --bg-2: #EAF1FC;

  --surface: rgba(255, 255, 255, 0.6);
  --surface-solid: rgba(255, 255, 255, 0.88);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --surface-frost: rgba(255, 255, 255, 0.42);

  --border-soft: rgba(37, 99, 235, 0.1);
  --border-strong: rgba(37, 99, 235, 0.2);
  --border-hair: rgba(255, 255, 255, 0.7);

  --text-primary: #0F1729;
  --text-secondary: rgba(23, 33, 56, 0.6);
  --text-tertiary: rgba(23, 33, 56, 0.4);

  --shadow-ambient: 0 2px 8px rgba(30, 64, 150, 0.05), 0 12px 30px rgba(30, 64, 150, 0.07);
  --shadow-card: 0 4px 12px rgba(30, 64, 150, 0.05), 0 30px 70px -22px rgba(37, 99, 235, 0.16);
  --shadow-float: 0 30px 90px -30px rgba(37, 99, 235, 0.28);
  --shadow-pressed: inset 0 2px 8px rgba(15, 40, 100, 0.1);
  --glow-brand: 0 0 0 1px rgba(59, 130, 246, 0.14), 0 0 40px -8px rgba(34, 211, 238, 0.45);

  --radius-xxl: 34px;
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 15px;
  --radius-sm: 11px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', var(--font-sans);
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg-0: #070B14;
  --bg-1: #0B1120;
  --bg-2: #0E1626;

  --surface: rgba(18, 26, 46, 0.6);
  --surface-solid: rgba(15, 22, 40, 0.88);
  --surface-strong: rgba(19, 27, 48, 0.94);
  --surface-frost: rgba(24, 34, 58, 0.4);

  --border-soft: rgba(96, 165, 250, 0.14);
  --border-strong: rgba(96, 165, 250, 0.28);
  --border-hair: rgba(255, 255, 255, 0.07);

  --text-primary: #EEF3FC;
  --text-secondary: rgba(214, 226, 248, 0.62);
  --text-tertiary: rgba(214, 226, 248, 0.4);

  --shadow-ambient: 0 2px 8px rgba(0,0,0,0.35), 0 12px 30px rgba(0,0,0,0.4);
  --shadow-card: 0 4px 16px rgba(0,0,0,0.4), 0 30px 80px -20px rgba(0,0,0,0.6);
  --shadow-float: 0 30px 90px -30px rgba(59, 130, 246, 0.45);
  --shadow-pressed: inset 0 2px 10px rgba(0,0,0,0.5);
  --glow-brand: 0 0 0 1px rgba(96, 165, 250, 0.22), 0 0 50px -6px rgba(34, 211, 238, 0.55);

  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--bg-0);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.5s ease, color 0.5s ease;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

::selection { background: rgba(59, 130, 246, 0.22); color: var(--text-primary); }

/* ---------------------------------- BG MESH + PARTICLES ---------------------------------- */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 900px 600px at 15% -10%, rgba(59, 130, 246, 0.12), transparent 60%),
    radial-gradient(ellipse 800px 700px at 110% 20%, rgba(34, 211, 238, 0.09), transparent 55%),
    radial-gradient(ellipse 700px 600px at 50% 120%, rgba(37, 99, 235, 0.08), transparent 55%),
    var(--bg-0);
}
:root[data-theme="dark"] .bg-mesh {
  background:
    radial-gradient(ellipse 900px 600px at 15% -10%, rgba(59, 130, 246, 0.2), transparent 60%),
    radial-gradient(ellipse 800px 700px at 110% 20%, rgba(34, 211, 238, 0.14), transparent 55%),
    radial-gradient(ellipse 700px 600px at 50% 120%, rgba(37, 99, 235, 0.16), transparent 55%),
    var(--bg-0);
}
/* faint noise texture — very subtle grain over the mesh, per brief */
.bg-mesh::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.mesh-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  will-change: transform;
  animation: float 20s ease-in-out infinite;
}
:root[data-theme="dark"] .mesh-blob { opacity: 0.3; }
.blob-a {
  width: 520px; height: 520px;
  background: radial-gradient(circle, var(--blue-400), transparent 70%);
  top: -180px; left: -140px;
}
.blob-b {
  width: 460px; height: 460px;
  background: radial-gradient(circle, var(--cyan-accent), transparent 70%);
  top: 220px; right: -160px;
  animation-delay: -7s;
}
.blob-c {
  width: 420px; height: 420px;
  background: radial-gradient(circle, var(--blue-600), transparent 70%);
  bottom: -180px; left: 30%;
  animation-delay: -13s;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(36px, -36px) scale(1.08); }
  66% { transform: translate(-26px, 24px) scale(0.94); }
}

.particle-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.particle {
  position: absolute;
  bottom: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.85), rgba(59, 130, 246, 0));
  box-shadow: 0 0 10px 2px rgba(59, 130, 246, 0.35);
  animation: drift linear infinite;
  will-change: transform, opacity;
}
@keyframes drift {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  8% { opacity: 0.6; }
  92% { opacity: 0.4; }
  100% { transform: translateY(-115vh) translateX(var(--drift-x, 40px)); opacity: 0; }
}

/* ---------------------------------- SHELL ---------------------------------- */
.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* ---------------------------------- TOPBAR ---------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 14px 16px 0;
}
.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 100px;
  background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid var(--border-hair);
  box-shadow: var(--shadow-ambient), inset 0 1px 0 rgba(255,255,255,0.5);
  transition: box-shadow 0.3s ease, background 0.4s ease;
}
:root[data-theme="dark"] .topbar-inner { box-shadow: var(--shadow-ambient), inset 0 1px 0 rgba(255,255,255,0.04); }

.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 12px;
  background: linear-gradient(150deg, var(--blue-400), var(--blue-600) 60%, var(--cyan-accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: white;
  box-shadow: 0 6px 16px -4px rgba(37, 99, 235, 0.5), inset 0 1px 0 rgba(255,255,255,0.4);
  animation: brand-glow 4s ease-in-out infinite;
}
@keyframes brand-glow {
  0%, 100% { box-shadow: 0 6px 16px -4px rgba(37, 99, 235, 0.45), inset 0 1px 0 rgba(255,255,255,0.4); }
  50% { box-shadow: 0 8px 24px -4px rgba(34, 211, 238, 0.6), inset 0 1px 0 rgba(255,255,255,0.5); }
}
.brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16.5px;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--text-primary), var(--blue-600));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; }
.pill-link {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  transition: all 0.25s var(--ease-smooth);
}
.pill-link:hover {
  color: var(--blue-600);
  border-color: var(--border-strong);
  background: color-mix(in srgb, var(--blue-400) 10%, var(--surface));
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -6px rgba(37, 99, 235, 0.3);
}

.theme-toggle {
  width: 52px; height: 30px;
  border-radius: 100px;
  border: 1px solid var(--border-soft);
  background: var(--surface);
  position: relative;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.toggle-knob {
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff, #e7f0ff);
  box-shadow: 0 2px 6px rgba(30, 64, 150, 0.28);
  transition: transform 0.35s var(--ease-spring);
}
:root[data-theme="dark"] .toggle-knob {
  transform: translateX(21px);
  background: linear-gradient(145deg, var(--blue-400), var(--blue-600));
}

/* mobile nav toggle (decorative — no menu items beyond existing actions on this page) */
.nav-burger { display: none; }

/* ---------------------------------- HERO ---------------------------------- */
.hero {
  padding: 76px 0 44px;
  text-align: center;
  position: relative;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700;
  color: var(--blue-600);
  background: color-mix(in srgb, var(--blue-400) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--blue-400) 26%, transparent);
  padding: 7px 16px;
  border-radius: 100px;
  margin-bottom: 26px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 14px -6px rgba(37, 99, 235, 0.25);
  animation: badge-in 0.7s var(--ease-smooth) both;
}
.dot-live {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--mint-accent);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
@keyframes badge-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 6.4vw, 58px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.06;
  margin: 0 0 18px;
  background: linear-gradient(160deg, var(--text-primary) 20%, var(--blue-600) 65%, var(--cyan-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: title-in 0.8s var(--ease-smooth) 0.05s both;
}
.hero-sub {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.65;
  animation: title-in 0.8s var(--ease-smooth) 0.15s both;
}
@keyframes title-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------- GLASS CARD BASE ---------------------------------- */
.glass-card {
  background: var(--surface);
  backdrop-filter: blur(28px) saturate(1.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  border: 1px solid var(--border-hair);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255,255,255,0.5);
  position: relative;
  overflow: hidden;
}
:root[data-theme="dark"] .glass-card { box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255,255,255,0.05); }
.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(59,130,246,0.45), rgba(34,211,238,0.14) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.55;
}

/* ---------------------------------- DOWNLOADER CARD ---------------------------------- */
.downloader-card {
  padding: 30px;
  text-align: left;
  max-width: 660px;
  margin: 0 auto;
  animation: card-rise 0.9s var(--ease-smooth) 0.2s both;
}
@keyframes card-rise {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.downloader-card.is-glowing {
  box-shadow: var(--shadow-card), var(--glow-brand), inset 0 1px 0 rgba(255,255,255,0.5);
}

.input-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.input-wrap {
  flex: 1 1 280px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 54px;
  max-height: 54px;
  background: var(--surface-solid);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 0 6px 0 16px;
  box-shadow: inset 0 1px 3px rgba(15,40,100,0.05);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
  position: relative;
}
/* signature detail: thin two-tone blue -> cyan sweep, visible only while focused */
.input-wrap::after {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--angle, 0deg), transparent 0%, var(--blue-400) 12%, var(--cyan-accent) 22%, transparent 34%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: spin-border 3.5s linear infinite;
  animation-play-state: paused;
  pointer-events: none;
}
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes spin-border { to { --angle: 360deg; } }
.input-wrap:focus-within {
  border-color: color-mix(in srgb, var(--blue-400) 55%, transparent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--blue-400) 12%, transparent), 0 0 24px -8px rgba(34, 211, 238, 0.45);
}
.input-wrap:focus-within::after { opacity: 1; animation-play-state: running; }
.input-icon { color: var(--text-tertiary); flex-shrink: 0; }
.url-input {
  flex: 1;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--text-primary);
  padding: 0;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.url-input::placeholder { color: var(--text-tertiary); }
.input-hint {
  margin: 12px 2px 0;
  font-size: 12.5px;
  color: var(--text-tertiary);
  transition: color 0.3s ease;
}

/* ---------------------------------- 3D BUTTON ---------------------------------- */
.btn-3d {
  position: relative;
  border: none;
  background: none;
  padding: 0;
  height: 54px;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  border-radius: var(--radius-md);
  isolation: isolate;
}
.btn-3d-face {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  padding: 0 27px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  transform: translateY(0);
  overflow: hidden;
  transition: transform 0.18s var(--ease-spring), box-shadow 0.18s ease, filter 0.18s ease;
}
.btn-primary .btn-3d-face {
  background: linear-gradient(155deg, var(--blue-400) 0%, var(--blue-500) 45%, var(--blue-600) 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.4) inset,
    0 -3px 0 rgba(20, 55, 130, 0.35) inset,
    0 12px 24px -6px rgba(59, 130, 246, 0.55),
    0 3px 8px rgba(37, 99, 235, 0.38);
}
.btn-primary:hover .btn-3d-face {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.5) inset,
    0 -3px 0 rgba(20, 55, 130, 0.35) inset,
    0 18px 32px -6px rgba(34, 211, 238, 0.55),
    0 4px 10px rgba(37, 99, 235, 0.42);
}
.btn-primary:active .btn-3d-face {
  transform: translateY(1px) scale(0.98);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.3) inset,
    0 -1px 0 rgba(20, 55, 130, 0.35) inset,
    0 4px 12px -4px rgba(59, 130, 246, 0.5);
  filter: brightness(0.98);
}
.btn-3d:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-3d:disabled .btn-3d-face { transform: none !important; }

/* ripple */
.btn-3d-face .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transform: scale(0);
  animation: ripple-anim 0.6s ease-out;
  pointer-events: none;
}
@keyframes ripple-anim {
  to { transform: scale(3.2); opacity: 0; }
}

/* paste button — same 3d mechanics as primary, lighter/secondary surface */
.btn-paste .btn-3d-face {
  padding: 0 20px;
  color: var(--blue-600);
  background: linear-gradient(155deg, color-mix(in srgb, var(--blue-400) 18%, var(--surface-solid)) 0%, color-mix(in srgb, var(--blue-400) 10%, var(--surface-solid)) 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.5) inset,
    0 -3px 0 color-mix(in srgb, var(--blue-400) 28%, transparent) inset,
    0 8px 16px -6px color-mix(in srgb, var(--blue-400) 26%, transparent),
    0 2px 5px color-mix(in srgb, var(--blue-400) 16%, transparent);
}
.btn-paste:hover .btn-3d-face {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.55) inset,
    0 -3px 0 color-mix(in srgb, var(--blue-400) 28%, transparent) inset,
    0 12px 22px -6px color-mix(in srgb, var(--blue-400) 32%, transparent),
    0 3px 7px color-mix(in srgb, var(--blue-400) 20%, transparent);
}
.btn-paste:active .btn-3d-face {
  transform: translateY(1px) scale(0.98);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.4) inset,
    0 -1px 0 color-mix(in srgb, var(--blue-400) 28%, transparent) inset,
    0 4px 10px -4px color-mix(in srgb, var(--blue-400) 22%, transparent);
  filter: brightness(0.98);
}

/* small 3d variant used on platform chips */
.chip-3d {
  border: none;
  cursor: pointer;
  border-radius: var(--radius-lg);
  padding: 0;
  background: var(--surface-solid);
  backdrop-filter: blur(16px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 -2px 0 rgba(20,55,130,0.05) inset,
    0 10px 24px -8px rgba(30, 64, 150, 0.14),
    0 2px 6px rgba(30, 64, 150, 0.07);
  transition: transform 0.2s var(--ease-spring), box-shadow 0.25s ease, border-color 0.25s ease;
  border: 1px solid transparent;
}
:root[data-theme="dark"] .chip-3d {
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 -2px 0 rgba(0,0,0,0.3) inset,
    0 10px 26px -8px rgba(0,0,0,0.55),
    0 2px 6px rgba(0,0,0,0.3);
}
.chip-3d:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--blue-400) 32%, transparent);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 -2px 0 rgba(20,55,130,0.05) inset,
    0 20px 34px -10px rgba(37, 99, 235, 0.28),
    0 4px 10px rgba(37, 99, 235, 0.12);
}
.chip-3d:active {
  transform: translateY(1px) scale(0.97);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.3) inset,
    0 -1px 0 rgba(0,0,0,0.06) inset,
    0 3px 8px -4px rgba(20,30,55,0.15);
}

/* ---------------------------------- STATUS / SPINNER ---------------------------------- */
.status-box {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--blue-400) 7%, var(--surface-solid));
  border: 1px solid color-mix(in srgb, var(--blue-400) 18%, transparent);
  font-size: 14px;
  color: var(--text-secondary);
  animation: status-in 0.3s var(--ease-smooth) both;
}
@keyframes status-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.status-box[hidden] { display: none; }
.spinner {
  width: 17px; height: 17px;
  border-radius: 50%;
  border: 2.5px solid color-mix(in srgb, var(--blue-400) 25%, transparent);
  border-top-color: var(--blue-500);
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* skeleton loader (shown briefly while status box mounts) */
.skeleton-line {
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--blue-400) 10%, transparent) 25%, color-mix(in srgb, var(--blue-400) 20%, transparent) 50%, color-mix(in srgb, var(--blue-400) 10%, transparent) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------------------------------- RESULT BOX ---------------------------------- */
.result-box { margin-top: 20px; }
.result-error {
  padding: 15px 17px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--red-accent) 9%, var(--surface-solid));
  border: 1px solid color-mix(in srgb, var(--red-accent) 24%, transparent);
  color: color-mix(in srgb, var(--red-accent) 85%, var(--text-primary));
  font-size: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: shake-in 0.4s var(--ease-smooth) both;
}
@keyframes shake-in {
  0% { opacity: 0; transform: translateX(-6px); }
  40% { transform: translateX(4px); }
  70% { transform: translateX(-2px); }
  100% { opacity: 1; transform: translateX(0); }
}
.result-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-solid);
  backdrop-filter: blur(20px);
  animation: result-pop 0.45s var(--ease-spring) both;
  box-shadow: var(--shadow-ambient);
}
@keyframes result-pop {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.result-media {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  background: #000;
  display: block;
}
.result-body { padding: 18px; }
.result-title {
  font-size: 14.5px;
  font-weight: 600;
  margin: 0 0 12px;
  line-height: 1.4;
  color: var(--text-primary);
  word-break: break-word;
}
.result-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.result-link-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--mint-accent) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--mint-accent) 26%, transparent);
  color: color-mix(in srgb, var(--mint-accent) 70%, var(--text-primary));
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: transform 0.18s var(--ease-spring), background 0.2s ease, box-shadow 0.2s ease;
}
.result-link-btn:hover {
  background: color-mix(in srgb, var(--mint-accent) 15%, transparent);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -8px rgba(16, 185, 129, 0.38);
}
.result-link-btn:active { transform: translateY(0) scale(0.98); }

/* ---------------------------------- SECTION HEAD ---------------------------------- */
.section-head { text-align: center; margin-bottom: 30px; }
.section-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: 10px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.section-head p {
  font-size: 14.5px;
  color: var(--text-secondary);
  margin: 0;
  max-width: 480px;
  margin-inline: auto;
}

.platform-section { padding: 68px 0 24px; position: relative; }

/* ---------------------------------- PLATFORM GRID ---------------------------------- */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 13px;
}
.platform-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 18px 8px 15px;
  text-align: center;
  animation: chip-in 0.5s var(--ease-smooth) both;
}
@keyframes chip-in {
  from { opacity: 0; transform: translateY(10px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.platform-icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  color: white;
  box-shadow: 0 6px 14px -6px rgba(10,20,45,0.28), inset 0 1px 0 rgba(255,255,255,0.3);
}
.platform-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* ---------------------------------- FEATURES SECTION ---------------------------------- */
.features-section { padding: 58px 0 24px; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.feature-card {
  padding: 26px 22px;
  text-align: left;
  transition: transform 0.3s var(--ease-smooth), box-shadow 0.3s ease;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-float), inset 0 1px 0 rgba(255,255,255,0.5);
}
.feature-icon-wrap {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  background: linear-gradient(150deg, var(--blue-400), var(--blue-600));
  color: white;
  box-shadow: 0 8px 18px -6px rgba(37, 99, 235, 0.4);
  animation: icon-float 4.5s ease-in-out infinite;
}
.feature-card:nth-child(2) .feature-icon-wrap { animation-delay: -1.2s; background: linear-gradient(150deg, var(--blue-500), var(--cyan-accent)); box-shadow: 0 8px 18px -6px rgba(34, 211, 238, 0.38); }
.feature-card:nth-child(3) .feature-icon-wrap { animation-delay: -2.4s; background: linear-gradient(150deg, var(--cyan-accent), var(--blue-400)); box-shadow: 0 8px 18px -6px rgba(34, 211, 238, 0.38); }
.feature-card:nth-child(4) .feature-icon-wrap { animation-delay: -3.6s; background: linear-gradient(150deg, var(--blue-600), var(--blue-400)); box-shadow: 0 8px 18px -6px rgba(37, 99, 235, 0.4); }
@keyframes icon-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(-4deg); }
}
.feature-title { font-family: var(--font-display); font-size: 15.5px; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.01em; }
.feature-desc { font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; margin: 0; }

/* ---------------------------------- STATS SECTION ---------------------------------- */
.stats-section { padding: 58px 0 24px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}
.stat-card {
  padding: 24px 20px;
  text-align: center;
  position: relative;
}
.stat-icon {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  color: white;
  background: linear-gradient(150deg, var(--blue-400), var(--blue-600));
  box-shadow: 0 6px 14px -5px rgba(37,99,235,0.4);
}
.stat-card:nth-child(2) .stat-icon { background: linear-gradient(150deg, var(--blue-500), var(--blue-700)); box-shadow: 0 6px 14px -5px rgba(29,78,216,0.4); }
.stat-card:nth-child(3) .stat-icon { background: linear-gradient(150deg, var(--mint-accent), var(--cyan-accent)); box-shadow: 0 6px 14px -5px rgba(16,185,129,0.4); }
.stat-card:nth-child(4) .stat-icon { background: linear-gradient(150deg, var(--cyan-accent), var(--blue-500)); box-shadow: 0 6px 14px -5px rgba(34,211,238,0.4); }
.stat-card:nth-child(5) .stat-icon { background: linear-gradient(150deg, var(--blue-400), var(--cyan-accent)); box-shadow: 0 6px 14px -5px rgba(96,165,250,0.4); }
.stat-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(150deg, var(--text-primary), var(--blue-600));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 12.5px; color: var(--text-tertiary); font-weight: 600; }

/* ---------------------------------- RECENT DOWNLOADS SECTION ---------------------------------- */
.recent-section { padding: 58px 0 24px; }
.recent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.recent-card {
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 13px;
  transition: transform 0.25s var(--ease-smooth), box-shadow 0.25s ease;
}
.recent-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-float); }
.recent-thumb {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 15px;
  position: relative;
  overflow: hidden;
}
.recent-thumb .plat-badge {
  position: absolute;
  bottom: -3px; right: -3px;
  width: 18px; height: 18px;
  border-radius: 6px;
  background: var(--surface-strong);
  border: 2px solid var(--surface-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 8px;
  font-weight: 800;
  color: var(--text-secondary);
}
.recent-info { flex: 1; min-width: 0; }
.recent-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recent-meta { font-size: 11.5px; color: var(--text-tertiary); margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.recent-status {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  color: color-mix(in srgb, var(--mint-accent) 75%, var(--text-primary));
  background: color-mix(in srgb, var(--mint-accent) 13%, transparent);
}
.recent-status .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--mint-accent); }
.recent-action {
  width: 36px; height: 36px;
  border-radius: 11px;
  border: 1px solid var(--border-soft);
  background: var(--surface-solid);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue-600);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s var(--ease-spring), background 0.2s ease, box-shadow 0.2s ease;
}
.recent-action:hover {
  background: color-mix(in srgb, var(--blue-400) 13%, var(--surface-solid));
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -6px rgba(37,99,235,0.3);
}
.recent-empty {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-tertiary);
  font-size: 13.5px;
  grid-column: 1 / -1;
}

/* ---------------------------------- OWNER CARD ---------------------------------- */
.owner-section { padding: 50px 0 10px; }
.owner-card {
  padding: 32px;
  max-width: 580px;
  margin: 0 auto;
  overflow: hidden;
}
.owner-glow {
  position: absolute;
  top: -60px; right: -60px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, var(--blue-400), transparent 70%);
  opacity: 0.28;
  filter: blur(46px);
  pointer-events: none;
}
.owner-top {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-bottom: 26px;
  position: relative;
  z-index: 1;
}
.owner-avatar {
  position: relative;
  width: 64px; height: 64px;
  border-radius: 19px;
  background: linear-gradient(150deg, var(--blue-400), var(--blue-600));
  display: flex; align-items: center; justify-content: center;
  font-size: 25px; font-weight: 800; color: white;
  box-shadow: 0 10px 22px -6px rgba(37, 99, 235, 0.45), inset 0 1px 0 rgba(255,255,255,0.3);
  flex-shrink: 0;
}
.owner-status {
  position: absolute;
  bottom: -3px; right: -3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--mint-accent);
  border: 3px solid var(--surface-solid);
}
.owner-name { font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.owner-role { font-size: 13px; color: var(--text-secondary); margin-top: 3px; }

.owner-links {
  display: flex;
  flex-direction: column;
  gap: 11px;
  position: relative;
  z-index: 1;
}
.owner-link-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 15px;
  border-radius: var(--radius-md);
  background: var(--surface-solid);
  border: 1px solid var(--border-soft);
  text-decoration: none;
  transition: transform 0.2s var(--ease-smooth), border-color 0.2s ease, box-shadow 0.2s ease;
}
.owner-link-row:hover {
  transform: translateX(4px) translateY(-1px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-ambient);
}
.owner-link-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: white;
}
.icon-wa { background: linear-gradient(150deg, #4CDB94, #1FA855); }
.icon-group { background: linear-gradient(150deg, var(--blue-300), var(--blue-500)); }
.icon-channel { background: linear-gradient(150deg, var(--cyan-accent), var(--blue-600)); }

.owner-link-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.owner-link-label { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.owner-link-value { font-size: 12.5px; color: var(--text-tertiary); margin-top: 1px; }
.owner-link-chevron { color: var(--text-tertiary); flex-shrink: 0; transition: transform 0.2s ease; }
.owner-link-row:hover .owner-link-chevron { transform: translateX(3px); }

.owner-footer {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  text-align: center;
  font-size: 12.5px;
  color: var(--text-tertiary);
  position: relative;
  z-index: 1;
}

/* ---------------------------------- FOOTER ---------------------------------- */
.site-footer {
  margin-top: 20px;
  padding: 40px 28px 32px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--border-hair);
  box-shadow: var(--shadow-ambient), inset 0 1px 0 rgba(255,255,255,0.5);
  text-align: center;
}
.footer-brand {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 14px;
}
.footer-brand .brand-mark { width: 30px; height: 30px; font-size: 14px; }
.footer-brand-text { font-family: var(--font-display); font-weight: 800; font-size: 15.5px; letter-spacing: -0.01em; }
.footer-tagline { font-size: 13px; color: var(--text-secondary); max-width: 380px; margin: 0 auto 22px; line-height: 1.6; }
.footer-social {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.footer-social a {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-solid);
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
  text-decoration: none;
  transition: transform 0.2s var(--ease-spring), color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.footer-social a:hover {
  transform: translateY(-3px);
  color: var(--blue-600);
  border-color: var(--border-strong);
  box-shadow: 0 8px 18px -8px rgba(37,99,235,0.3);
}
.footer-meta {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  font-size: 12px;
  color: var(--text-tertiary);
}
.footer-meta .dot-sep { opacity: 0.5; }
.version-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  background: color-mix(in srgb, var(--blue-400) 11%, transparent);
  color: var(--blue-600);
  border: 1px solid color-mix(in srgb, var(--blue-400) 24%, transparent);
}

/* ---------------------------------- TOAST ---------------------------------- */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface-strong);
  backdrop-filter: blur(22px);
  border: 1px solid var(--border-hair);
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 600;
  padding: 13px 22px;
  border-radius: 100px;
  box-shadow: var(--shadow-card);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s var(--ease-spring), opacity 0.3s ease;
  z-index: 100;
  max-width: 90vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ---------------------------------- RESPONSIVE ---------------------------------- */
@media (max-width: 760px) {
  .features-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}

@media (max-width: 560px) {
  .topbar { padding: 10px 12px 0; }
  .topbar-inner { padding: 10px 14px; border-radius: 24px; }
  .pill-link span.pill-label { display: none; }
  .hero { padding: 44px 0 32px; }
  .downloader-card { padding: 20px; }
  .input-row { flex-direction: column; align-items: stretch; }
  .input-wrap { flex: 0 0 auto; width: 100%; }
  .btn-3d { width: 100%; }
  .btn-3d-face { width: 100%; }
  .owner-card { padding: 22px; }
  .platform-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .recent-grid { grid-template-columns: 1fr; }
  .site-footer { padding: 32px 20px 26px; }
}
