:root {
  --bg: #0b0f17;
  --surface: #121824;
  --surface-2: #192233;
  --border: #232f45;
  --text: #e6ecf5;
  --muted: #93a3ba;
  --cyan: #38bdf8;
  --cyan-soft: rgb(56 189 248 / .12);
  --amber: #f59e0b;
  --amber-soft: rgb(245 158 11 / .14);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.02em; }
p { margin: 0 0 12px; }
a { color: var(--cyan); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: #7dd3fc; }
img { display: block; max-width: 100%; height: auto; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--cyan); color: #05101c; padding: 8px 14px; border-radius: 6px; font-weight: 700; z-index: 999; }
.skip-link:focus { left: 12px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* Fixed top utility bar matching 2018 .navbar spirit */
.topbar {
  position: sticky; top: 0; z-index: 120;
  background: #0d131e;
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 62px; padding: 10px 0;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); font-weight: 750; font-size: 19px; letter-spacing: -.02em; }
.brand:hover { color: #fff; }
.brand-mark { width: 34px; height: 34px; flex-shrink: 0; }
.brand-accent { color: var(--cyan); }

.search-wrap { flex: 1; max-width: 440px; display: flex; gap: 8px; position: relative; }
.search-field {
  width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 9px 44px 9px 14px; font-size: 14px;
}
.search-field:focus { outline: 2px solid var(--cyan); border-color: var(--cyan); }
.kbd-hint {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  border: 1px solid var(--border); padding: 1px 6px; border-radius: 4px; pointer-events: none;
}

.top-links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.top-links a {
  padding: 7px 12px; border-radius: 7px; font-size: 13px; font-weight: 550; color: var(--muted);
}
.top-links a:hover, .top-links a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

/* Category ribbon matching 2016 menu */
.cat-bar {
  background: var(--surface); border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
}
.cat-bar::-webkit-scrollbar { display: none; }
.cat-list { display: flex; align-items: center; gap: 6px; padding: 10px 0; list-style: none; margin: 0; }
.cat-pill {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 6px 13px; border-radius: 7px; font-size: 13px; font-weight: 550;
  color: var(--muted); border: 1px solid transparent; transition: all .2s var(--ease);
}
.cat-pill:hover, .cat-pill[aria-current="page"], .cat-pill.is-active {
  color: var(--cyan); background: var(--cyan-soft); border-color: rgb(56 189 248 / .3);
}

/* Screening Hero */
.hero-box {
  margin: 26px 0 28px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
}
.hero-copy { padding: 30px 32px; display: flex; flex-direction: column; justify-content: center; }
.hero-tag {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--cyan); display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.hero-copy h1 { font-size: clamp(1.6rem, 3vw, 2.35rem); line-height: 1.18; margin-bottom: 12px; color: #fff; }
.hero-copy p { color: var(--muted); font-size: 15px; max-width: 54ch; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); font-family: var(--mono); font-size: 12px; color: var(--muted); }
.hero-stats strong { color: var(--text); font-size: 14px; display: block; }
.hero-still { position: relative; min-height: 280px; background: #070a10; }
.hero-still img { width: 100%; height: 100%; object-fit: cover; }

/* Section Head & View Switcher */
.section-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.section-bar h2 { font-size: 1.25rem; color: #fff; display: inline-flex; align-items: center; gap: 10px; }
.view-switch { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 3px; gap: 4px; }
.view-btn {
  background: transparent; border: 0; color: var(--muted); font-size: 12px; font-weight: 600;
  padding: 5px 11px; border-radius: 6px; cursor: pointer;
}
.view-btn.is-active { background: var(--surface-2); color: var(--cyan); }

/* Video Cards Grid & Classic List Mode */
.video-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 34px; }
.video-grid.is-list { grid-template-columns: 1fr; gap: 10px; }

.video-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .3s var(--ease), border-color .25s, background .25s;
}
.video-card:hover { transform: translateY(-3px); border-color: var(--cyan); background: var(--surface-2); }
.video-card.is-hidden { display: none; }

.video-grid.is-list .video-card { flex-direction: row; align-items: center; }
.video-grid.is-list .thumb-wrap { width: 185px; flex-shrink: 0; }

.thumb-wrap { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #070a10; }
.thumb-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s var(--ease); }
.video-card:hover .thumb-wrap img { transform: scale(1.05); }
.badge-source {
  position: absolute; left: 8px; bottom: 8px; padding: 2px 7px; border-radius: 4px;
  font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .04em;
  background: rgb(11 15 23 / .86); color: var(--cyan); border: 1px solid rgb(56 189 248 / .35);
}
.badge-source.is-custom { color: var(--amber); border-color: rgb(245 158 11 / .45); }
.badge-year {
  position: absolute; right: 8px; top: 8px; padding: 2px 7px; border-radius: 4px;
  font-family: var(--mono); font-size: 10px; background: rgb(11 15 23 / .82); color: var(--text);
}

.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.card-cat { font-family: var(--mono); font-size: 11px; color: var(--cyan); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.card-title { font-size: 14px; line-height: 1.42; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.card-title a { color: inherit; }
.card-title a:hover { color: var(--cyan); }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); padding-top: 8px; border-top: 1px solid rgb(255 255 255 / .05); }

/* Category Directory Table */
.dir-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 36px; }
.dir-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; }
.dir-card h3 { font-size: 15px; color: #fff; margin-bottom: 8px; display: flex; justify-content: space-between; }
.dir-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.dir-tag { font-size: 12px; color: var(--muted); background: var(--bg); border: 1px solid var(--border); padding: 2px 8px; border-radius: 5px; }

/* Detail & Prose Pages */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--muted); margin: 22px 0 14px; font-family: var(--mono); }
.player-frame {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); margin-bottom: 26px;
}
.player-still { aspect-ratio: 16 / 9; background: #070a10; position: relative; }
.player-still img { width: 100%; height: 100%; object-fit: cover; }
.player-meta { padding: 24px 26px; }
.player-meta h1 { font-size: clamp(1.35rem, 2.4vw, 1.9rem); color: #fff; margin: 8px 0 12px; line-height: 1.25; }
.spec-list { display: grid; gap: 8px; margin: 16px 0; padding: 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; font-size: 13px; }
.spec-row { display: flex; justify-content: space-between; gap: 12px; }
.spec-row span { color: var(--muted); }

.prose-box { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 26px 28px; margin: 20px 0 36px; }
.prose-box h1 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); color: #fff; margin-bottom: 12px; }
.prose-box h2 { font-size: 1.2rem; color: var(--cyan); margin: 20px 0 8px; }
.prose-box p { color: var(--muted); max-width: 72ch; }

.empty-state { padding: 28px; text-align: center; background: var(--surface); border: 1px dashed var(--border); border-radius: 10px; color: var(--muted); display: none; margin-bottom: 28px; }
.empty-state.is-visible { display: block; }

.site-footer {
  border-top: 1px solid var(--border); background: #080b12; padding: 26px 0 34px; margin-top: 24px;
  font-size: 13px; color: var(--muted);
}
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 16px; }

@media (max-width: 1060px) {
  .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-box, .player-frame { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .topbar-inner { flex-wrap: wrap; }
  .search-wrap { order: 3; max-width: 100%; flex-basis: 100%; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .dir-grid { grid-template-columns: 1fr; }
  .video-grid.is-list .video-card { flex-direction: column; align-items: stretch; }
  .video-grid.is-list .thumb-wrap { width: 100%; }
}
@media (max-width: 480px) {
  .video-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
