/* ==========================================================================
   TikTok HD Download - Modern Sleek UI Stylesheet
   Designed to match the reference UI & feature set
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Dark Theme Palette (Default) */
  --bg-base: #101115;
  --bg-surface: #16171e;
  --bg-surface-elevated: #1d1f27;
  --bg-surface-hover: #232530;
  --bg-card: #171820;
  --bg-input: #13141a;
  
  --border-subtle: #252733;
  --border-medium: #2e3140;
  --border-focus: #5842f6;
  
  --primary: #5842f6;
  --primary-rgb: 88, 66, 246;
  --primary-hover: #4834e0;
  --primary-gradient: linear-gradient(135deg, #5842f6 0%, #7645ff 100%);
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-yellow: #f59e0b;
  --accent-green: #10b981;
  --accent-pink: #ec4899;
  
  --text-primary: #ffffff;
  --text-secondary: #9ea3b5;
  --text-muted: #656a7d;
  --text-inverse: #000000;
  
  --glow-primary: rgba(88, 66, 246, 0.22);
  --glow-ambient: radial-gradient(circle at 50% 0%, rgba(88, 66, 246, 0.15) 0%, rgba(16, 17, 21, 0) 70%);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  --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.45);
  --shadow-glow: 0 0 25px rgba(88, 66, 246, 0.35);
  
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme */
[data-theme="light"] {
  --bg-base: #f4f5fa;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f8f9fd;
  --bg-surface-hover: #eff1f7;
  --bg-card: #ffffff;
  --bg-input: #ffffff;
  
  --border-subtle: #e2e5f0;
  --border-medium: #cbd1e3;
  --border-focus: #5842f6;
  
  --text-primary: #12141d;
  --text-secondary: #4b5266;
  --text-muted: #8b92a5;
  --text-inverse: #ffffff;
  
  --glow-primary: rgba(88, 66, 246, 0.1);
  --glow-ambient: radial-gradient(circle at 50% 0%, rgba(88, 66, 246, 0.08) 0%, rgba(244, 245, 250, 0) 70%);
  
  --shadow-sm: 0 2px 8px rgba(18, 20, 29, 0.04);
  --shadow-md: 0 8px 24px rgba(18, 20, 29, 0.08);
  --shadow-lg: 0 16px 40px rgba(18, 20, 29, 0.12);
  --shadow-glow: 0 0 20px rgba(88, 66, 246, 0.2);
}

/* Base Reset & Core Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Ambient Ambient Glow & Watermark Icons */
.ambient-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-glow-top {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(88, 66, 246, 0.14) 0%, rgba(88, 66, 246, 0) 70%);
  filter: blur(60px);
}

.ambient-glow-side {
  position: absolute;
  top: 30%;
  left: -150px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(118, 69, 255, 0.08) 0%, transparent 70%);
  filter: blur(80px);
}

.ambient-watermark-icon {
  position: absolute;
  color: var(--text-primary);
  opacity: 0.035;
  user-select: none;
}

[data-theme="light"] .ambient-watermark-icon {
  opacity: 0.04;
}

.icon-pos-1 { top: 120px; left: 8%; font-size: 72px; transform: rotate(-15deg); }
.icon-pos-2 { top: 150px; right: 10%; font-size: 64px; transform: rotate(12deg); }
.icon-pos-3 { top: 420px; left: 5%; font-size: 96px; transform: rotate(20deg); }
.icon-pos-4 { top: 380px; right: 6%; font-size: 80px; transform: rotate(-25deg); }
.icon-pos-5 { top: 680px; left: 12%; font-size: 54px; transform: rotate(-8deg); }
.icon-pos-6 { top: 720px; right: 14%; font-size: 68px; transform: rotate(18deg); }

/* Main Wrapper */
.site-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(16, 17, 21, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}

[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.9);
}

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

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-gradient);
  color: #ffffff;
  font-size: 1.1rem;
  box-shadow: 0 4px 14px rgba(88, 66, 246, 0.4);
}

.brand-text {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.brand-title {
  font-weight: 800;
}

.brand-suffix {
  color: var(--primary);
  font-weight: 700;
}

.brand-tag {
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(88, 66, 246, 0.16);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
  margin-left: 4px;
}

/* Navigation Links (Pill Style) */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 0;
}

.nav-menu::-webkit-scrollbar {
  display: none;
}

.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 500;
  white-space: nowrap;
  transition: var(--transition);
}

.nav-item:hover {
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
}

.nav-item.active {
  color: #ffffff;
  font-weight: 600;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--primary);
}

