/* =========================================
   UNIVERSAL DOWNLOADER — DESIGN SYSTEM
   ========================================= */

/* ---------- CSS Variables ---------- */
:root {
  /* Colors — Dark Theme */
  --bg-primary: #06060b;
  --bg-secondary: #0c0c14;
  --bg-tertiary: #12121e;
  --bg-card: rgba(15, 15, 25, 0.7);
  --bg-card-hover: rgba(20, 20, 35, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-glass-hover: rgba(255, 255, 255, 0.07);

  --border-color: rgba(255, 255, 255, 0.06);
  --border-color-hover: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(99, 102, 241, 0.3);

  --text-primary: #f0f0f5;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --text-accent: #a5b4fc;

  /* Accent Gradients */
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  --gradient-accent: linear-gradient(135deg, #06b6d4 0%, #6366f1 50%, #a855f7 100%);
  --gradient-hero: linear-gradient(180deg, rgba(99, 102, 241, 0.08) 0%, transparent 60%);
  --gradient-text: linear-gradient(135deg, #06b6d4, #818cf8, #c084fc);

  /* Accent Colors */
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-amber: #f59e0b;
  --accent-pink: #ec4899;

  /* Platform Colors */
  --youtube: #FF0000;
  --tiktok: #00F2EA;
  --instagram: #E4405F;
  --facebook: #1877F2;
  --twitter: #1DA1F2;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 50%;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);
  --shadow-glow-cyan: 0 0 30px rgba(6, 182, 212, 0.15);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease;
  --transition-spring: 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 600px 400px at 20% 10%, rgba(99, 102, 241, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 500px 300px at 80% 80%, rgba(168, 85, 247, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 50% 50%, rgba(6, 182, 212, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  position: relative;
  z-index: 1;
}

.screen {
  position: relative;
  z-index: 1;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.5);
}

/* =========================================
   SETUP SCREEN
   ========================================= */
.setup-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-xl);
}

.setup-container {
  text-align: center;
  max-width: 500px;
  width: 100%;
}

.setup-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-xl);
  box-shadow: var(--shadow-glow);
}

.setup-icon svg {
  width: 40px;
  height: 40px;
  color: white;
}

.setup-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: var(--space-sm);
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.setup-subtitle {
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
  font-size: 0.95rem;
}

.setup-deps {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.dep-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-align: left;
  transition: all var(--transition-normal);
}

.dep-card.installed {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.05);
}

.dep-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dep-icon svg {
  width: 24px;
  height: 24px;
  color: var(--accent-primary);
}

.dep-info h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.dep-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.setup-progress {
  margin-bottom: var(--space-xl);
}

.progress-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: var(--space-sm);
  font-family: var(--font-mono);
}

/* =========================================
   HEADER
   ========================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 6, 11, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
}

.header-content {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
}

.logo-icon svg {
  width: 22px;
  height: 22px;
  color: white;
}

.logo-text h1 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}

.logo-badge {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.dep-indicators {
  display: flex;
  gap: var(--space-xs);
}

.indicator {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
}

.indicator svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.indicator.ready svg {
  color: var(--accent-green);
}

.indicator.ready {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.08);
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
  position: relative;
  padding: var(--space-3xl) 0 var(--space-2xl);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-hero);
  pointer-events: none;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

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

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: var(--space-2xl);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- URL Input ---------- */
.url-input-wrapper {
  max-width: 640px;
  margin: 0 auto;
}

.url-input-group {
  display: flex;
  align-items: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 6px;
  transition: all var(--transition-normal);
  backdrop-filter: blur(10px);
}

.url-input-group:focus-within {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

.url-input-icon {
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
}

.url-input-icon svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}

.url-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  padding: var(--space-md) 0;
  min-width: 0;
}

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

.btn-fetch {
  border-radius: var(--radius-md) !important;
  padding: var(--space-md) var(--space-xl) !important;
  flex-shrink: 0;
}

/* Platform Badges */
.platform-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
}

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

.platform-badge.youtube:hover { color: var(--youtube); border-color: rgba(255, 0, 0, 0.3); }
.platform-badge.tiktok:hover  { color: var(--tiktok); border-color: rgba(0, 242, 234, 0.3); }
.platform-badge.instagram:hover { color: var(--instagram); border-color: rgba(228, 64, 95, 0.3); }
.platform-badge.facebook:hover { color: var(--facebook); border-color: rgba(24, 119, 242, 0.3); }
.platform-badge.twitter:hover { color: var(--twitter); border-color: rgba(29, 161, 242, 0.3); }

/* =========================================
   GLASS CARD
   ========================================= */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.glass-card:hover {
  border-color: var(--border-color-hover);
}

/* =========================================
   LOADING
   ========================================= */
.loading-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-2xl);
  margin-top: var(--space-xl);
}

.loading-card p {
  color: var(--text-secondary);
}

.loader {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-primary);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

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

/* =========================================
   PREVIEW SECTION
   ========================================= */
