/* ==========================================================================
   GravityGrab — Dark Cyberpunk & Cosmic Glassmorphism Stylesheet
   ========================================================================== */

:root {
  --bg-void: #040612;
  --bg-deep: #070b1f;
  --bg-nebula: #130b2e;
  --glass-bg: rgba(14, 20, 46, 0.62);
  --glass-bg-strong: rgba(12, 17, 40, 0.82);
  --glass-border: rgba(148, 163, 255, 0.16);
  --glass-highlight: rgba(255, 255, 255, 0.08);

  --text-primary: #f8fafc;
  --text-secondary: #a5b4d4;
  --text-muted: #6e7fa6;

  --cyan: #06b6d4;
  --cyan-bright: #22d3ee;
  --indigo: #6366f1;
  --purple: #9333ea;
  --magenta: #ec4899;
  --magenta-bright: #f43f97;
  --emerald: #10b981;

  --grad-cosmic: linear-gradient(135deg, #22d3ee 0%, #6366f1 45%, #ec4899 100%);
  --grad-button: linear-gradient(135deg, #4f46e5 0%, #a855f7 50%, #ec4899 100%);
  --glow-intensity: 1;

  --font-display: 'Orbitron', 'Space Grotesk', system-ui, sans-serif;
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --transition-smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Neon Overdrive Mode (toggled via Dark Mode aesthetic pill) */
body.neon-overdrive {
  --glow-intensity: 1.45;
  --glass-border: rgba(34, 211, 238, 0.28);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  min-height: 100vh;
  background-color: var(--bg-void);
  background-image:
    radial-gradient(circle at 18% 12%, rgba(79, 70, 229, 0.22) 0%, transparent 45%),
    radial-gradient(circle at 84% 20%, rgba(236, 72, 153, 0.18) 0%, transparent 42%),
    radial-gradient(circle at 50% 85%, rgba(6, 182, 212, 0.14) 0%, transparent 50%);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85em;
  color: var(--cyan-bright);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.22);
  padding: 2px 6px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 18px;
}

/* ==========================================================================
   Cosmic Background, Nebulae, Grid & Anti-Gravity Particles
   ========================================================================== */
.cosmic-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: calc(0.45 * var(--glow-intensity));
  animation: driftNebula 20s ease-in-out infinite alternate;
}

.nebula-1 {
  width: 460px;
  height: 460px;
  top: -120px;
  left: -100px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.55), transparent 70%);
}

.nebula-2 {
  width: 520px;
  height: 520px;
  top: 18%;
  right: -160px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.45), transparent 70%);
  animation-delay: -6s;
}

.nebula-3 {
  width: 420px;
  height: 420px;
  bottom: -140px;
  left: 35%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.4), transparent 70%);
  animation-delay: -12s;
}

.cyber-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 30%, transparent 80%);
}

#particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ==========================================================================
   Glass Card Shared Utility
   ========================================================================== */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  border: 1px solid var(--glass-border);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 20px 50px -15px rgba(2, 4, 16, 0.85);
  border-radius: var(--radius-lg);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 8, 22, 0.72);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid rgba(148, 163, 255, 0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  transition: transform 0.3s var(--transition-smooth);
}

.brand-link:hover {
  transform: translateY(-1px);
}

.logo-ring {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  padding: 2px;
  background: var(--grad-cosmic);
  box-shadow:
    0 0 22px rgba(34, 211, 238, 0.35),
    0 0 30px rgba(236, 72, 153, 0.28);
  flex-shrink: 0;
  overflow: hidden;
}

.brand-logo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  transform: scale(1.16);
  display: block;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #ffffff;
}

.brand-name.small {
  font-size: 1.08rem;
}

.brand-accent {
  background: var(--grad-cosmic);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-tag {
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--cyan-bright);
  opacity: 0.85;
  margin-top: 3px;
}