.nav-item .nav-icon {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
  color: var(--primary);
}

.nav-badge-pro {
  background: #f59e0b;
  color: #000000;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  line-height: 1;
}

/* Header Right Controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Theme Switcher Toggle Pill */
.theme-toggle-btn {
  position: relative;
  width: 58px;
  height: 28px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  border-color: var(--border-medium);
}

.theme-toggle-btn .icon-sun {
  font-size: 11px;
  color: #f59e0b;
  z-index: 2;
}

.theme-toggle-btn .icon-moon {
  font-size: 11px;
  color: #a78bfa;
  z-index: 2;
}

.theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  background: var(--primary);
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .theme-toggle-thumb {
  transform: translateX(30px);
}

/* Mobile Menu Toggle Button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 6px;
}

/* ==========================================================================
   Hero Downloader Section
   ========================================================================== */
.hero-section {
  padding: 56px 0 36px;
  text-align: center;
  position: relative;
}

.hero-content {
  max-width: 820px;
  margin: 0 auto;
}

/* Bold Typography */
.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.hero-title-sub {
  display: block;
}

.hero-highlight {
  color: var(--primary);
  background: linear-gradient(135deg, #5842f6 20%, #8960ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-description {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 24px;
  font-weight: 400;
  line-height: 1.55;
}

/* Warning Pill Badge */
.warning-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.warning-pill .bolt-icon {
  color: #eab308;
  font-size: 0.9rem;
}

/* Downloader Input Box Container */
.downloader-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 10px 12px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  max-width: 780px;
  margin: 0 auto 16px;
}

.downloader-box:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--glow-primary), var(--shadow-md);
}

.input-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.input-icon {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-left: 8px;
  flex-shrink: 0;
}

.downloader-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 400;
}

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

.input-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.clear-btn {
  display: none;
  background: var(--bg-surface-elevated);
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  transition: var(--transition);
}

.clear-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

/* Paste / Download Trigger Button */
.paste-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary-gradient);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(88, 66, 246, 0.35);
}

.paste-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(88, 66, 246, 0.45);
}

.paste-action-btn:active {
  transform: translateY(0);
}

/* Quick Helper Row */
.quick-helpers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.sample-chip {
  background: none;
  border: 1px dashed var(--border-medium);
  color: var(--primary);
  font-family: inherit;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sample-chip:hover {
  background: rgba(88, 66, 246, 0.1);
  border-color: var(--primary);
}

/* Status & Loading States */
.status-indicator {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-medium);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.error-message {
  display: none;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  margin-top: 18px;
  font-size: 0.88rem;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* ==========================================================================
   Video Result Card (Replicating Reference Design Centerpiece)
   ========================================================================== */
.result-card-container {
  max-width: 820px;
  margin: 28px auto 0;
  display: block; /* Visible by default with interactive loaded video or ready state */
  animation: fadeIn 0.35s ease;
}

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

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  box-shadow: var(--shadow-lg);
  position: relative;
  text-align: left;
}

/* Left Column: Media Preview */
.media-preview-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.thumbnail-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000000;
  border: 1px solid var(--border-subtle);
}

.thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.thumbnail-wrap:hover .thumbnail-img {
  transform: scale(1.04);
}

.source-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  transition: var(--transition);
}

.source-badge:hover {
  background: rgba(88, 66, 246, 0.85);
}

.source-badge .tiktok-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00f2fe;
}

.duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
}

.media-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.media-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.media-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.author-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  font-weight: 500;
}

.author-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}

/* Right Column: Download & Format Controls */
.media-actions-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

/* Format Selector Box */
.format-selection-box {
  position: relative;
}

.format-active-row {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition);
}

.format-active-row:hover {
  border-color: var(--border-medium);
  background: var(--bg-surface-elevated);
}

.format-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.format-icon {
  color: var(--primary);
  font-size: 1rem;
}

.format-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.format-progress-track {
  width: 48px;
  height: 6px;
  background: var(--border-subtle);
  border-radius: 3px;
  overflow: hidden;
  margin-left: 6px;
}

.format-progress-bar {
  width: 65%;
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
}

.format-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.format-size {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
}

.format-chevron {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: transform 0.25s ease;
}

.format-dropdown.open .format-chevron {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.format-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 6px;
  box-shadow: var(--shadow-lg);
  z-index: 20;
  display: none;
}

.format-dropdown.open .format-dropdown-menu {
  display: block;
}

.format-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.88rem;
}

.format-option:hover {
  background: var(--bg-surface-hover);
}

