/* ==========================================================================
   VideoDL - Universal Social Media Video & Audio Downloader Design System
   Modern Dark Glassmorphism, Responsive Tokens & Platform Themes
   ========================================================================== */

:root {
  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  /* Base Color Palette (Dark Theme Default) */
  --bg-primary: #0a0d14;
  --bg-secondary: #101524;
  --bg-tertiary: #171e33;
  --bg-card: rgba(18, 24, 40, 0.75);
  --bg-card-hover: rgba(28, 36, 60, 0.85);
  --bg-glass: rgba(16, 22, 36, 0.75);
  --bg-input: rgba(10, 14, 26, 0.85);

  /* Borders & Glows */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);
  --border-glow: rgba(99, 102, 241, 0.35);

  /* Primary Accent & Gradients */
  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-secondary: #06b6d4;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --accent-glow: 0 0 25px rgba(99, 102, 241, 0.4);
  --accent-glow-subtle: 0 4px 20px rgba(99, 102, 241, 0.2);

  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;

  /* Status Colors */
  --status-success: #10b981;
  --status-success-bg: rgba(16, 185, 129, 0.15);
  --status-warning: #f59e0b;
  --status-warning-bg: rgba(245, 158, 11, 0.15);
  --status-error: #ef4444;
  --status-error-bg: rgba(239, 68, 68, 0.15);
  --status-info: #38bdf8;
  --status-info-bg: rgba(56, 189, 248, 0.15);

  /* Platform Brand Colors */
  --brand-youtube: #ff0033;
  --brand-tiktok: #00f2fe;
  --brand-instagram: #e1306c;
  --brand-facebook: #1877f2;
  --brand-twitter: #1d9bf0;
  --brand-reddit: #ff4500;
  --brand-pinterest: #bd081c;

  /* Transitions & Shadows */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.4), 0 0 1px 1px rgba(255, 255, 255, 0.05);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

/* Light Theme Overrides (Default) */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.94);
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.9);
  --bg-input: #ffffff;

  --border-subtle: rgba(15, 23, 42, 0.09);
  --border-medium: rgba(15, 23, 42, 0.16);
  --border-glow: rgba(99, 102, 241, 0.45);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.1);
  --shadow-card: 0 10px 30px -5px rgba(15, 23, 42, 0.06), 0 0 1px 1px rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .ambient-glow .glow-1 {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, rgba(99, 102, 241, 0) 70%);
}

[data-theme="light"] .ambient-glow .glow-2 {
  background: radial-gradient(circle, rgba(236, 72, 153, 0.08) 0%, rgba(236, 72, 153, 0) 70%);
}

[data-theme="light"] .ambient-glow .glow-3 {
  background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, rgba(6, 182, 212, 0) 70%);
}

[data-theme="light"] .doc-card[style*="border: 2px solid #0066ff"] {
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.95) 0%, rgba(245, 243, 255, 0.9) 100%) !important;
}

[data-theme="light"] .doc-card[style*="border: 2px solid #0066ff"] h3 {
  color: #0f172a !important;
}

[data-theme="light"] .doc-card[style*="border: 2px solid #0066ff"] p {
  color: #334155 !important;
}

[data-theme="light"] .doc-card[style*="border: 2px solid #0066ff"] span {
  color: #0052cc !important;
}


/* ==========================================================================
   Base & Resets
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Ambient Background Glows */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-1 {
  position: absolute;
  top: -150px;
  left: 15%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(99, 102, 241, 0) 70%);
  filter: blur(60px);
  animation: pulseGlow 12s infinite alternate ease-in-out;
}

.glow-2 {
  position: absolute;
  top: 25%;
  right: 10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.12) 0%, rgba(236, 72, 153, 0) 70%);
  filter: blur(80px);
  animation: pulseGlow 15s infinite alternate-reverse ease-in-out;
}

.glow-3 {
  position: absolute;
  bottom: 5%;
  left: 30%;
  width: 700px;
  height: 500px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, rgba(6, 182, 212, 0) 70%);
  filter: blur(90px);
}