.header-nav {
  display: none;
  align-items: center;
  gap: 26px;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 6px 2px;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-cosmic);
  transition: width 0.3s var(--transition-smooth);
}

.nav-link:hover {
  color: #fff;
}

.nav-link:hover::after {
  width: 100%;
}

.dark-mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(20, 28, 64, 0.78);
  border: 1px solid rgba(129, 140, 248, 0.32);
  box-shadow: 0 0 18px rgba(99, 102, 241, 0.2);
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e8f0;
  transition: all 0.25s var(--transition-smooth);
}

.dark-mode-pill:hover {
  border-color: var(--cyan-bright);
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.38);
  transform: translateY(-1px);
}

.dark-mode-pill .mode-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan-bright);
  box-shadow: 0 0 10px var(--cyan-bright);
  animation: pulseDot 2s infinite;
}

.dark-mode-pill .mode-icon {
  width: 14px;
  height: 14px;
  color: #c084fc;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 9px;
  border-radius: 12px;
  background: rgba(20, 28, 62, 0.7);
  border: 1px solid var(--glass-border);
}

.mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: #e2e8f0;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-drawer {
  padding: 12px 18px 18px;
  border-top: 1px solid rgba(148, 163, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(6, 9, 24, 0.94);
}

.mobile-drawer[hidden] {
  display: none;
}

.mobile-nav-link {
  font-family: var(--font-heading);
  font-size: 1rem;
  padding: 8px 4px;
  color: var(--text-secondary);
}

.mobile-mode-row {
  padding-top: 4px;
}

/* ==========================================================================
   Hero Section & Pulsing URL Grabber
   ========================================================================== */
.hero-section {
  padding: 52px 0 42px;
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(24, 28, 68, 0.72);
  border: 1px solid rgba(168, 85, 247, 0.35);
  font-size: 0.78rem;
  font-weight: 600;
  color: #d8b4fe;
  letter-spacing: 0.03em;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(88, 28, 135, 0.25);
}

.float-slow {
  animation: antiGravityFloat 5.5s ease-in-out infinite;
}

.pulse-ring {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ec4899;
  box-shadow: 0 0 12px #ec4899;
  animation: pulseDot 1.8s infinite;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.15rem, 6vw, 4.1rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  max-width: 840px;
  margin-bottom: 18px;
  text-shadow: 0 10px 35px rgba(0, 0, 0, 0.45);
}

.gradient-text {
  background: var(--grad-cosmic);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.3vw, 1.18rem);
  color: var(--text-secondary);
  max-width: 650px;
  margin-bottom: 34px;
}

/* URL Form & Pulsing Glowing Border */
.grabber-form {
  width: 100%;
  max-width: 820px;
}

.input-glow-shell {
  position: relative;
  border-radius: 22px;
  padding: 2px;
  background: linear-gradient(115deg, rgba(34, 211, 238, 0.65), rgba(99, 102, 241, 0.65), rgba(236, 72, 153, 0.75), rgba(34, 211, 238, 0.65));
  background-size: 260% 260%;
  animation: borderPulseFlow 5s ease infinite;
  box-shadow:
    0 0 32px rgba(99, 102, 241, calc(0.28 * var(--glow-intensity))),
    0 0 48px rgba(236, 72, 153, calc(0.18 * var(--glow-intensity)));
  transition: transform 0.35s var(--transition-smooth), box-shadow 0.35s var(--transition-smooth);
}

.input-glow-shell:focus-within,
.input-glow-shell:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 42px rgba(34, 211, 238, calc(0.36 * var(--glow-intensity))),
    0 0 64px rgba(236, 72, 153, calc(0.32 * var(--glow-intensity)));
}

