/* ==========================================================================
   FlexTube — Modern CSS Design System & Theme Engine
   ========================================================================== */

:root {
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Dark Theme (Default) */
  --bg-primary: #0b0d13;
  --bg-secondary: #131722;
  --bg-tertiary: #1a202c;
  --card-bg: rgba(19, 23, 34, 0.75);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-hover: rgba(239, 68, 68, 0.35);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-red: #ef4444;
  --accent-red-hover: #dc2626;
  --accent-red-glow: rgba(239, 68, 68, 0.25);
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  
  --gradient-brand: linear-gradient(135deg, #ef4444 0%, #f43f5e 50%, #8b5cf6 100%);
  --gradient-glow: radial-gradient(circle at 50% 30%, rgba(239, 68, 68, 0.15) 0%, rgba(139, 92, 246, 0.05) 50%, transparent 80%);
  
  --input-bg: rgba(11, 13, 19, 0.85);
  --input-border: rgba(255, 255, 255, 0.12);
  --input-focus: #ef4444;
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 35px rgba(239, 68, 68, 0.25);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Overrides */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --card-bg: rgba(255, 255, 255, 0.9);
  --card-border: rgba(226, 232, 240, 0.8);
  --card-border-hover: rgba(239, 68, 68, 0.4);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --gradient-glow: radial-gradient(circle at 50% 30%, rgba(239, 68, 68, 0.1) 0%, rgba(139, 92, 246, 0.05) 50%, transparent 80%);
  
  --input-bg: #ffffff;
  --input-border: #cbd5e1;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 30px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 8px 30px rgba(239, 68, 68, 0.15);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

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

button, input, select {
  font-family: inherit;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background-color: rgba(11, 13, 19, 0.75);
  border-bottom: 1px solid var(--card-border);
  transition: var(--transition);
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.5px;
}

.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px var(--accent-red-glow);
}

.logo-icon svg {
  width: 18px;
  height: 18px;
  margin-left: 2px;
}

.logo-icon.small {
  width: 30px;
  height: 30px;
}

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

.badge-pro {
  font-size: 0.65rem;
  font-weight: 800;
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  margin-left: 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.btn-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--bg-tertiary);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

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

[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

/* ==========================================================================
   Hero Section & Downloader Card
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 70px 0 60px;
  text-align: center;
  overflow: hidden;
}

.hero-bg-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1200px;
  height: 550px;
  background: var(--gradient-glow);
  pointer-events: none;
  z-index: 0;
}

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

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-full);
  padding: 6px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.trust-pill .stars {
  color: #f59e0b;
  letter-spacing: 2px;
  font-size: 0.9rem;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 18px;
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
}

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

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

/* Downloader Card */
.downloader-card {
  max-width: 820px;
  margin: 0 auto;
  background: var(--card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transition: var(--transition);
}

.download-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--input-bg);
  border: 2px solid var(--input-border);
  border-radius: var(--radius-md);
  padding: 6px 10px 6px 14px;
  transition: var(--transition);
}

.input-wrapper:focus-within {
  border-color: var(--accent-red);
  box-shadow: 0 0 0 4px var(--accent-red-glow);
}

.platform-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: var(--transition);
}

.platform-icon-wrap svg {
  width: 22px;
  height: 22px;
}

/* Platform detection styling */
.platform-icon-wrap.youtube {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.platform-icon-wrap.tiktok {
  background: rgba(0, 242, 234, 0.15);
  color: #00f2fe;
}

.platform-icon-wrap.pinterest {
  background: rgba(220, 38, 38, 0.15);
  color: #e60023;
}

.url-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 12px 14px;
  font-size: 1.05rem;
  color: var(--text-primary);
  font-weight: 500;
  min-width: 0;
}

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

.paste-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

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

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

.clear-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 6px;
  font-size: 0.9rem;
  transition: var(--transition);
}

.clear-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--accent-red);
}

/* Controls Row */
.controls-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.format-group {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  padding: 4px 14px;
  transition: var(--transition);
}

.format-group:focus-within {
  border-color: var(--accent-red);
}

.control-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  margin-right: 10px;
}

.select-wrapper {
  flex: 1;
}

.format-select {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 0;
  cursor: pointer;
}

.format-select optgroup {
  background: var(--bg-secondary);
  color: var(--accent-red);
  font-weight: 700;
}

.format-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 500;
  padding: 8px;
}

.btn-convert {
  background: var(--gradient-brand);
  color: #ffffff;
  border: none;
  padding: 14px 34px;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 18px var(--accent-red-glow);
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-convert:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.45);
}

.btn-convert:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.btn-convert:hover .btn-arrow {
  transform: translateX(4px);
}

/* Quick Samples Pills */
.quick-samples {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.samples-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.sample-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

[data-theme="light"] .sample-chip {
  background: rgba(0, 0, 0, 0.03);
}

.sample-chip:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--text-primary);
  border-color: rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}

