/* ============================================================
   Ywdown — Modern Dark Design (v4)
   Dark theme with cyan→purple gradient. Unique look, NOT a copy of vd6s.
   ============================================================ */

:root {
  /* Dark theme with cyan/purple accent (default) */
  --bg: #0a0e1a;
  --bg-alt: #0f1424;
  --bg-card: #161b2e;
  --bg-elev: #1c2238;
  --bg-glass: rgba(10, 14, 26, 0.7);

  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --border: #1f2740;
  --border-strong: #2a3454;

  --primary: #06b6d4;        /* cyan-500 */
  --primary-hover: #0891b2;
  --primary-light: #155e75;
  --primary-soft: rgba(6, 182, 212, 0.12);
  --primary-glow: rgba(6, 182, 212, 0.4);

  --secondary: #a855f7;      /* purple-500 */
  --secondary-soft: rgba(168, 85, 247, 0.15);

  --accent: #f97316;
  --success: #10b981;
  --danger: #ef4444;

  --gradient-1: linear-gradient(135deg, #06b6d4 0%, #a855f7 100%);
  --gradient-2: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  --gradient-hero: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(6, 182, 212, 0.15), transparent 70%),
                   radial-gradient(ellipse 60% 50% at 80% 10%, rgba(168, 85, 247, 0.12), transparent 70%);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 50px -10px rgba(6, 182, 212, 0.2), 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(6, 182, 212, 0.3);

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  --container: 1180px;
  --container-narrow: 760px;
  --header-h: 68px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

[data-theme="light"] {
  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --bg-card: #ffffff;
  --bg-elev: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.7);

  --text: #0f172a;
  --text-muted: #475569;
  --text-subtle: #94a3b8;

  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --primary: #0891b2;
  --primary-hover: #0e7490;
  --primary-light: #cffafe;
  --primary-soft: rgba(8, 145, 178, 0.08);
  --primary-glow: rgba(8, 145, 178, 0.25);

  --secondary: #9333ea;
  --secondary-soft: rgba(147, 51, 234, 0.1);

  --gradient-hero: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(8, 145, 178, 0.1), transparent 70%),
                   radial-gradient(ellipse 60% 50% at 80% 10%, rgba(147, 51, 234, 0.08), transparent 70%);

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 30px -5px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 20px 50px -10px rgba(8, 145, 178, 0.15), 0 10px 30px rgba(15, 23, 42, 0.08);
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; height: auto; display: block; }
button, input { font: inherit; }

::selection { background: var(--primary); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; top: -100px; left: 16px;
  background: var(--primary); color: #fff;
  padding: 10px 18px; border-radius: var(--radius-xs);
  z-index: 9999; font-weight: 600; font-size: 14px;
  transition: top 0.3s;
}
.skip-link:focus { top: 16px; }

/* ---------- Container ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }

.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); gap: 20px;
}

.brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 800; font-size: 19px; letter-spacing: -0.02em;
  color: var(--text); text-decoration: none; flex-shrink: 0;
}
.brand:hover { color: var(--primary); }
.brand-mark {
  width: 38px; height: 38px;
  background: var(--gradient-1);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; font-weight: 800;
  box-shadow: 0 4px 12px var(--primary-glow);
  transition: transform 0.3s;
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.05); }

.nav-links {
  display: flex; align-items: center; gap: 2px;
  list-style: none;
  background: var(--bg-alt);
  padding: 5px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}
.nav-links a {
  color: var(--text-muted); font-weight: 500; font-size: 14px;
  padding: 8px 14px; border-radius: var(--radius-full);
  transition: all 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--bg-elev); }
.nav-links a.active {
  color: var(--text); background: var(--bg-elev);
  box-shadow: var(--shadow-xs);
}

.nav-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text-muted); border-radius: var(--radius-full);
  cursor: pointer; transition: all 0.2s;
}
.icon-btn:hover {
  border-color: var(--primary); color: var(--primary);
  transform: translateY(-1px);
}
.icon-btn svg { width: 18px; height: 18px; }

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

.menu-toggle { display: none; }

/* ---------- Mobile Drawer ---------- */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
  z-index: 1100;
}
.drawer-backdrop.open { opacity: 1; visibility: visible; }