@keyframes pulseGlow {
  0% { transform: scale(1) translate(0, 0); opacity: 0.7; }
  50% { transform: scale(1.15) translate(30px, 20px); opacity: 1; }
  100% { transform: scale(0.95) translate(-20px, 40px); opacity: 0.8; }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
  border: 2px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Layout Container */
.app-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ==========================================================================
   Header & Navbar
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 50;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  cursor: pointer;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--accent-glow-subtle);
  color: #ffffff;
  font-size: 1.3rem;
  transition: transform var(--transition-fast);
}

.brand-logo:hover .brand-icon {
  transform: rotate(6deg) scale(1.05);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Nav Tabs */
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-secondary);
  padding: 5px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  color: #ffffff;
  background: var(--accent-primary);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* RapidAPI Pro Button */
.btn-rapidapi {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #0052cc 0%, #0080ff 100%);
  color: #ffffff;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 102, 255, 0.35);
  transition: all var(--transition-fast);
}

.btn-rapidapi:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 102, 255, 0.5);
  color: #ffffff;
}

/* Status Beacon */
.api-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.api-status-badge:hover {
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-success);
  box-shadow: 0 0 10px var(--status-success);
  animation: pulseBeacon 2s infinite ease-in-out;
}

.status-dot.error {
  background: var(--status-error);
  box-shadow: 0 0 10px var(--status-error);
}

.status-dot.loading {
  background: var(--status-warning);
  box-shadow: 0 0 10px var(--status-warning);
}

@keyframes pulseBeacon {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* Icon Buttons */
.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

/* ==========================================================================
   Hero & Extractor Section
   ========================================================================== */

.page-section {
  padding: 4rem 0 3rem;
  scroll-margin-top: 80px;
  position: relative;
}

/* Decorative separator line between sections */
.page-section + .page-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 1px;
  background: var(--accent-gradient);
  border-radius: 1px;
  opacity: 0.5;
}

.hero-section {
  padding: 3rem 0 2rem;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  color: #818cf8;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.15);
  position: relative;
  overflow: hidden;
}

.hero-pill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  animation: shimmerPill 3s infinite ease-in-out;
}

@keyframes shimmerPill {
  0% { left: -100%; }
  60%, 100% { left: 160%; }
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

/* Extractor Input Card */
.extractor-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  max-width: 880px;
  margin: 0 auto;
  position: relative;
}

.url-input-container {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-input);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 8px 10px 8px 16px;
  transition: all var(--transition-fast);
}

.url-input-container:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.detected-platform-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.url-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  color: var(--text-primary);
  min-width: 120px;
}

.url-input::placeholder {
  color: var(--text-muted);
}

.input-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-paste, .btn-clear {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-paste:hover, .btn-clear:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.btn-extract {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-extract:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-extract.loading {
  pointer-events: none;
  opacity: 0.85;
}

/* Platforms Bar */
.platforms-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  flex-wrap: wrap;
  gap: 12px;
}

.platforms-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  user-select: none;
}

.platform-chip:hover {
  border-color: var(--border-medium);
  color: var(--text-secondary);
}

.platform-chip.active {
  border-color: currentColor;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

.platform-chip.youtube.active { color: var(--brand-youtube); background: rgba(255, 0, 51, 0.1); }
.platform-chip.tiktok.active { color: var(--brand-tiktok); background: rgba(0, 242, 254, 0.1); }
.platform-chip.instagram.active { color: var(--brand-instagram); background: rgba(225, 48, 108, 0.1); }
.platform-chip.facebook.active { color: var(--brand-facebook); background: rgba(24, 119, 242, 0.1); }
.platform-chip.twitter.active { color: var(--brand-twitter); background: rgba(29, 155, 240, 0.1); }




/* ==========================================================================
   Extraction Results Container
   ========================================================================== */

.results-section {
  padding: 1rem 0 3rem;
  display: none;
}

.results-section.active {
  display: block;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.results-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  max-width: 1040px;
  margin: 0 auto;
}

.results-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.meta-details {
  flex: 1;
}

.meta-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.badge-platform {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-author {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.media-title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 6px;
  word-break: break-word;
}

.media-description {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-height: 80px;
  overflow-y: auto;
  padding-right: 8px;
}

.header-action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Results Content Grid */
.results-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* Media Preview Card */
.preview-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-md);
}