.sample-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.sample-chip .dot.yt { background: #ef4444; }
.sample-chip .dot.tt { background: #00f2fe; }
.sample-chip .dot.pin { background: #e60023; }

/* Conversion Progress State */
.conversion-status {
  margin-top: 26px;
  padding: 20px;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-md);
  text-align: left;
  animation: fadeIn 0.3s ease;
}

.status-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(239, 68, 68, 0.2);
  border-top-color: var(--accent-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.status-msg {
  flex: 1;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.status-percent {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-red);
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--gradient-brand);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.status-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Result Card */
.result-card {
  margin-top: 26px;
  display: flex;
  gap: 22px;
  padding: 22px;
  background: var(--bg-secondary);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-md);
  text-align: left;
  animation: fadeIn 0.4s ease;
}

.result-thumbnail-wrap {
  position: relative;
  width: 220px;
  height: 125px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: #000;
}

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

.result-thumbnail-wrap:hover .result-thumb {
  transform: scale(1.05);
}

.result-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.result-platform-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}

.result-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.result-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.result-author {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.result-meta-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.chip {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(239, 68, 68, 0.12);
  color: var(--accent-red);
}

.chip-dim {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

[data-theme="light"] .chip-dim {
  background: rgba(0, 0, 0, 0.06);
}

.chip-success {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
}

.result-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gradient-brand);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px var(--accent-red-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.4);
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-tertiary);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

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

.btn-ghost {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 12px;
  transition: var(--transition);
}

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

/* Media Players in Result */
.result-player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  border-radius: var(--radius-sm);
  z-index: 2;
}

.result-player-audio {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: rgba(0, 0, 0, 0.85);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

/* History Section */
.history-section {
  max-width: 820px;
  margin: 32px auto 0;
  text-align: left;
}

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

.history-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.clear-history-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.clear-history-btn:hover {
  color: var(--accent-red);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  transition: var(--transition);
}

.history-item:hover {
  border-color: rgba(239, 68, 68, 0.3);
}

.history-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.history-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
}

.history-title {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 480px;
}

.history-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ==========================================================================
   Platform Strip
   ========================================================================== */
.platform-strip {
  background: var(--bg-secondary);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  padding: 18px 0;
}

.strip-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.strip-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.strip-items {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.strip-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-tertiary);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.badge-icon {
  font-size: 0.95rem;
}

.badge-icon.yt { color: #ef4444; }
.badge-icon.tt { color: #00f2fe; }
.badge-icon.pin { color: #e60023; }
.badge-icon.ig { color: #e1306c; }
.badge-icon.tw { color: #1da1f2; }
.badge-icon.fb { color: #1877f2; }

/* ==========================================================================
   How It Works & Features
   ========================================================================== */
.section-heading {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 50px;
}

.sub-label {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-red);
  margin-bottom: 8px;
  display: block;
}

.section-heading h2 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 12px;
}

.section-heading p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.how-it-works, .features-section, .faq-section {
  padding: 90px 0;
}

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

.step-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: var(--transition);
}

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

.step-number {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 2rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .step-number {
  color: rgba(0, 0, 0, 0.05);
}

.step-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-red);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

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

.step-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
}

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

/* Features Grid */
.features-section {
  background: var(--bg-secondary);
}

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

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: var(--transition);
}

.feature-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 18px;
}

.feat-red { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.feat-blue { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.feat-purple { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.feat-green { background: rgba(34, 197, 94, 0.12); color: #22c55e; }
.feat-orange { background: rgba(249, 115, 22, 0.12); color: #f97316; }
.feat-cyan { background: rgba(6, 182, 212, 0.12); color: #06b6d4; }

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

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

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq-accordion {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.faq-item[open] {
  border-color: rgba(239, 68, 68, 0.3);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

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

.faq-question .chevron {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
  color: var(--text-muted);
}

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

.faq-answer {
  padding: 0 24px 22px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* CTA Banner */
.cta-banner {
  background: var(--bg-secondary);
  border-top: 1px solid var(--card-border);
  padding: 70px 0;
  text-align: center;
}

.cta-inner h2 {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.cta-inner p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 26px;
}

/* Footer */
.site-footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--card-border);
  padding-top: 70px;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 50px;
  padding-bottom: 50px;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 16px;
  max-width: 340px;
  line-height: 1.6;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.footer-links .col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--text-primary);
}

.footer-links .col a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 10px;
  transition: var(--transition);
}

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

.footer-bottom {
  border-top: 1px solid var(--card-border);
  padding: 24px 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Toast System */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.3s ease;
}

.toast.toast-error {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.15);
  color: #ff9aa4;
}

.toast.toast-success {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}

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

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

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Responsive Media Queries */
@media (max-width: 900px) {
  .hero-title { font-size: 2.5rem; }
  .steps-grid, .features-grid { grid-template-columns: 1fr; }
  .footer-content { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hero-title { font-size: 2.1rem; }
  .nav-links { display: none; }
  .controls-row { flex-direction: column; align-items: stretch; }
  .btn-convert { width: 100%; justify-content: center; }
  .result-card { flex-direction: column; }
  .result-thumbnail-wrap { width: 100%; height: 180px; }
  .result-actions { flex-direction: column; width: 100%; }
  .result-actions a, .result-actions button { width: 100%; justify-content: center; }
  .downloader-card { padding: 20px 16px; }
  .footer-links { grid-template-columns: 1fr; }
}