.mobile-drawer {
  position: fixed; top: 0; right: 0;
  width: 300px; max-width: 85vw; height: 100vh;
  background: var(--bg-card); border-left: 1px solid var(--border);
  padding: 24px; z-index: 1200;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-md);
  overflow-y: auto;
}
.mobile-drawer.open { transform: translateX(0); }
.drawer-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.drawer-title { font-weight: 700; font-size: 18px; }
.drawer-nav { list-style: none; }
.drawer-nav a {
  display: block; padding: 14px 16px; color: var(--text);
  font-weight: 600; border-radius: var(--radius-sm);
  transition: all 0.2s; margin-bottom: 4px;
}
.drawer-nav a:hover { background: var(--primary-soft); color: var(--primary); transform: translateX(4px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 96px 0 64px;
  text-align: center;
  background: var(--gradient-hero), var(--bg);
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, var(--border) 1px, transparent 0);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, #000, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, #000, transparent 70%);
  opacity: 0.5; pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-full);
  font-size: 12.5px; font-weight: 600; color: var(--text-muted);
  margin-bottom: 24px; box-shadow: var(--shadow-xs);
  position: relative; z-index: 1;
}
.hero-eyebrow .pulse {
  width: 8px; height: 8px; background: var(--success);
  border-radius: 50%; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.hero h1 {
  font-size: clamp(36px, 6.5vw, 60px);
  font-weight: 800; letter-spacing: -0.035em;
  line-height: 1.08; margin-bottom: 20px;
  position: relative; z-index: 1;
}
.hero h1 .gradient {
  background: var(--gradient-1);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-muted); max-width: 660px; margin: 0 auto 32px;
  line-height: 1.6; position: relative; z-index: 1;
}

/* ---------- Search Form ---------- */
.search-form {
  position: relative; z-index: 5;
  background: var(--bg-card);
  max-width: 720px; margin: 0 auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 8px;
  display: flex; align-items: center; gap: 8px;
}
.search-form .input-wrap { flex: 1; position: relative; }
.search-form .input-icon {
  position: absolute; top: 50%; left: 18px;
  transform: translateY(-50%);
  width: 20px; height: 20px;
  color: var(--text-subtle);
  pointer-events: none;
}
.search-form input[type="text"] {
  width: 100%; height: 52px;
  padding: 0 16px 0 50px;
  border: 0; background: transparent;
  color: var(--text); font-size: 15.5px;
  outline: none;
}
.search-form input[type="text"]::placeholder { color: var(--text-subtle); }
.search-form button[type="submit"] {
  flex-shrink: 0;
  height: 52px; padding: 0 24px;
  background: var(--gradient-1);
  color: #fff; border: 0; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 14.5px;
  cursor: pointer; transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 12px var(--primary-glow);
}
.search-form button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px var(--primary-glow);
}
.search-form button[type="submit"]:active { transform: translateY(0); }
.search-form button[type="submit"] svg { width: 18px; height: 18px; }

.form-hint {
  margin-top: 16px; font-size: 13px;
  color: var(--text-subtle); text-align: center;
  position: relative; z-index: 1;
}
.form-hint svg { width: 14px; height: 14px; vertical-align: middle; margin-right: 4px; }

/* ---------- Captcha ---------- */
.captcha-box {
  max-width: 720px; margin: 24px auto 0;
  padding: 20px; text-align: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: none;
}
.captcha-box.active { display: block; }
.captcha-box p { color: var(--text-muted); font-size: 14px; margin-bottom: 12px; }
.captcha-container { display: flex; justify-content: center; }

/* ---------- Results ---------- */
.results-wrap {
  max-width: 920px; margin: 40px auto 0; padding: 0 24px;
}
.results-status {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; padding: 40px 20px;
  color: var(--text-muted); font-size: 15px;
}
.loader {
  width: 20px; height: 20px;
  border: 2.5px solid var(--border-strong);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  padding: 28px 24px; text-align: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--text-muted);
  font-size: 14.5px;
}
.empty-state strong { display: block; color: var(--text); margin-bottom: 6px; font-size: 16px; }