.format-option.selected {
  background: rgba(88, 66, 246, 0.12);
  color: var(--primary);
}

.format-option-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.format-badge-hd {
  background: var(--primary);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
}

.format-badge-audio {
  background: var(--accent-pink);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
}

/* Add Another Format Action */
.add-format-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 0;
  transition: var(--transition);
}

.add-format-btn:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Big Vibrant Download Button */
.main-download-btn {
  background: var(--primary-gradient);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 16px 28px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(88, 66, 246, 0.4);
  text-decoration: none;
}

.main-download-btn:hover {
  box-shadow: 0 6px 26px rgba(88, 66, 246, 0.55);
  transform: translateY(-2px);
}

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

/* Secondary Actions inside card */
.card-sub-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: 4px;
}

.sub-link {
  color: var(--text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
  cursor: pointer;
}

.sub-link:hover {
  color: var(--primary);
}

/* ==========================================================================
   Feature Showcase Section (Directly Replicating Bottom Graphic in Image)
   ========================================================================== */
.showcase-section {
  padding: 64px 0 48px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 56px;
}

.showcase-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: center;
  gap: 56px;
}

.showcase-text-col {
  text-align: left;
}

.showcase-heading {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.showcase-paragraphs {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.showcase-paragraphs p strong {
  color: var(--text-primary);
}

/* Graphic Column: Glowing Film Strip with Down Arrow */
.showcase-graphic-col {
  display: flex;
  align-items: center;
  justify-content: center;
}

.film-icon-badge {
  position: relative;
  width: 200px;
  height: 140px;
  background: #191b24;
  border: 3px solid #5842f6;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 14px;
  box-shadow: 0 0 35px rgba(88, 66, 246, 0.45);
  transition: transform 0.3s ease;
}

.film-icon-badge:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 0 45px rgba(88, 66, 246, 0.6);
}

.film-sprockets-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.film-sprocket {
  width: 14px;
  height: 12px;
  background: #5842f6;
  border-radius: 4px;
}

.film-center-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5842f6;
  font-size: 2.8rem;
  filter: drop-shadow(0 0 10px rgba(88, 66, 246, 0.7));
}

/* ==========================================================================
   How It Works (3 Steps)
   ========================================================================== */
.steps-section {
  padding: 60px 0;
  text-align: center;
}

.section-header {
  max-width: 650px;
  margin: 0 auto 48px;
}

.section-tag {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  display: inline-block;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 12px;
}

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

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: var(--transition);
  position: relative;
}

.step-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.step-num {
  position: absolute;
  top: 18px;
  left: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(88, 66, 246, 0.12);
  padding: 2px 8px;
  border-radius: 6px;
}

.step-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(88, 66, 246, 0.12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin: 12px auto 20px;
}

.step-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.step-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ==========================================================================
   Features Section (from tiktokdownloaderr.id)
   ========================================================================== */
.features-section {
  padding: 60px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
}

.feature-box:hover {
  border-color: var(--border-medium);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(88, 66, 246, 0.12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 18px;
}

.feature-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.feature-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq-section {
  padding: 60px 0;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: var(--border-medium);
}

.faq-question-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  gap: 16px;
}

.faq-icon {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
}

.faq-item.active .faq-answer {
  max-height: 350px;
  transition: max-height 0.4s ease-in-out;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 30px;
  margin-top: 60px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-subtle);
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-top: 12px;
  max-width: 320px;
  line-height: 1.6;
}

.footer-col-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.social-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.95rem;
}

.social-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Modals & Popups
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 650px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px;
  transition: var(--transition);
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-body h4 {
  color: var(--text-primary);
  font-size: 1.05rem;
  margin-top: 8px;
}

/* Scroll to Top Button */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(88, 66, 246, 0.4);
  z-index: 90;
  transition: var(--transition);
}

.scroll-top-btn.visible {
  display: flex;
}

.scroll-top-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(88, 66, 246, 0.6);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 992px) {
  .hero-title {
    font-size: 2.8rem;
  }
  
  .result-card {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .thumbnail-wrap {
    aspect-ratio: 16 / 9;
    max-height: 280px;
  }
  
  .showcase-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }
  
  .showcase-text-col {
    text-align: center;
  }
  
  .steps-grid,
  .features-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .navbar {
    height: 68px;
  }
  
  .nav-menu {
    display: none; /* Mobile menu can toggle */
  }
  
  .nav-menu.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    padding: 16px;
    gap: 8px;
    box-shadow: var(--shadow-lg);
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .hero-title {
    font-size: 2.2rem;
  }
  
  .steps-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-top {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