.video-player-wrapper {
  position: relative;
  width: 100%;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  max-height: 480px;
}

.video-player-wrapper video {
  width: 100%;
  height: 100%;
  max-height: 480px;
  object-fit: contain;
  display: block;
}

.image-preview-wrapper {
  position: relative;
  width: 100%;
  max-height: 480px;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.image-preview-wrapper img {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  display: block;
}

/* Carousel / Slideshow Navigation */
.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border-subtle);
}

.carousel-counter {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.carousel-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.carousel-btn {
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.carousel-btn:hover:not(:disabled) {
  background: var(--accent-primary);
}

.carousel-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Formats & Download List */
.formats-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.formats-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 440px;
  overflow-y: auto;
  padding-right: 4px;
}

.format-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  gap: 12px;
  min-width: 0;
  box-sizing: border-box;
}

.format-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateX(3px);
}

.format-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.format-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.format-icon.audio {
  background: rgba(236, 72, 153, 0.12);
  color: #ec4899;
}

.format-icon.image {
  background: rgba(16, 185, 129, 0.12);
  color: var(--status-success);
}

.format-specs {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.format-quality {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.badge-res {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
  white-space: nowrap;
}

.format-subtext {
  font-size: 0.78rem;
  color: var(--text-muted);
  word-break: break-word;
}

.format-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-download:hover {
  background: var(--accent-primary-hover);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

.btn-download.downloading {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
  opacity: 0.9;
  cursor: wait;
  pointer-events: none;
}

.btn-download.btn-download-thumb {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.btn-download.btn-download-thumb:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.format-card.thumbnail-card {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.04);
}

.format-card.thumbnail-card:hover {
  border-color: rgba(16, 185, 129, 0.6);
  background: rgba(16, 185, 129, 0.08);
}

/* Media Quick Actions Toolbar below player */
.media-quick-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.btn-quick-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  background: var(--accent-primary);
  color: #ffffff;
  text-decoration: none;
}

.btn-quick-action:hover {
  transform: translateY(-1px);
}

.btn-quick-action.btn-quick-thumb {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.btn-quick-action.btn-quick-thumb:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.btn-quick-action.btn-quick-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.btn-quick-action.btn-quick-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
}

.btn-header-thumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-sm);
  color: var(--status-success);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-header-thumb:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: var(--status-success);
  transform: translateY(-1px);
}

.thumbnail-modal-preview {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000000;
  margin: 1.25rem 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  max-height: 420px;
}

.thumbnail-modal-preview img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  display: block;
}

.btn-copy-link {
  padding: 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-copy-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   SEO Content Sections: Platforms, How-To, Features & FAQ
   ========================================================================== */

.section-header-center {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 2.5rem;
}

.section-main-title {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  margin-bottom: 0.85rem;
  line-height: 1.2;
}

.section-main-title .text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-main-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto;
}

/* Supported Platforms Showcase Grid */
.seo-platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.seo-platform-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.seo-platform-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--card-accent, var(--accent-gradient));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.seo-platform-card:hover::after {
  opacity: 1;
}

.seo-platform-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(99, 102, 241, 0.1);
}

.seo-platform-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

.seo-platform-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.seo-platform-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
}

.seo-platform-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
}

.seo-platform-features li {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* How-To Step Guide Grid */
.how-to-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.how-to-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
}

.how-to-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-3px);
}

.how-to-number {
  position: absolute;
  top: 14px;
  right: 20px;
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
  user-select: none;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.2;
  transition: opacity var(--transition-normal);
}

.how-to-card:hover .how-to-number {
  opacity: 0.4;
}

.how-to-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.how-to-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.how-to-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* SEO Features Grid */
.seo-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.seo-feature-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-primary);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.seo-feature-box:hover {
  border-left-color: #a855f7;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  background: var(--bg-card-hover);
}

.seo-feature-icon {
  font-size: 1.75rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.seo-feature-text-wrap {
  flex: 1;
  min-width: 0;
}

.seo-feature-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.seo-feature-body {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Telemetry Section
   ========================================================================== */

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.stats-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.stats-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.platform-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 700;
}

.method-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9rem;
}

