/* Dual Subtitles — Language Learning Player Stylesheet */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --cinema-bg: #0b0f19;
  --cinema-surface: #131a2a;
  --cinema-border: #24304a;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --amber: #f59e0b;
  --cyan: #06b6d4;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(2, 6, 23, 0.35);
  --max-w: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand img {
  border-radius: 8px;
  display: block;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.94rem;
  font-weight: 500;
}
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
  text-decoration: none !important;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary {
  background: var(--surface);
  color: var(--text) !important;
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--surface-alt); }
.btn-sm { padding: 9px 15px; font-size: 0.88rem; }

/* Hero */
.hero {
  background: radial-gradient(circle at 80% 10%, rgba(37, 99, 235, 0.12), transparent 45%),
              radial-gradient(circle at 15% 85%, rgba(245, 158, 11, 0.1), transparent 45%),
              #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 64px 0 72px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr 1.08fr;
  gap: 44px;
  align-items: center;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 18px;
}
.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 3.6vw, 2.95rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--text);
}
h2 {
  margin: 0 0 12px;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
}
h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.lead {
  font-size: 1.08rem;
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 60ch;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 500;
}
.trust-strip span::before {
  content: "✓ ";
  color: #16a34a;
  font-weight: 700;
}

/* Interactive Cinema Player Demo */
.cinema-card {
  background: var(--cinema-bg);
  color: #f8fafc;
  border-radius: 18px;
  border: 1px solid var(--cinema-border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.cinema-topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--cinema-surface);
  border-bottom: 1px solid var(--cinema-border);
}
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.demo-pill {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}
.demo-pill:hover { background: rgba(255, 255, 255, 0.13); color: #fff; }
.demo-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.hotkey-btn {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 5px 10px;
  border-radius: 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}
.cinema-stage {
  position: relative;
  padding: 22px 20px 18px;
  min-height: 295px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: radial-gradient(circle at 50% 25%, #1e293b 0%, #090d16 78%);
}
.stage-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.pause-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.38);
  font-weight: 600;
}
.word-popover {
  align-self: flex-start;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  padding: 12px 14px;
  max-width: 340px;
  margin: 12px 0;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}