.input-glow-shell.has-error {
  background: linear-gradient(115deg, #f43f5e, #fb7185, #ec4899);
  box-shadow: 0 0 32px rgba(244, 63, 94, 0.45);
}

.input-inner-glass {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  background: rgba(9, 13, 33, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 20px;
  padding: 10px 10px 10px 14px;
}

.link-icon {
  display: none;
  color: var(--cyan-bright);
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.url-input {
  flex: 1 1 200px;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.98rem;
  padding: 10px 6px;
}

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

.detected-pill {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.detected-pill.tiktok { background: rgba(34, 211, 238, 0.16); color: #22d3ee; border: 1px solid rgba(34, 211, 238, 0.4); }
.detected-pill.facebook { background: rgba(59, 130, 246, 0.18); color: #60a5fa; border: 1px solid rgba(96, 165, 250, 0.45); }
.detected-pill.instagram { background: rgba(236, 72, 153, 0.18); color: #f472b6; border: 1px solid rgba(244, 114, 182, 0.45); }
.detected-pill.youtube { background: rgba(239, 68, 68, 0.18); color: #f87171; border: 1px solid rgba(248, 113, 113, 0.45); }

.icon-action-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
}

.icon-action-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.icon-action-btn svg {
  width: 16px;
  height: 16px;
}

.paste-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 13px;
  background: rgba(148, 163, 255, 0.1);
  border: 1px solid rgba(148, 163, 255, 0.24);
  color: #e2e8f0;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.25s var(--transition-smooth);
}

.paste-btn svg {
  width: 15px;
  height: 15px;
  color: var(--cyan-bright);
}

.paste-btn:hover {
  background: rgba(34, 211, 238, 0.16);
  border-color: rgba(34, 211, 238, 0.5);
  transform: translateY(-1px);
}

.grab-btn {
  position: relative;
  flex: 1 1 100%;
  border-radius: 14px;
  padding: 13px 24px;
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
  overflow: hidden;
  transition: transform 0.25s var(--transition-smooth), box-shadow 0.25s var(--transition-smooth);
  box-shadow: 0 8px 26px rgba(168, 85, 247, 0.42);
}

.grab-btn-bg {
  position: absolute;
  inset: 0;
  background: var(--grad-button);
  background-size: 180% 180%;
  transition: background-position 0.4s ease;
}

.grab-btn-content {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.grab-btn-content svg {
  width: 18px;
  height: 18px;
}

.grab-btn:hover {
  transform: translateY(-2px) scale(1.015);
  animation: buttonPulseGlow 1.5s ease-in-out infinite;
}

.grab-btn:hover .grab-btn-bg {
  background-position: 100% 50%;
}

.grab-btn:active {
  transform: translateY(0) scale(0.99);
}

.grab-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  animation: none;
}

.input-error {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 12px;
  background: rgba(244, 63, 94, 0.14);
  border: 1px solid rgba(244, 63, 94, 0.42);
  color: #fda4af;
  font-size: 0.88rem;
  font-weight: 500;
}

.input-error[hidden] {
  display: none;
}

.input-error svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ==========================================================================
   Supported Platform Badges Under Input
   ========================================================================== */
.platform-badges-wrap {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.badges-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.platform-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: 999px;
  background: rgba(15, 21, 48, 0.72);
  border: 1px solid rgba(148, 163, 255, 0.16);
  font-size: 0.86rem;
  font-weight: 600;
  color: #e2e8f0;
  transition: all 0.28s var(--transition-smooth);
}

.platform-badge .badge-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.platform-badge .badge-icon svg {
  width: 13px;
  height: 13px;
}

.badge-tiktok .badge-icon { background: linear-gradient(135deg, #25f4ee, #fe2c55); color: #050816; }
.badge-facebook .badge-icon { background: linear-gradient(135deg, #1877f2, #38bdf8); color: #fff; }
.badge-instagram .badge-icon { background: linear-gradient(135deg, #f59e0b, #ec4899, #8b5cf6); color: #fff; }
.badge-youtube .badge-icon { background: linear-gradient(135deg, #ef4444, #f97316); color: #fff; }

.platform-badge:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 10px 24px rgba(6, 182, 212, 0.18);
}

/* ==========================================================================
   Interactive Loading & Video Found Result Card
   ========================================================================== */
.result-stage {
  width: 100%;
  max-width: 880px;
  margin-top: 34px;
  padding: 24px;
  text-align: left;
  animation: floatUpReveal 0.45s var(--transition-smooth);
}

.result-stage[hidden] {
  display: none;
}

/* Orbital Loading State */
.loading-orbital {
  position: relative;
  width: 78px;
  height: 78px;
  margin: 4px auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbit-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
}

.orbit-outer {
  border-top-color: var(--cyan-bright);
  border-right-color: var(--indigo);
  animation: spin 1.3s linear infinite;
}

.orbit-inner {
  inset: 10px;
  border-bottom-color: var(--magenta);
  border-left-color: #a855f7;
  animation: spinReverse 1.8s linear infinite;
}

.orbit-core {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan-bright);
  animation: antiGravityFloat 2.2s ease-in-out infinite;
}

.orbit-core svg {
  width: 18px;
  height: 18px;
}

.loading-copy {
  text-align: center;
  max-width: 440px;
  margin: 0 auto 24px;
}

.loading-status {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  background: var(--grad-cosmic);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.loading-sub {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 4px 0 14px;
}

.progress-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-fill {
  width: 12%;
  height: 100%;
  border-radius: 999px;
  background: var(--grad-cosmic);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.6);
  transition: width 0.35s ease;
}

/* Skeleton Loader */
.skeleton-preview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 255, 0.12);
}

.skel-thumb {
  height: 150px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.skel-lines {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}

.skel-line {
  height: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.w-40 { width: 40%; }
.w-65 { width: 65%; }
.w-85 { width: 85%; }

.skel-pills {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.skel-pill {
  flex: 1;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(165, 180, 252, 0.14), transparent);
  animation: shimmerSlide 1.4s infinite;
}

/* Result Card */
.result-header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 255, 0.14);
}

.status-found-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.36);
  color: #6ee7b7;
  font-size: 0.82rem;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
}

.grab-another-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.22s ease;
}

.grab-another-btn svg {
  width: 15px;
  height: 15px;
}

.grab-another-btn:hover {
  color: #fff;
  border-color: var(--cyan-bright);
  background: rgba(34, 211, 238, 0.12);
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.thumb-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 255, 0.2);
  background: #070c1f;
  aspect-ratio: 16 / 9;
}

.result-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-overlay {
  position: absolute;
  inset: auto 10px 10px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.source-platform-badge {
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  backdrop-filter: blur(10px);
  color: #fff;
}

.source-platform-badge.tiktok { background: rgba(10, 15, 32, 0.82); border: 1px solid #22d3ee; color: #22d3ee; }
.source-platform-badge.facebook { background: rgba(24, 119, 242, 0.86); border: 1px solid #93c5fd; }
.source-platform-badge.instagram { background: linear-gradient(135deg, rgba(245, 158, 11, 0.9), rgba(236, 72, 153, 0.9)); border: 1px solid #f9a8d4; }
.source-platform-badge.youtube { background: rgba(220, 38, 38, 0.88); border: 1px solid #fca5a5; }

.duration-chip {
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(4, 6, 18, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.play-preview-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(9, 14, 38, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  pointer-events: none;
}

.play-preview-badge svg {
  width: 20px;
  height: 20px;
  margin-left: 2px;
}

.media-meta {
  margin-top: 14px;
}

.media-title {
  font-family: var(--font-heading);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
}

.media-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.meta-chip {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.clean-chip {
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan-bright);
  border: 1px solid rgba(34, 211, 238, 0.25);
}

.url-echo {
  font-size: 0.76rem;
  color: var(--text-muted);
  word-break: break-all;
}

.options-heading {
  font-family: var(--font-heading);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 15px;
  background: rgba(18, 25, 58, 0.72);
  border: 1px solid rgba(148, 163, 255, 0.16);
  transition: all 0.25s var(--transition-smooth);
}

.option-row:hover {
  border-color: rgba(34, 211, 238, 0.45);
  transform: translateX(3px);
  background: rgba(24, 33, 74, 0.85);
}

.option-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.option-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.option-title {
  font-weight: 700;
  font-size: 0.94rem;
  color: #fff;
}

.option-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 6px;
}

.tag-recommended { background: rgba(34, 211, 238, 0.18); color: #22d3ee; }
.tag-hd { background: rgba(168, 85, 247, 0.22); color: #d8b4fe; }
.tag-audio { background: rgba(236, 72, 153, 0.2); color: #f9a8d4; }

.option-specs {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.download-opt-btn {
  position: relative;
  flex-shrink: 0;
  min-width: 118px;
  padding: 10px 15px;
  border-radius: 12px;
  background: var(--grad-button);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
}

.download-opt-btn svg {
  width: 15px;
  height: 15px;
}

.download-opt-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(236, 72, 153, 0.45);
}

.download-opt-btn.is-done {
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
}

.sim-notice {
  margin-top: 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.sim-notice svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--cyan);
}

/* Recent Grabs Strip */
.recent-grabs-wrap {
  width: 100%;
  max-width: 880px;
  margin-top: 22px;
  text-align: left;
}

.recent-grabs-wrap[hidden] {
  display: none;
}

.recent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding: 0 4px;
}

.clear-history-btn {
  color: #f472b6;
  font-size: 0.78rem;
}

.clear-history-btn:hover {
  text-decoration: underline;
}

.recent-grabs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recent-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 11px;
  background: rgba(15, 22, 48, 0.72);
  border: 1px solid rgba(148, 163, 255, 0.16);
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.recent-chip:hover {
  border-color: var(--cyan-bright);
  color: #fff;
  transform: translateY(-2px);
}

/* ==========================================================================
   Shared Sections: Features, How to Use, Supported Sites
   ========================================================================== */
.features-section,
.how-section,
.supported-section {
  padding: 58px 0;
}

.section-heading {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 38px;
}

.section-kicker {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--cyan-bright);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.65rem, 3.6vw, 2.35rem);
  font-weight: 700;
  line-height: 1.18;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 0.98rem;
  color: var(--text-secondary);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.feature-card {
  padding: 26px 22px;
  transition: transform 0.35s var(--transition-smooth), border-color 0.35s ease, box-shadow 0.35s ease;
}

.feature-card:hover {
  transform: translateY(-7px);
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: 0 24px 50px -15px rgba(79, 70, 229, 0.38);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.icon-indigo-cyan { background: linear-gradient(135deg, #4f46e5, #06b6d4); }
.icon-purple-pink { background: linear-gradient(135deg, #9333ea, #ec4899); }
.icon-cyan-magenta { background: linear-gradient(135deg, #06b6d4, #ec4899); }
.icon-pink-amber { background: linear-gradient(135deg, #ec4899, #f59e0b); }

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 1.14rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

/* How to Use Steps */
.steps-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
}

.step-card {
  flex: 1;
  position: relative;
  padding: 28px 24px;
  transition: transform 0.35s var(--transition-smooth), border-color 0.35s ease;
}

.step-card:hover {
  transform: translateY(-6px);
  border-color: rgba(236, 72, 153, 0.45);
}

.step-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  background: var(--grad-cosmic);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.9;
  margin-bottom: 12px;
}

.step-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.16);
  border: 1px solid rgba(129, 140, 248, 0.32);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan-bright);
  margin-bottom: 14px;
}

.step-icon-wrap svg {
  width: 20px;
  height: 20px;
}

.step-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.step-connector {
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--cyan-bright);
  opacity: 0.65;
}

.step-connector svg {
  width: 26px;
  height: 26px;
}

/* Supported Sites Cards */
.supported-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.platform-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.3s var(--transition-smooth), border-color 0.3s ease;
}

.platform-card:hover {
  transform: translateY(-5px);
  border-color: rgba(168, 85, 247, 0.48);
}

.platform-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.platform-chip {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
}

.tiktok-chip { background: rgba(34, 211, 238, 0.16); color: #22d3ee; }
.facebook-chip { background: rgba(59, 130, 246, 0.18); color: #60a5fa; }
.instagram-chip { background: rgba(236, 72, 153, 0.18); color: #f472b6; }
.youtube-chip { background: rgba(239, 68, 68, 0.18); color: #f87171; }

.quality-tag {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
}

.platform-card h3 {
  font-family: var(--font-heading);
  font-size: 1.08rem;
}

.platform-card p {
  font-size: 0.86rem;
  color: var(--text-secondary);
  flex: 1;
}

.try-platform-btn {
  align-self: flex-start;
  margin-top: 4px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--cyan-bright);
  transition: transform 0.2s ease;
}

.try-platform-btn:hover {
  transform: translateX(4px);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: 40px;
  border-top: 1px solid rgba(148, 163, 255, 0.14);
  background: rgba(4, 6, 17, 0.86);
  backdrop-filter: blur(14px);
  padding: 36px 0 28px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-brand-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-link,
.footer-link-btn {
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.footer-link:hover,
.footer-link-btn:hover {
  color: var(--cyan-bright);
}

.footer-disclaimer {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(15, 22, 48, 0.55);
  border: 1px solid rgba(148, 163, 255, 0.1);
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cosmic-credit {
  color: #a5b4fc;
}

/* ==========================================================================
   Toasts & Modals
   ========================================================================== */
.toast-container {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - 36px));
}

.toast {
  padding: 13px 16px;
  border-radius: 14px;
  background: rgba(12, 18, 44, 0.94);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(34, 211, 238, 0.4);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.55);
  color: #f8fafc;
  font-size: 0.86rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: floatUpReveal 0.3s var(--transition-smooth);
}

.toast.error {
  border-color: rgba(244, 63, 94, 0.55);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(3, 5, 16, 0.78);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  padding: 24px;
  background: rgba(11, 16, 39, 0.95);
  animation: floatUpReveal 0.28s var(--transition-smooth);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
}

.modal-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn svg {
  width: 17px;
  height: 17px;
}

.modal-body {
  font-size: 0.92rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-body ol {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ==========================================================================
   Responsive Breakpoints (Mobile-First)
   ========================================================================== */
@media (min-width: 640px) {
  .link-icon {
    display: inline-flex;
  }

  .input-inner-glass {
    flex-wrap: nowrap;
    padding: 8px 8px 8px 18px;
  }

  .grab-btn {
    flex: 0 0 auto;
    padding: 13px 26px;
  }

  .skeleton-preview {
    grid-template-columns: 240px 1fr;
  }

  .features-grid,
  .supported-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 820px) {
  .header-nav {
    display: flex;
  }

  .mobile-menu-btn,
  .mobile-drawer {
    display: none !important;
  }

  .hero-section {
    padding: 68px 0 54px;
  }

  .result-grid {
    grid-template-columns: 340px 1fr;
    align-items: start;
  }

  .steps-grid {
    flex-direction: row;
    align-items: stretch;
  }

  .step-connector {
    display: flex;
  }
}

@media (min-width: 1024px) {
  .features-grid,
  .supported-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes antiGravityFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

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

@keyframes buttonPulseGlow {
  0%, 100% {
    box-shadow: 0 8px 26px rgba(168, 85, 247, 0.5), 0 0 0 0 rgba(236, 72, 153, 0.45);
  }
  50% {
    box-shadow: 0 12px 34px rgba(34, 211, 238, 0.6), 0 0 0 8px rgba(236, 72, 153, 0);
  }
}

@keyframes driftNebula {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(35px, -25px) scale(1.08); }
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.82); }
}

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

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

@keyframes shimmerSlide {
  100% { transform: translateX(100%); }
}

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

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