.preview-card {
  margin-top: var(--space-xl);
  animation: slideUp 0.4s ease;
}

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

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--border-color);
}

.preview-header h3 {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1rem;
  font-weight: 600;
}

.preview-header h3 svg {
  width: 18px;
  height: 18px;
  color: var(--accent-primary);
}

.preview-body {
  display: flex;
  gap: var(--space-xl);
  padding: var(--space-xl);
}

.preview-thumbnail {
  position: relative;
  flex-shrink: 0;
  width: 280px;
  aspect-ratio: 16/9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-tertiary);
}

.preview-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

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

.preview-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.preview-uploader {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: var(--space-lg);
}

.preview-uploader svg {
  width: 14px;
  height: 14px;
}

/* Download Options */
.download-options {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.option-group {
  flex: 1;
}

.option-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}

.select {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 32px;
  transition: all var(--transition-normal);
}

.select:hover {
  border-color: var(--border-color-hover);
}

.select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.preview-actions {
  display: flex;
  gap: var(--space-sm);
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.5;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5);
  filter: brightness(1.1);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-color-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

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

.btn-sm {
  font-size: 0.8rem;
  padding: var(--space-xs) var(--space-md);
}

.btn-sm svg {
  width: 14px;
  height: 14px;
}

.btn-lg {
  padding: var(--space-md) var(--space-2xl);
  font-size: 1rem;
  border-radius: var(--radius-md);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

/* =========================================
   BADGES
   ========================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-pending {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-success {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-error {
  background: rgba(239, 68, 68, 0.12);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-info {
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.badge-youtube { background: rgba(255, 0, 0, 0.12); color: var(--youtube); border: 1px solid rgba(255, 0, 0, 0.2); }
.badge-tiktok { background: rgba(0, 242, 234, 0.12); color: var(--tiktok); border: 1px solid rgba(0, 242, 234, 0.2); }
.badge-instagram { background: rgba(228, 64, 95, 0.12); color: var(--instagram); border: 1px solid rgba(228, 64, 95, 0.2); }
.badge-facebook { background: rgba(24, 119, 242, 0.12); color: var(--facebook); border: 1px solid rgba(24, 119, 242, 0.2); }
.badge-twitter { background: rgba(29, 161, 242, 0.12); color: var(--twitter); border: 1px solid rgba(29, 161, 242, 0.2); }

/* =========================================
   PROGRESS BAR
   ========================================= */
.progress-bar-container {
  width: 100%;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: var(--gradient-accent);
  border-radius: 4px;
  transition: width 0.3s ease;
  position: relative;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* =========================================
   TABS
   ========================================= */
.tabs-section {
  margin-top: var(--space-2xl);
  padding-bottom: var(--space-3xl);
}

.tabs {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
  background: var(--bg-glass);
  border-radius: var(--radius-md);
  padding: 4px;
  border: 1px solid var(--border-color);
}

.tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.tab svg {
  width: 16px;
  height: 16px;
}

.tab:hover {
  color: var(--text-secondary);
  background: var(--bg-glass);
}

.tab.active {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.tab-count {
  background: var(--bg-tertiary);
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.tab.active .tab-count {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tab-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: var(--space-md);
}

/* =========================================
   JOB / QUEUE ITEMS
   ========================================= */
.jobs-list, .history-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.job-item, .history-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
}

.job-item:hover, .history-item:hover {
  border-color: var(--border-color-hover);
  background: var(--bg-card-hover);
}

.job-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-tertiary);
}

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

.job-icon.downloading svg { color: var(--accent-cyan); }
.job-icon.converting svg { color: var(--accent-amber); }
.job-icon.completed svg { color: var(--accent-green); }
.job-icon.failed svg { color: var(--accent-red); }
.job-icon.pending svg { color: var(--text-muted); }

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

.job-title {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.job-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.job-progress {
  width: 140px;
  flex-shrink: 0;
}

.job-progress-text {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-align: right;
  margin-bottom: 4px;
  font-family: var(--font-mono);
}

.job-actions {
  display: flex;
  gap: var(--space-xs);
  flex-shrink: 0;
}

/* =========================================
   EMPTY STATE
   ========================================= */
.empty-state {
  text-align: center;
  padding: var(--space-3xl);
  color: var(--text-muted);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-md);
  opacity: 0.3;
}

.empty-state p {
  font-size: 0.9rem;
}

/* =========================================
   TOAST NOTIFICATIONS
   ========================================= */
.toast-container {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  display: flex;
  flex-direction: column-reverse;
  gap: var(--space-sm);
  z-index: 1000;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
  pointer-events: all;
  animation: toastIn 0.3s var(--transition-spring);
  max-width: 360px;
}

.toast.hide {
  animation: toastOut 0.3s ease forwards;
}

.toast svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.toast.success { border-color: rgba(16, 185, 129, 0.3); }
.toast.success svg { color: var(--accent-green); }
.toast.error { border-color: rgba(239, 68, 68, 0.3); }
.toast.error svg { color: var(--accent-red); }
.toast.info { border-color: rgba(99, 102, 241, 0.3); }
.toast.info svg { color: var(--accent-primary); }

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateX(40px) scale(0.95);
  }
}

