/* ============================================================
   Netflix Speed Controller — Changelog site
   Netflix-style dark theme, no external dependencies
   ============================================================ */

:root {
  --bg: #141414;
  --bg-elevated: #1a1a1a;
  --bg-card: #1e1e1e;
  --border: #2b2b2b;
  --text: #e5e5e5;
  --text-dim: #999;
  --text-faint: #666;
  --accent: #e50914;
  --accent-hover: #f6121d;
  --green: #46d369;
  --blue: #5b9cf5;
  --yellow: #f5c542;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- Header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 20, 20, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  flex-shrink: 0;
}

.brand-text {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.2px;
}

.header-nav {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-link {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.nav-link:hover {
  color: var(--text);
  border-color: var(--border);
}

.nav-link.nav-current {
  color: #fff;
  background: var(--accent);
}

/* ---------------- Hero ---------------- */

.hero {
  padding: 72px 0 56px;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(229, 9, 20, 0.18), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.5px;
}

.hero-sub {
  max-width: 560px;
  margin: 16px auto 0;
  color: var(--text-dim);
  font-size: 17px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
}

.stat-label {
  font-size: 13px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* ---------------- Changelog layout ---------------- */

.changelog {
  padding: 56px 0 80px;
}

.changelog-inner {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}

/* ---------------- Side nav ---------------- */

.side-nav {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.side-nav-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-faint);
  margin-bottom: 8px;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.side-link:hover {
  color: var(--text);
  background: var(--bg-elevated);
  border-color: var(--border);
}

.side-link.is-current {
  color: #fff;
  background: var(--bg-card);
  border-color: var(--accent);
}

.side-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.side-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  background: rgba(229, 9, 20, 0.12);
  border: 1px solid rgba(229, 9, 20, 0.35);
  padding: 2px 8px;
  border-radius: 999px;
}

/* ---------------- Release cards ---------------- */

.entries {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

.release-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s ease;
  scroll-margin-top: 84px;
}

.release-card:hover {
  border-color: #3a3a3a;
}

.release-card.release-current {
  border-color: rgba(229, 9, 20, 0.55);
  box-shadow: 0 0 0 1px rgba(229, 9, 20, 0.25), 0 12px 40px rgba(229, 9, 20, 0.08);
}

.release-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.release-version {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.release-version h2 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.pill {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 999px;
}

.pill-latest {
  color: #fff;
  background: var(--accent);
}

/* ---------------- Release items ---------------- */

.release-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 6px;
  margin-top: 2px;
}

.badge-fix {
  background: #2d0c0c;
  color: #e55;
  border: 1px solid rgba(229, 9, 20, 0.25);
}

.badge-perf {
  background: #0c1a2d;
  color: var(--blue);
  border: 1px solid rgba(91, 156, 245, 0.25);
}

.badge-lang {
  background: #0c2d1b;
  color: var(--green);
  border: 1px solid rgba(70, 211, 105, 0.25);
}

.badge-audio {
  background: #2d250c;
  color: var(--yellow);
  border: 1px solid rgba(245, 197, 66, 0.25);
}

.badge-feature {
  background: #2d0c1c;
  color: #e06fb3;
  border: 1px solid rgba(224, 111, 179, 0.25);
}

.item-body {
  color: var(--text);
  font-size: 15px;
}

.item-body strong {
  color: #fff;
}

/* Retraction note attached to a past release whose notes were inaccurate. */
.release-correction {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-left: 3px solid var(--yellow);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(245, 197, 66, 0.08);
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
}

.release-correction strong {
  color: var(--yellow);
}

.release-correction a {
  color: var(--text);
}

/* ---------------- Language chips ---------------- */

.lang-toggle {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lang-toggle:hover {
  color: var(--accent-hover);
}

.lang-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

.lang-chip {
  font-size: 13px;
  font-weight: 500;
  color: var(--green);
  background: rgba(70, 211, 105, 0.08);
  border: 1px solid rgba(70, 211, 105, 0.25);
  padding: 5px 12px;
  border-radius: 999px;
}

.lang-list[hidden] {
  display: none;
}

/* ---------------- Footer ---------------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-faint);
  font-size: 14px;
  flex-wrap: wrap;
}

.footer-brand {
  font-weight: 700;
  color: var(--text-dim);
}

.footer-divider {
  color: var(--border);
}

.footer-credit {
  color: var(--text-faint);
}

.footer-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.footer-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 860px) {
  .changelog-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .side-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .side-nav-title {
    width: 100%;
    margin-bottom: 0;
  }

  .hero-stats {
    gap: 32px;
  }
}

@media (max-width: 520px) {
  .brand-text {
    display: none;
  }

  .release-card {
    padding: 20px;
  }

  .hero {
    padding: 48px 0 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}