.method-stat-row:last-child {
  border-bottom: none;
}

.stat-metric {
  font-weight: 700;
  color: var(--status-success);
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  margin-top: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 3px;
  transition: width 0.8s ease-in-out;
}

/* ==========================================================================
   API Documentation & Endpoints Section
   ========================================================================== */

.doc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
}

.doc-endpoint {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.http-method {
  padding: 4px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
}

.http-method.post { background: rgba(99, 102, 241, 0.2); color: #818cf8; }
.http-method.get { background: rgba(16, 185, 129, 0.2); color: #34d399; }

.endpoint-path {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.params-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.88rem;
}

.params-table th, .params-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.params-table th {
  color: var(--text-secondary);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.json-response-box {
  background: #090d16;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.6;
  color: #38bdf8;
  max-height: 380px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.json-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

/* ==========================================================================
   Modals
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 560px;
  width: 100%;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform var(--transition-normal);
  box-sizing: border-box;
}

.modal-backdrop.active .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.qr-code-box {
  background: #ffffff;
  padding: 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem auto;
  width: 220px;
  height: 220px;
  box-shadow: var(--shadow-md);
}

.qr-code-box img {
  width: 100%;
  height: 100%;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: calc(100vw - 48px);
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 600;
  animation: slideToast 0.3s ease-out;
  transition: opacity 0.3s, transform 0.3s;
  word-break: break-word;
  box-sizing: border-box;
}

.toast.success { border-left: 4px solid var(--status-success); }
.toast.error { border-left: 4px solid var(--status-error); }
.toast.info { border-left: 4px solid var(--accent-primary); }

@keyframes slideToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Mobile Bottom Navigation */
.mobile-bottom-bar {
  display: none;
}

@media (max-width: 900px) {
  .results-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  /* Header: hide API status badge and RapidAPI label on mobile */
  .api-status-badge {
    display: none;
  }

  .btn-rapidapi-text {
    display: none;
  }

  .btn-rapidapi {
    font-size: 0.75rem;
    padding: 7px 10px;
    gap: 0;
  }

  .btn-icon {
    width: 36px;
    height: 36px;
  }

  .header-actions {
    gap: 6px;
    flex-shrink: 1;
    min-width: 0;
  }

  .header-inner {
    height: 60px;
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  /* Keep the brand inside the fixed mobile header height. */
  .brand-logo {
    min-width: 0;
    flex-shrink: 1;
  }

  .brand-text {
    min-width: 0;
  }

  .brand-subtitle {
    display: none;
  }

  /* Results card header: stack action buttons below title instead of
     letting them overflow off-screen next to a full-width title column. */
  .results-card {
    padding: 1.25rem;
  }

  .results-header {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .meta-details {
    min-width: 0;
    flex-basis: 100%;
  }

  .header-action-buttons {
    flex-shrink: 0;
  }

  .mobile-bottom-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: calc(62px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--bg-glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--border-subtle);
    z-index: 50;
    align-items: center;
    justify-content: space-around;
    padding-left: 6px;
    padding-right: 6px;
    box-sizing: border-box;
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
    text-decoration: none;
  }

  .mobile-nav-item:hover {
    color: var(--text-secondary);
    background: rgba(99, 102, 241, 0.06);
  }

  .mobile-nav-item.active {
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
  }

  /* Active indicator dot below active icon */
  .mobile-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent-primary);
  }

  .hero-section {
    padding: 1.5rem 0 1rem;
  }

  .hero-title {
    font-size: 1.85rem;
  }

  .hero-description {
    font-size: 0.95rem;
  }

  /* URL input: stack icon+input on top, actions on bottom */
  .url-input-container {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    gap: 10px;
  }

  .detected-platform-icon {
    display: none;
  }

  .url-input {
    width: 100%;
    font-size: 0.95rem;
  }

  .input-actions {
    width: 100%;
    justify-content: stretch;
    gap: 8px;
  }

  .btn-paste {
    flex: 1;
    justify-content: center;
  }

  .btn-extract {
    flex: 2;
    justify-content: center;
    padding: 11px 16px;
    font-size: 0.95rem;
  }

  /* Platforms bar: stack vertically and clean up */
  .platforms-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 1rem;
  }

  .platforms-list {
    gap: 6px;
    width: 100%;
  }

  .platform-chip {
    font-size: 0.75rem;
    padding: 4px 10px;
  }

  .extractor-card {
    padding: 1.25rem;
    border-radius: var(--radius-lg);
  }

  .app-wrapper {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }

  .page-section {
    padding: 2rem 0 2rem;
  }

  /* Prevent main container from causing horizontal scroll */
  .container {
    padding: 0 1rem;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  /* Hero section should not overflow */
  .hero-section {
    overflow: hidden;
  }

  .hero-pill {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Mobile Results & Download Layout Enhancements */
  .results-section {
    padding: 1rem 0 2rem;
  }

  .results-card {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-lg);
    width: 100%;
    box-sizing: border-box;
  }

  .results-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
  }

  .header-action-buttons {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }

  .header-action-buttons .btn-header-thumb {
    flex: 1;
    justify-content: center;
    padding: 8px 14px;
  }

  .media-title {
    font-size: 1.15rem;
  }

  .formats-list {
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
    gap: 10px;
  }

  /* Mobile Toast: Clean floating bar above bottom navigation */
  .toast-container {
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    left: 16px;
    right: 16px;
    max-width: calc(100vw - 32px);
    align-items: center;
    gap: 8px;
  }

  .toast {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    animation: slideToastMobile 0.3s ease-out;
    padding: 11px 16px;
    font-size: 0.86rem;
  }

  @keyframes slideToastMobile {
    from { transform: translateY(16px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }

  /* Mobile Modals Constraints */
  .modal-backdrop {
    padding: 1rem;
    z-index: 150;
  }

  .modal-content {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-lg);
    max-height: calc(100vh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    width: 100%;
  }

  .thumbnail-modal-preview {
    max-height: 240px;
    min-height: 140px;
    margin: 1rem 0;
  }

  .thumbnail-modal-preview img {
    max-height: 220px;
  }

  .qr-code-box {
    width: 180px;
    height: 180px;
    margin: 1rem auto;
    padding: 12px;
  }

  /* Format Cards Stacked Layout on Mobile */
  .format-card {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px;
    gap: 12px;
  }

  .format-info {
    width: 100%;
    min-width: 0;
    gap: 10px;
  }

  .format-specs {
    min-width: 0;
    flex: 1;
  }

  .format-quality {
    font-size: 0.92rem;
    flex-wrap: wrap;
    gap: 6px;
  }

  .format-subtext {
    font-size: 0.76rem;
    word-break: break-word;
  }

  .format-actions {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }

  [data-theme="light"] .format-actions {
    border-top: 1px solid rgba(15, 23, 42, 0.06);
  }

  .format-actions .btn-download {
    flex: 1;
    justify-content: center;
    padding: 9px 14px;
    font-size: 0.85rem;
    min-width: 0;
  }

  .format-actions .btn-copy-link {
    padding: 9px 11px;
    flex-shrink: 0;
  }

  .media-quick-actions {
    padding: 10px 12px;
    gap: 8px;
  }

  .btn-quick-action {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
    text-align: center;
    padding: 8px 10px;
    font-size: 0.78rem;
    min-width: 130px;
  }
}

@media (max-width: 480px) {
  .btn-rapidapi-text {
    display: none;
  }

  .btn-rapidapi {
    padding: 7px 10px;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .platform-chip {
    font-size: 0.72rem;
    padding: 4px 8px;
  }

  .results-card {
    padding: 1rem 0.75rem;
  }

  .format-card {
    padding: 10px 12px;
  }

  .format-icon {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
  }

  .btn-quick-action {
    flex: 1 1 100%;
  }

  /* Force platform and feature grids to single column on tiny screens */
  .seo-platforms-grid,
  .seo-features-grid,
  .how-to-grid {
    grid-template-columns: 1fr;
  }
}



/* ==========================================================================
   SITE FOOTER COMPONENT
   ========================================================================== */
.site-footer {
  margin-top: 5rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
  z-index: 10;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-primary) 50%, transparent 100%);
  opacity: 0.6;
}

.footer-inner {
  padding: 4rem 0 2rem;
}

.footer-top-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.75rem 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 3.5rem;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.footer-banner-text h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-banner-text p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.footer-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-col-brand {
  padding-right: 1rem;
}

.footer-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.footer-brand-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.footer-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.footer-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-success);
  box-shadow: 0 0 10px var(--status-success);
  animation: pulseStatus 2s infinite ease-in-out;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-col h4::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 14px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links li a {
  color: var(--text-secondary);
  font-size: 0.88rem;
  text-decoration: none;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-links li a:hover {
  color: var(--accent-primary);
  transform: translateX(4px);
}

.footer-badge-tag {
  display: inline-block;
  padding: 2px 6px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.footer-disclaimer-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-disclaimer-box strong {
  color: var(--text-secondary);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-bottom-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-bottom-links a:hover {
  color: var(--text-primary);
}

.btn-back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-back-to-top:hover {
  color: var(--text-primary);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

/* ==========================================================================
   LEGAL PAGES DESIGN SYSTEM
   ========================================================================== */
.legal-header {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
  position: relative;
}

.legal-breadcrumbs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  padding: 6px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
}

.legal-breadcrumbs a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
}

.legal-breadcrumbs a:hover {
  color: var(--accent-primary);
}

.legal-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.legal-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.legal-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.legal-actions-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.btn-legal-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-fast);
}

.btn-legal-action:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

/* Legal Page Layout (Sidebar + Content) */
.legal-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  align-items: start;
  padding-bottom: 4rem;
}

.legal-sidebar {
  position: sticky;
  top: 90px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.legal-sidebar-title {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-toc {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.legal-toc-link {
  display: block;
  padding: 6px 10px;
  color: var(--text-secondary);
  font-size: 0.84rem;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  border-left: 2px solid transparent;
}

.legal-toc-link:hover,
.legal-toc-link.active {
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.08);
  border-left-color: var(--accent-primary);
}

.legal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-card);
}

.legal-section {
  margin-bottom: 3rem;
  scroll-margin-top: 100px;
}

.legal-section:last-child {
  margin-bottom: 0;
}

.legal-section h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 1.5rem 0 0.75rem;
}

.legal-section p {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.legal-section ul, 
.legal-section ol {
  margin: 0.75rem 0 1.25rem 1.5rem;
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.7;
}

.legal-section li {
  margin-bottom: 0.5rem;
}

.legal-section strong {
  color: var(--text-primary);
}

/* Callout Alert Boxes */
.legal-alert {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  font-size: 0.9rem;
  line-height: 1.6;
}

.legal-alert.info {
  background: var(--status-info-bg);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--text-primary);
}

.legal-alert.warning {
  background: var(--status-warning-bg);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--text-primary);
}