/* =========================================
   ANIMATIONS
   ========================================= */
.spin {
  animation: spin 3s linear infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .url-input-group {
    flex-direction: column;
    background: transparent;
    border: none;
    padding: 0;
    gap: 8px;
    backdrop-filter: none;
  }

  .url-input {
    width: 100%;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
  }

  .btn-fetch {
    width: 100%;
    margin-top: 0;
    padding: 12px;
    border-radius: var(--radius-md);
  }

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

  .preview-body {
    flex-direction: column;
  }

  .preview-thumbnail {
    width: 100%;
  }

  .download-options {
    flex-direction: column;
  }

  .preview-actions {
    flex-direction: column;
  }

  .preview-actions .btn {
    width: 100%;
  }

  .job-progress {
    width: 80px;
  }

  .platform-badges {
    gap: 4px;
  }

  .toast-container {
    left: var(--space-md);
    right: var(--space-md);
    bottom: var(--space-md);
  }

  .toast {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.5rem;
  }

  .container {
    padding: 0 var(--space-md);
  }

  .header-content {
    padding: var(--space-sm) var(--space-md);
  }

  .logo-text h1 {
    font-size: 1rem;
  }

  .job-item, .history-item {
    padding: var(--space-sm) var(--space-md);
  }

  .job-progress {
    display: none;
  }
}

/* =========================================
   SEO CONTENT SECTIONS
   ========================================= */
.seo-section {
  margin-top: var(--space-3xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--border-color);
}

.seo-title {
  font-size: 1.8rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.seo-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: var(--space-2xl);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- HOW IT WORKS — Steps Grid ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.step-card {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  position: relative;
  transition: all var(--transition-normal);
}

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

.step-number {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

.step-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
}

.step-icon svg {
  width: 26px;
  height: 26px;
  color: var(--accent-primary);
}

.step-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.step-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---------- PLATFORM CARDS ---------- */
.platforms-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.platform-card {
  padding: var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
}

.platform-card:hover {
  border-color: var(--border-color-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.platform-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  border: 1px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

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

.platform-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.platform-card > p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.platform-features {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xs) var(--space-md);
}

.platform-features li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.platform-features li svg {
  width: 14px;
  height: 14px;
  color: var(--accent-green);
  flex-shrink: 0;
}

/* ---------- FEATURES GRID ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.feature-item {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
}

.feature-item:hover {
  border-color: var(--border-accent);
  background: var(--bg-glass-hover);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  color: var(--accent-primary);
}

.feature-item h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.feature-item p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---------- FAQ ACCORDION ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-normal);
}

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

.faq-item[open] {
  border-color: var(--border-accent);
}

.faq-question {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  list-style: none;
  user-select: none;
  transition: background var(--transition-normal);
}

.faq-question:hover {
  background: var(--bg-glass);
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question > svg:first-child {
  width: 18px;
  height: 18px;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.faq-question > span {
  flex: 1;
}

.faq-chevron {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform var(--transition-normal);
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 var(--space-lg) var(--space-lg) calc(var(--space-lg) + 26px);
  animation: fadeIn 0.3s ease;
}

.faq-answer p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  margin-top: var(--space-3xl);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-content {
  display: flex;
  gap: var(--space-3xl);
  margin-bottom: var(--space-2xl);
}

.footer-brand {
  flex: 1.2;
  min-width: 0;
}

.footer-brand .logo {
  margin-bottom: var(--space-md);
}

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

.logo-icon-sm svg {
  width: 18px;
  height: 18px;
}

.footer-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 320px;
}

.footer-links {
  display: flex;
  gap: var(--space-2xl);
  flex: 1;
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: var(--space-sm);
}

.footer-col a {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--text-accent);
}

.footer-bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-disclaimer {
  margin-top: var(--space-xs);
  font-size: 0.72rem !important;
  color: var(--text-muted);
  opacity: 0.7;
}

/* =========================================
   RESPONSIVE — SEO SECTIONS
   ========================================= */
@media (max-width: 768px) {
  .seo-title {
    font-size: 1.4rem;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .step-card {
    text-align: left;
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
    padding: var(--space-lg);
  }

  .step-card .step-number {
    position: static;
    transform: none;
    flex-shrink: 0;
  }

  .step-card .step-icon {
    display: none;
  }

  .platforms-grid {
    grid-template-columns: 1fr;
  }

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

  .platform-features {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    gap: var(--space-xl);
  }

  .footer-links {
    flex-wrap: wrap;
    gap: var(--space-xl);
  }
}

@media (max-width: 480px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .footer-links {
    flex-direction: column;
  }

  .seo-title {
    font-size: 1.2rem;
  }
}