/* ---------- Video Card ---------- */
.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  animation: cardIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.video-card__header {
  display: flex; gap: 16px; padding: 20px;
  border-bottom: 1px solid var(--border);
}
.video-card__thumb {
  flex-shrink: 0;
  width: 180px; height: 100px;
  border-radius: var(--radius-sm);
  overflow: hidden; background: var(--bg-alt);
  position: relative;
}
.video-card__thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.3s;
}
.video-card__thumb:hover img { transform: scale(1.05); }
.video-card__thumb-overlay {
  position: absolute; bottom: 6px; right: 6px;
  background: rgba(0,0,0,0.85); color: #fff;
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 4px;
}
.video-card__info { flex: 1; min-width: 0; }
.video-card__title {
  font-size: 17px; font-weight: 700; line-height: 1.35;
  margin-bottom: 8px; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.video-card__meta {
  display: flex; flex-wrap: wrap; gap: 6px 10px;
  color: var(--text-subtle); font-size: 12.5px;
  align-items: center;
}
.video-card__meta span { display: inline-flex; align-items: center; gap: 4px; }
.video-card__meta .dot { width: 3px; height: 3px; background: var(--text-subtle); border-radius: 50%; }

/* ---------- Tabs ---------- */
.video-card__body { padding: 0; }
.tabs {
  display: flex; padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  gap: 4px; overflow-x: auto;
}
.tab {
  background: transparent; border: 0;
  color: var(--text-muted); font-weight: 600; font-size: 14px;
  padding: 14px 18px; cursor: pointer;
  position: relative; transition: color 0.2s;
  white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); }
.tab.active::after {
  content: ''; position: absolute;
  left: 18px; right: 18px; bottom: -1px;
  height: 2.5px; background: var(--gradient-1);
  border-radius: 2px 2px 0 0;
}

/* ---------- Format Rows ---------- */
.format-list { padding: 16px 20px; display: flex; flex-direction: column; gap: 8px; }
.format-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); transition: all 0.2s;
}
.format-row:hover { border-color: var(--primary); background: var(--bg-elev); }
.format-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.format-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 50px; height: 26px;
  background: var(--primary-soft); color: var(--primary);
  border-radius: 6px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em; padding: 0 8px;
}
.format-badge.audio { background: var(--primary-soft); color: var(--primary); }
.format-badge.video { background: var(--secondary-soft); color: var(--secondary); }
.format-meta { font-size: 13.5px; line-height: 18px; }
.format-meta strong { color: var(--text); font-weight: 700; }
.format-meta .file-size { color: var(--text-subtle); font-size: 12px; display: block; }

.btn-download {
  flex-shrink: 0;
  background: var(--gradient-1);
  color: #fff; border: 0; border-radius: var(--radius-sm);
  padding: 10px 18px; font-size: 13.5px; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 6px;
  box-shadow: 0 4px 12px var(--primary-glow);
}
.btn-download:hover { transform: translateY(-1px); box-shadow: 0 8px 20px var(--primary-glow); }
.btn-download:active { transform: translateY(0); }
.btn-download.is-loading { background: var(--text-subtle); pointer-events: none; box-shadow: none; }
.btn-download.is-success { background: var(--success); pointer-events: none; box-shadow: none; }
.btn-download.is-error { background: var(--danger); box-shadow: none; }
.btn-download svg { width: 14px; height: 14px; }

/* ---------- Thumbnail Tab ---------- */
.thumbnail-grid {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.thumb-card {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; background: var(--bg);
  transition: all 0.2s; cursor: pointer;
  display: block; text-decoration: none; color: inherit;
}
.thumb-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.thumb-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.thumb-card-body { padding: 8px 12px; }
.thumb-card-quality { font-size: 12px; font-weight: 700; color: var(--primary); }
.thumb-card-size { font-size: 11px; color: var(--text-subtle); }

/* ---------- Trim Tab ---------- */
.trim-section { padding: 20px; }
.trim-section label { font-size: 13px; font-weight: 600; color: var(--text); display: block; margin-bottom: 6px; }
.trim-inputs { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.trim-field { flex: 1; min-width: 120px; }
.trim-field input {
  width: 100%; height: 42px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); font-size: 14px;
  outline: none; transition: border-color 0.2s;
}
.trim-field input:focus { border-color: var(--primary); }
.trim-hint { font-size: 12px; color: var(--text-subtle); margin-top: 4px; }
.trim-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- Ad Slots ---------- */
.ad-slot {
  margin: 32px auto; max-width: 920px;
  padding: 0 24px; text-align: center;
}
.ad-slot-label {
  font-size: 11px; color: var(--text-subtle);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 8px; font-weight: 700;
}
.ad-banner {
  min-height: 250px; background: var(--bg-alt);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-subtle); font-size: 13px;
}
.ad-leaderboard { min-height: 90px; }