.legal-alert.success {
  background: var(--status-success-bg);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--text-primary);
}

.legal-alert-icon {
  flex-shrink: 0;
  font-size: 1.25rem;
}

/* Legal Table */
.legal-table-container {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.legal-table th {
  background: var(--bg-secondary);
  padding: 12px 16px;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
}

.legal-table td {
  padding: 12px 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.legal-table tr:last-child td {
  border-bottom: none;
}

/* Legal Contact & FAQ Components */
.legal-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.legal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: var(--transition-normal);
}

.legal-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.legal-card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.legal-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.legal-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.faq-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-fast);
}

.faq-item.active {
  border-color: var(--accent-primary);
}

.faq-header {
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.faq-toggle-icon {
  transition: transform 0.25s ease;
  color: var(--text-muted);
}

.faq-item.active .faq-toggle-icon {
  transform: rotate(180deg);
  color: var(--accent-primary);
}

.faq-body {
  padding: 0 1.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-body {
  max-height: 400px;
  padding: 0 1.25rem 1.25rem;
}

/* Responsive Styles for Footer and Legal Pages */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
  
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-sidebar {
    position: static;
    margin-bottom: 1rem;
  }

  .legal-contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-top-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem;
  }

  .legal-content {
    padding: 1.5rem;
  }

  .legal-title {
    font-size: 1.85rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