.word-popover-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.word-title { font-weight: 700; font-size: 1rem; color: #ffffff; }
.word-ipa {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  color: #93c5fd;
}
.word-def { font-size: 0.84rem; color: #cbd5e1; margin: 0 0 8px; line-height: 1.45; }
.word-actions {
  display: flex;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
}
.word-chip {
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.24);
  color: #bfdbfe;
  border: 1px solid rgba(59, 130, 246, 0.4);
}
.subtitle-stack {
  text-align: center;
  padding: 12px 14px;
  border-radius: 10px;
  transition: all 0.18s ease;
}
.subtitle-stack.preset-amber {
  background: rgba(10, 10, 12, 0.82);
  border: 1px solid rgba(245, 158, 11, 0.38);
}
.subtitle-stack.preset-amber .sub-primary { color: #fde68a; }
.subtitle-stack.preset-amber .sub-secondary { color: #e2e8f0; }

.subtitle-stack.preset-sapphire {
  background: rgba(2, 6, 23, 0.92);
  border: 1px solid rgba(59, 130, 246, 0.45);
}
.subtitle-stack.preset-sapphire .sub-primary { color: #f8fafc; }
.subtitle-stack.preset-sapphire .sub-secondary { color: #93c5fd; }

.subtitle-stack.preset-neon {
  background: rgba(9, 13, 28, 0.9);
  border: 1px solid rgba(6, 182, 212, 0.55);
}
.subtitle-stack.preset-neon .sub-primary { color: #22d3ee; }
.subtitle-stack.preset-neon .sub-secondary { color: #facc15; }

.subtitle-stack.preset-contrast {
  background: #000000;
  border: 2px solid #ffffff;
}
.subtitle-stack.preset-contrast .sub-primary { color: #ffffff; font-weight: 700; }
.subtitle-stack.preset-contrast .sub-secondary { color: #fde047; font-weight: 600; }

.sub-primary {
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.4;
}
.sub-secondary {
  font-size: 0.88rem;
  line-height: 1.4;
}
.sub-word {
  background: rgba(245, 158, 11, 0.25);
  color: inherit;
  border-bottom: 2px solid #f59e0b;
  border-radius: 4px;
  padding: 0 3px;
  cursor: pointer;
}
.cinema-controls {
  padding: 12px 16px;
  background: var(--cinema-surface);
  border-top: 1px solid var(--cinema-border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: #cbd5e1;
}
.sync-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.sync-wrap input[type="range"] {
  width: 110px;
  accent-color: var(--amber);
}

/* Sections & Grids */
.section {
  padding: 64px 0;
}
.section-alt {
  background: #ffffff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-header {
  max-width: 68ch;
  margin-bottom: 34px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
}
.card p { color: var(--muted); margin: 0; font-size: 0.94rem; }
.card-tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: #eff6ff;
  padding: 3px 9px;
  border-radius: 6px;
  margin-bottom: 12px;
}

/* Specs / Anki Strip */
.spec-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.spec-box {
  background: var(--cinema-bg);
  color: #f8fafc;
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--cinema-border);
}
.spec-num {
  font-size: 1.55rem;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.spec-label { font-size: 0.86rem; color: #cbd5e1; }

/* Article / Cluster Pages */
.article-hero {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 44px 0 40px;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--muted);
}
.breadcrumbs li + li::before {
  content: "/";
  margin-right: 8px;
  color: #94a3b8;
}
.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 36px;
  padding: 44px 24px 68px;
  align-items: start;
}
.article-prose section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 22px;
}
.article-prose p { color: var(--muted); margin: 0 0 14px; }
.article-prose p:last-child { margin-bottom: 0; }

.sub-preview-card {
  margin-top: 18px;
  background: var(--cinema-bg);
  color: #f8fafc;
  border-radius: 12px;
  padding: 18px 20px;
  border: 1px solid var(--cinema-border);
}
.sub-preview-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: #94a3b8;
  margin-bottom: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.sub-preview-orig {
  font-size: 1.08rem;
  font-weight: 600;
  color: #fde68a;
  margin-bottom: 6px;
}
.sub-preview-trans {
  font-size: 0.94rem;
  color: #e2e8f0;
  margin-bottom: 14px;
}
.sub-preview-dict {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 9px;
  padding: 11px 14px;
  font-size: 0.86rem;
  color: #cbd5e1;
}
.sub-preview-dict strong { color: #ffffff; }
.sub-preview-dict code {
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.22);
  padding: 2px 6px;
  border-radius: 5px;
  margin-left: 6px;
}

.steps-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}
.steps-list li { margin-bottom: 10px; }
.steps-list li:last-child { margin-bottom: 0; }
.steps-list strong { color: var(--text); }

.faq-item {
  padding: 16px 0;
  border-top: 1px solid var(--border);
}
.faq-item:first-of-type { border-top: 0; padding-top: 4px; }
.faq-item h3 { font-size: 1.03rem; margin-bottom: 6px; }
.faq-item p { margin: 0; font-size: 0.94rem; }

/* Sidebar */
.article-aside {
  position: sticky;
  top: 86px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.aside-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.aside-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}
.aside-list li {
  padding: 8px 0;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  line-height: 1.4;
}
.aside-list li:first-child { border-top: 0; padding-top: 0; }

/* Hub Silos */
.silo-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.silo-jump a {
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border);
}
.silo-jump a:hover { background: #e2e8f0; text-decoration: none; }
.silo-block {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}
.silo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 18px;
}
.silo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
}
.silo-card a {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--text);
}
.silo-card a:hover { color: var(--accent); }
.silo-card p { margin: 0; font-size: 0.88rem; color: var(--muted); }

kbd {
  display: inline-block;
  padding: 2px 6px;
  font-size: 0.82rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--surface-alt);
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  color: var(--text);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 36px 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.footer-disclaimer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: #64748b;
}

@media (max-width: 960px) {
  .hero-grid, .article-grid, .feature-grid, .silo-grid, .spec-strip {
    grid-template-columns: 1fr;
  }
  .article-aside { position: static; }
  .nav-links a.hide-sm { display: none; }
}