/* ---------- Features Section ---------- */
.features {
  padding: 80px 0 40px;
  max-width: var(--container); margin: 0 auto;
  padding-left: 24px; padding-right: 24px;
}
.section-title {
  font-size: clamp(28px, 4vw, 40px); font-weight: 800;
  letter-spacing: -0.025em; text-align: center; margin-bottom: 16px;
  line-height: 1.1;
}
.section-subtitle {
  text-align: center; color: var(--text-muted); font-size: 16px;
  max-width: 600px; margin: 0 auto 48px;
}
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 28px 24px;
  transition: all 0.3s; position: relative; overflow: hidden;
}
.feature-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px; background: var(--gradient-1);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s;
}
.feature-card:hover::before { transform: scaleX(1); }
.feature-card:hover {
  border-color: var(--primary); box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.feature-icon {
  width: 48px; height: 48px;
  background: var(--primary-soft); color: var(--primary);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.feature-icon svg { width: 24px; height: 24px; }
.feature-card h3 {
  font-size: 18px; font-weight: 700; margin-bottom: 8px;
  color: var(--text); letter-spacing: -0.01em;
}
.feature-card p {
  color: var(--text-muted); font-size: 14.5px; line-height: 1.6;
}

/* ---------- Steps Section ---------- */
.steps {
  padding: 60px 0 80px;
  background: var(--bg-alt);
}
.steps-wrap {
  max-width: var(--container); margin: 0 auto;
  padding: 0 24px;
}
.steps-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px; margin-top: 48px;
}
.step-card {
  text-align: center; position: relative;
}
.step-num {
  width: 56px; height: 56px;
  background: var(--gradient-1);
  color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800;
  margin: 0 auto 16px; box-shadow: 0 4px 12px var(--primary-glow);
}
.step-card h3 {
  font-size: 17px; font-weight: 700; margin-bottom: 8px;
  color: var(--text);
}
.step-card p {
  color: var(--text-muted); font-size: 14px; line-height: 1.6;
}

/* ---------- FAQ Section ---------- */
.faq-section {
  max-width: var(--container-narrow); margin: 80px auto; padding: 0 24px;
}
.faq-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 12px;
  overflow: hidden;
}
.faq-item summary {
  padding: 18px 22px; cursor: pointer; font-weight: 600;
  color: var(--text); font-size: 15.5px;
  list-style: none; display: flex;
  justify-content: space-between; align-items: center;
  transition: background 0.2s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--bg-alt); }
.faq-item summary::after {
  content: '+'; font-size: 22px; color: var(--primary);
  font-weight: 400; transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  padding: 0 22px 18px;
  color: var(--text-muted); font-size: 14.5px; line-height: 1.7;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-alt); border-top: 1px solid var(--border);
  padding: 60px 0 24px; margin-top: 80px;
}
.footer-grid {
  max-width: var(--container); margin: 0 auto;
  padding: 0 24px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}
.footer-brand .brand { color: var(--text); margin-bottom: 14px; }
.footer-brand p { color: var(--text-muted); font-size: 14px; max-width: 340px; line-height: 1.7; }
.footer-col h4 {
  color: var(--text); font-size: 14px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--text-muted); font-size: 14px; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  max-width: var(--container); margin: 0 auto;
  padding: 24px 24px 0;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  color: var(--text-subtle); font-size: 13px;
}

/* ---------- Anti-AdBlock Overlay ---------- */
.adblock-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
}
.adblock-overlay.active { display: flex; }
.adblock-modal {
  background: var(--bg-card); border-radius: var(--radius-md);
  max-width: 460px; padding: 36px 28px;
  text-align: center; box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.adblock-modal svg { width: 64px; height: 64px; color: var(--primary); margin-bottom: 16px; }
.adblock-modal h2 {
  font-size: 22px; font-weight: 800; margin-bottom: 12px;
  color: var(--text);
}
.adblock-modal p { color: var(--text-muted); font-size: 15px; line-height: 1.6; margin-bottom: 20px; }
.adblock-modal ol { text-align: left; color: var(--text-muted); font-size: 14px; line-height: 1.7; margin-bottom: 24px; padding-left: 20px; }
.adblock-modal button {
  background: var(--gradient-1); color: #fff;
  border: 0; padding: 12px 24px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 15px; cursor: pointer;
  transition: transform 0.2s;
}
.adblock-modal button:hover { transform: translateY(-1px); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .menu-toggle { display: inline-flex; }
  .hero { padding: 56px 0 40px; }
  .search-form { flex-direction: column; padding: 12px; }
  .search-form .input-wrap { width: 100%; }
  .search-form button[type="submit"] { width: 100%; }
  .video-card__header { flex-direction: column; }
  .video-card__thumb { width: 100%; height: auto; aspect-ratio: 16/9; }
  .format-row { flex-wrap: wrap; }
  .btn-download { width: 100%; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero h1 { font-size: 32px; }
  .features-grid, .steps-grid { grid-template-columns: 1fr; }
  .thumbnail-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
