/* ============ Forrest Flix ============ */

:root {
  --bg: #141414;
  --red: #e50914;
  --red-hover: #f6121d;
  --green: #46d369;
  --text: #fff;
  --muted: #a3a3a3;
  --dim: #777;
  --card-bg: #181818;
  --header-h: 68px;
  --bar-h: 58px;
  --ease-nf: cubic-bezier(0.5, 0, 0.1, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Helvetica Neue', Helvetica, Arial, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }

img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: 0; }

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

.header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 4%;
  z-index: 200;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.85) 10%, rgba(0, 0, 0, 0.35));
  transition: background-color 0.4s;
}
.header.scrolled { background: #141414; }

.logo {
  background: none;
  padding: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--red);
  text-transform: uppercase;
  font-family: 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  transform: scaleY(1.12);
  white-space: nowrap;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  transition: color 0.2s, filter 0.2s;
}
.logo:hover { filter: brightness(1.25); }
.logo:active { transform: scaleY(1.12) scale(0.97); }

.nav { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; font-size: 14px; }
.nav a { color: #e5e5e5; text-decoration: none; transition: color 0.2s; }
.nav a:hover { color: var(--muted); }
.nav a.active { font-weight: 600; color: #fff; }

.header-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }

.search-box {
  display: flex; align-items: center;
  border: 1px solid transparent; background: transparent;
  transition: 0.3s var(--ease-nf); height: 34px; padding: 0 8px;
}
.search-box.open { border-color: #fff; background: rgba(0, 0, 0, 0.75); }
.search-box svg { width: 22px; height: 22px; fill: #fff; flex: none; cursor: pointer; }
.search-box input {
  width: 0; padding: 0; border: 0; outline: 0; background: transparent;
  color: #fff; font-size: 14px;
  transition: width 0.3s var(--ease-nf), padding 0.3s;
}
.search-box.open input { width: 200px; padding: 0 8px; }

.spin-btn {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff; font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: 4px; transition: 0.2s; white-space: nowrap;
}
.spin-btn:hover { background: #fff; color: #111; border-color: #fff; }

.avatar {
  width: 32px; height: 32px; border-radius: 4px;
  background: linear-gradient(135deg, #e50914, #b20710);
  display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none;
}

/* ---------- Filter drawer ---------- */

.filter-tab {
  position: fixed;
  left: 0; top: 50%;
  transform: translateY(-50%);
  z-index: 210;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 9px;
  background: rgba(22, 22, 22, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  color: #ddd;
  box-shadow: 4px 0 22px rgba(0, 0, 0, 0.6);
  transition: 0.22s var(--ease-nf);
}
.filter-tab:hover { background: #222; color: #fff; padding-left: 13px; }
.filter-tab.on { border-color: var(--red); color: #fff; }
.ft-icon { font-size: 15px; }
.ft-label {
  writing-mode: vertical-rl;
  font-size: 12px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase;
}
.ft-badge {
  background: var(--red); color: #fff; font-size: 10px; font-weight: 800;
  min-width: 17px; line-height: 17px; border-radius: 999px; text-align: center;
}
.ft-badge[hidden] { display: none; }
body.drawer-open .filter-tab { opacity: 0; pointer-events: none; }

.drawer {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 330px; max-width: 88vw;
  z-index: 230;
  background: #101010;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 18px 0 60px rgba(0, 0, 0, 0.7);
  transform: translateX(-102%);
  transition: transform 0.32s var(--ease-nf);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.drawer.open { transform: none; }

.drawer-scrim {
  position: fixed; inset: 0; z-index: 220;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.drawer-scrim.open { opacity: 1; pointer-events: auto; }

.drawer-inner { padding: 18px 18px 40px; }

.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.drawer-head h2 { font-size: 19px; margin: 0; letter-spacing: 0.3px; }
.drawer-close {
  background: transparent; color: var(--muted); font-size: 17px;
  width: 30px; height: 30px; border-radius: 50%; transition: 0.15s;
}
.drawer-close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.drawer-group { margin-bottom: 22px; }
.drawer-label {
  font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--dim); margin-bottom: 9px; font-weight: 700;
}

.segmented { display: flex; flex-direction: column; gap: 4px; }
.seg {
  background: rgba(255, 255, 255, 0.06); color: #ccc; font-size: 13px;
  padding: 9px 12px; border-radius: 4px; text-align: left; transition: 0.15s;
  border: 1px solid transparent;
}
.seg:hover { background: rgba(255, 255, 255, 0.13); color: #fff; }
.seg.on { background: var(--red); color: #fff; font-weight: 600; }

.drawer-select {
  width: 100%; background: rgba(255, 255, 255, 0.07); color: #eee;
  border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 4px;
  padding: 9px 10px; font-size: 13px; outline: 0; cursor: pointer; font-family: inherit;
}

.facets { display: flex; flex-direction: column; gap: 3px; }
.facet { border-bottom: 1px solid rgba(255, 255, 255, 0.07); }

.facet-btn {
  width: 100%;
  background: transparent; border: 0; color: #ddd;
  font-size: 14px; padding: 12px 2px;
  display: flex; align-items: center; gap: 8px; transition: 0.15s;
}
.facet-btn > span:first-child { flex: 1; text-align: left; }
.facet-btn:hover { color: #fff; }
.facet-btn.on { color: #fff; font-weight: 600; }
.facet-btn b {
  background: var(--red); color: #fff; border-radius: 999px;
  font-size: 10px; padding: 0 6px; line-height: 16px; font-weight: 800;
}
.facet-btn .caret { font-size: 10px; color: var(--dim); transition: transform 0.2s; }
.facet-btn.open .caret { transform: rotate(180deg); }

/* Inline accordion body. Default to hidden and opt in — an author `display`
   rule outranks the UA rule for [hidden], so the attribute alone won't hide it. */
.facet-panel {
  display: none;
  flex-direction: column;
  max-height: 290px;
  padding-bottom: 8px;
}
.facet-panel:not([hidden]) { display: flex; }

.facet-search {
  margin: 0 0 6px; padding: 7px 10px;
  background: #1c1c1c; border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px; color: #fff; font-size: 13px; outline: 0; font-family: inherit;
}
.facet-search:focus { border-color: #fff; }

.facet-list { overflow-y: auto; }

.facet-opt {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 6px; font-size: 13px; cursor: pointer;
  border-radius: 4px; transition: background 0.12s;
}
.facet-opt:hover { background: rgba(255, 255, 255, 0.07); }
.facet-opt input { accent-color: var(--red); width: 15px; height: 15px; cursor: pointer; flex: none; }
.fo-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fo-count { color: var(--dim); font-size: 11px; }
.facet-empty { padding: 14px 6px; color: var(--dim); font-size: 13px; text-align: center; }

.clear-all {
  width: 100%; background: rgba(255, 255, 255, 0.1); color: #eee;
  font-size: 13px; font-weight: 600; padding: 11px; border-radius: 4px; transition: 0.15s;
}
.clear-all:hover { background: var(--red); color: #fff; }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(229, 9, 20, 0.16); border: 1px solid rgba(229, 9, 20, 0.55);
  color: #fff; font-size: 12px; padding: 4px 9px; border-radius: 999px; transition: 0.15s;
}
.fchip:hover { background: rgba(229, 9, 20, 0.34); }
.fchip i { color: #ff9ba0; font-style: normal; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.fchip span { color: #ffb3b8; font-size: 11px; }

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

.hero {
  position: relative;
  min-height: 76vh;
  display: flex; align-items: flex-end;
  padding: 0 4% 70px;
  padding-top: var(--header-h);
}

.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(77deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.35) 55%, transparent 78%),
    linear-gradient(0deg, #141414 2%, transparent 45%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 22%);
}

.hero-inner { position: relative; z-index: 2; max-width: 620px; }

.hero-badge {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; letter-spacing: 2.5px; font-weight: 600;
  color: #e5e5e5; margin-bottom: 12px; text-transform: uppercase;
}
.hero-badge span.n { color: var(--red); font-weight: 800; font-size: 22px; letter-spacing: 0; }

.hero-title {
  font-size: clamp(32px, 4.4vw, 64px); line-height: 1.03; font-weight: 800;
  margin: 0 0 14px; text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8); letter-spacing: -1px;
}

.hero-meta {
  display: flex; align-items: center; gap: 12px; font-size: 15px;
  color: #ddd; margin-bottom: 14px; flex-wrap: wrap;
}
.hero-meta .match, .info-meta .match, .modal-meta .match { color: var(--green); font-weight: 700; }
.hero-meta .rated, .modal-meta .rated, .reveal-meta .rated {
  border: 1px solid rgba(255, 255, 255, 0.45); padding: 0 6px; font-size: 12px;
}

.seen-pill {
  background: rgba(70, 211, 105, 0.15); border: 1px solid rgba(70, 211, 105, 0.5);
  color: var(--green); font-size: 12px; padding: 2px 9px; border-radius: 999px;
}

.hero-desc {
  font-size: 17px; line-height: 1.5; color: #eee; margin: 0 0 18px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7); max-width: 560px;
}
.hero-cast { font-size: 14px; color: #cfcfcf; margin-bottom: 22px; }
.hero-cast b { color: #fff; font-weight: 600; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 26px; border-radius: 4px; font-size: 16px; font-weight: 700; transition: 0.2s;
}
.btn svg { width: 22px; height: 22px; }
.btn-play { background: #fff; color: #000; }
.btn-play:hover { background: rgba(255, 255, 255, 0.75); }
.btn-info, .btn-watch { background: rgba(109, 109, 110, 0.7); color: #fff; }
.btn-info:hover, .btn-watch:hover { background: rgba(109, 109, 110, 0.45); }
.btn-watch.on { background: rgba(70, 211, 105, 0.2); border: 1px solid rgba(70, 211, 105, 0.6); color: var(--green); }

/* ---------- Rows ---------- */

.rows { position: relative; z-index: 5; padding-bottom: 40px; margin-top: -40px; }
.row { margin-bottom: 6px; }

.row-head {
  display: flex; align-items: baseline; gap: 10px;
  padding: 0 4%; margin-bottom: 4px;
  position: relative; z-index: 50;   /* above hover-scaled cards (z-index 40) */
}

.row-title { font-size: 20px; font-weight: 700; color: #e5e5e5; margin: 0; letter-spacing: 0.2px; }

.row-count { font-size: 12px; color: var(--dim); margin-right: auto; }
.row-seasonal .row-title { color: #fff; }
.row-seasonal { padding-top: 6px; }

/* Always visible: it used to appear on row-hover only, and reaching for it
   meant crossing a poster that scaled up and covered it. */
.view-all {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--muted); font-size: 11px; font-weight: 700;
  letter-spacing: 0.7px; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 5px;
  transition: 0.18s; white-space: nowrap;
}
.view-all span { color: var(--red); font-size: 14px; line-height: 1; }
.view-all:hover { color: #fff; background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.4); }

.row-viewport {
  position: relative;
  overflow-x: clip; overflow-y: visible;
  padding: 26px 0 34px; margin: -26px 0 -26px;
}
.row-track {
  display: flex; gap: 8px; padding: 0 4%;
  transition: transform 0.7s var(--ease-nf); will-change: transform;
}

.row-arrow {
  position: absolute; top: 26px; bottom: 34px; width: 4%;
  background: rgba(20, 20, 20, 0.55); color: #fff; font-size: 30px;
  display: grid; place-items: center; opacity: 0; z-index: 30; transition: opacity 0.2s;
}
.row-viewport:hover .row-arrow { opacity: 1; }
.row-arrow:hover { background: rgba(20, 20, 20, 0.85); font-size: 38px; }
.row-arrow.left { left: 0; }
.row-arrow.right { right: 0; }
.row-arrow[hidden] { display: none; }

/* ---------- Cards (portrait, real cover art) ---------- */

.card {
  flex: 0 0 calc((100% - 8% - 56px) / 8);
  cursor: pointer;
  transition: transform 0.3s var(--ease-nf), box-shadow 0.3s;
}
@media (max-width: 1500px) { .card { flex-basis: calc((100% - 8% - 48px) / 7); } }
@media (max-width: 1250px) { .card { flex-basis: calc((100% - 8% - 40px) / 6); } }
@media (max-width: 1000px) { .card { flex-basis: calc((100% - 8% - 32px) / 5); } }
@media (max-width: 800px)  { .card { flex-basis: calc((100% - 8% - 24px) / 4); } }
@media (max-width: 560px)  { .card { flex-basis: calc((100% - 8% - 16px) / 3); } }

.card:hover { transform: scale(1.09) translateY(-4px); z-index: 40; }

.poster-wrap {
  position: relative; aspect-ratio: 2 / 3; border-radius: 5px; overflow: hidden;
  background: #0d0d0d; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
  transition: box-shadow 0.3s, outline-color 0.2s;
  outline: 2px solid transparent; outline-offset: -2px;
}
.card:hover .poster-wrap {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.85);
  outline-color: rgba(255, 255, 255, 0.85);
}

.poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }

.card.is-watched .poster { filter: brightness(0.62) saturate(0.75); }
.card.is-watched:hover .poster { filter: none; }

.type-tag {
  position: absolute; top: 7px; left: 7px; z-index: 3;
  background: rgba(229, 9, 20, 0.92); color: #fff;
  font-size: 9px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase;
  padding: 2px 6px; border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.watched-tick {
  position: absolute; top: 7px; right: 7px; z-index: 3;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(70, 211, 105, 0.92); color: #06340f;
  display: grid; place-items: center; font-size: 13px; font-weight: 900;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.card-over {
  position: absolute; inset: auto 0 0 0; z-index: 4;
  padding: 30px 10px 10px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.94) 35%, transparent);
  opacity: 0; transform: translateY(10px); transition: 0.25s var(--ease-nf);
}
.card:hover .card-over { opacity: 1; transform: none; }

.card-over-title {
  font-size: 12px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.5px; line-height: 1.2; margin-bottom: 5px;
}
.card-over-meta {
  display: flex; gap: 7px; font-size: 10px; color: #ccc; margin-bottom: 6px; flex-wrap: wrap;
}
.card-over-meta .match { color: var(--green); font-weight: 700; }
.card-over-seen { font-size: 10px; color: var(--green); margin-bottom: 6px; }
.card-over-actions { display: flex; gap: 6px; }

.icon-btn {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  background: rgba(28, 28, 28, 0.8); color: #fff;
  display: grid; place-items: center; font-size: 11px; transition: 0.15s;
}
.icon-btn:hover { border-color: #fff; background: rgba(255, 255, 255, 0.2); }
.icon-btn.white { background: #fff; color: #000; border-color: #fff; }
.icon-btn.white:hover { background: rgba(255, 255, 255, 0.75); }
.icon-btn.on { background: var(--green); border-color: var(--green); color: #06340f; font-weight: 900; }

/* generated fallback art — used for home videos with no cover */
.art { position: absolute; inset: 0; z-index: 0; display: grid; place-items: center; padding: 12px; }
.art-glyph { font-size: 34px; opacity: 0.8; position: absolute; top: 10px; right: 10px; }
.art-name {
  position: relative; z-index: 2; text-align: center;
  font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
  line-height: 1.25; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}
.art-noir {
  background:
    radial-gradient(ellipse at 70% 20%, rgba(201, 162, 39, 0.28), transparent 60%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.035) 0 2px, transparent 2px 9px),
    linear-gradient(160deg, var(--c1), var(--c2));
}
.art-city {
  background:
    radial-gradient(circle at 50% 95%, rgba(74, 163, 223, 0.35), transparent 55%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 3px, transparent 3px 14px),
    linear-gradient(200deg, var(--c1), var(--c2));
}
.art-ember {
  background:
    radial-gradient(circle at 30% 80%, rgba(224, 168, 60, 0.45), transparent 60%),
    radial-gradient(circle at 80% 15%, rgba(255, 120, 40, 0.25), transparent 55%),
    linear-gradient(180deg, var(--c1), var(--c2));
}

/* ---------- Grid view ---------- */

.gridview { padding: calc(var(--header-h) + 28px) 4% 80px; min-height: 60vh; }
.grid-title { font-size: 30px; font-weight: 800; margin: 0 0 4px; letter-spacing: -0.5px; }
.grid-sub { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.gridview .chip-row { margin-bottom: 24px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 26px 14px;
}
.grid .card { flex: none; }

.no-results { padding: 60px 0 140px; }
.no-results h2 { font-size: 24px; font-weight: 500; margin: 0 0 10px; }
.no-results p { color: var(--muted); margin: 0; }

/* ---------- Modal ---------- */

.modal-scrim {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.75); z-index: 300;
  overflow-y: auto; padding: 40px 0 60px;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.modal-scrim.open { opacity: 1; pointer-events: auto; }

.modal {
  position: relative;
  width: min(900px, 92vw); margin: 0 auto; background: #181818;
  border-radius: 8px; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
  transform: scale(0.92); transition: transform 0.3s var(--ease-nf);
}
.modal-scrim.open .modal { transform: scale(1); }

.modal-hero { position: relative; min-height: 300px; display: flex; align-items: flex-end; padding: 0 44px 32px; }
.modal-back { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.modal-hero::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(0deg, #181818 3%, rgba(24, 24, 24, 0.35) 55%, rgba(0, 0, 0, 0.3));
}
.modal-hero-inner { position: relative; z-index: 3; display: flex; gap: 22px; align-items: flex-end; width: 100%; }

.modal-poster {
  width: 132px; flex: none; border-radius: 5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8); border: 1px solid rgba(255, 255, 255, 0.12);
}

.modal-title { font-size: clamp(24px, 3vw, 40px); font-weight: 800; margin: 0 0 5px; letter-spacing: -0.5px; text-shadow: 0 4px 18px rgba(0, 0, 0, 0.85); }
.modal-tagline { color: #ddd; font-style: italic; margin: 0 0 16px; font-size: 15px; }
.modal-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.modal-actions .btn { font-size: 15px; padding: 9px 22px; }

.watch-date {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px; font-size: 13px; color: var(--muted);
}
.watch-date input {
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff; border-radius: 4px; padding: 4px 8px; font-size: 13px; font-family: inherit;
  color-scheme: dark;
}
.watch-ago { color: var(--green); }

.modal-body { display: grid; grid-template-columns: 1.7fr 1fr; gap: 28px; padding: 22px 44px 36px; }
@media (max-width: 700px) {
  .modal-body { grid-template-columns: 1fr; padding: 18px 22px 28px; }
  .modal-hero { padding: 0 22px 24px; }
  .modal-hero-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .modal-poster { width: 96px; }
}

.modal-meta { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #bcbcbc; margin-bottom: 14px; flex-wrap: wrap; }
.modal-meta .hd { border: 1px solid rgba(255, 255, 255, 0.4); padding: 0 4px; font-size: 10px; border-radius: 3px; }
.modal-desc { font-size: 16px; line-height: 1.55; margin: 0; }

.modal-facts { font-size: 13px; line-height: 1.9; }
.modal-facts .k { color: var(--dim); }
.modal-facts .v { color: #ddd; }
.modal-facts .row-fact { margin-bottom: 10px; }

.link {
  background: none; color: #ddd; padding: 0; font-size: 13px;
  text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.25);
  text-underline-offset: 2px; transition: 0.15s;
}
.link:hover { color: var(--red); text-decoration-color: var(--red); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); color: #ddd; }

.modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(10, 10, 10, 0.8); color: #fff; font-size: 18px;
  display: grid; place-items: center; line-height: 1;
}
.modal-close:hover { background: #2a2a2a; }

/* ---------- Wheel ---------- */

.wheel-scrim {
  position: fixed; inset: 0; z-index: 400;
  background: radial-gradient(circle at 50% 45%, rgba(35, 8, 10, 0.96), rgba(0, 0, 0, 0.98));
  display: grid; place-items: center; padding: 20px; overflow-y: auto;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.wheel-scrim.open { opacity: 1; pointer-events: auto; }

.wheel-stage {
  display: flex; align-items: center; justify-content: center;
  gap: 0; transition: gap 0.5s var(--ease-nf);
}
.wheel-stage.picked { gap: 46px; }
@media (max-width: 900px) {
  .wheel-stage { flex-direction: column; }
  .wheel-stage.picked { gap: 24px; }
}

.wheel-col { text-align: center; transition: transform 0.5s var(--ease-nf); }
.wheel-stage.picked .wheel-col { transform: scale(0.82); }
@media (max-width: 900px) { .wheel-stage.picked .wheel-col { transform: scale(0.6); margin: -6vh 0; } }

.wheel-kicker { font-size: 13px; letter-spacing: 4px; text-transform: uppercase; color: var(--red); font-weight: 700; margin-bottom: 6px; }
.wheel-heading { font-size: clamp(22px, 3vw, 36px); font-weight: 800; margin: 0 0 6px; letter-spacing: -0.5px; }
.wheel-pool { font-size: 13px; color: var(--muted); margin-bottom: 20px; }

.wheel-wrap { position: relative; width: min(56vh, 420px); height: min(56vh, 420px); margin: 0 auto; }

.wheel-glow {
  position: absolute; inset: -14%; border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 9, 20, 0.32), transparent 62%);
  animation: pulse 2.6s ease-in-out infinite; pointer-events: none;
}
@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

.wheel {
  position: absolute; inset: 0; border-radius: 50%; border: 8px solid #1c1c1c;
  box-shadow: 0 0 0 4px rgba(229, 9, 20, 0.8), 0 24px 60px rgba(0, 0, 0, 0.9),
    inset 0 0 40px rgba(0, 0, 0, 0.6);
  transition: transform 5.1s cubic-bezier(0.12, 0.72, 0.09, 1);
  overflow: hidden;
}

.wheel-hub {
  position: absolute; left: 50%; top: 50%; width: 24%; height: 24%;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2b2b2b, #0d0d0d);
  border: 3px solid rgba(255, 255, 255, 0.15);
  display: grid; place-items: center; z-index: 6;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.85); font-size: clamp(18px, 3vh, 30px);
}

.wheel-pointer {
  position: absolute; top: -18px; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 16px solid transparent; border-right: 16px solid transparent;
  border-top: 30px solid var(--red);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.85));
  z-index: 8; transform-origin: 50% 10%;
}
.wheel-pointer.tick { animation: tick 0.09s ease-in-out; }
@keyframes tick { 50% { transform: translateX(-50%) rotate(-13deg); } }

.wheel-controls { margin-top: 26px; display: flex; gap: 12px; justify-content: center; }

.btn-spin {
  background: var(--red); color: #fff; font-size: 17px; font-weight: 800;
  letter-spacing: 1px; padding: 13px 44px; border-radius: 4px;
  text-transform: uppercase; transition: 0.2s; box-shadow: 0 8px 26px rgba(229, 9, 20, 0.45);
}
.btn-spin:hover:not(:disabled) { background: var(--red-hover); transform: translateY(-1px); }
.btn-spin:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

.btn-ghost {
  background: rgba(255, 255, 255, 0.12); color: #fff; padding: 13px 26px;
  border-radius: 4px; font-size: 15px; font-weight: 600; transition: 0.2s;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.22); }

/* reveal */
.wheel-reveal {
  width: 0; opacity: 0; overflow: hidden;
  transition: width 0.55s var(--ease-nf), opacity 0.4s 0.15s;
}
.wheel-reveal.show { width: min(430px, 46vw); opacity: 1; }
@media (max-width: 900px) { .wheel-reveal.show { width: min(430px, 92vw); } }

.reveal-card { display: flex; gap: 20px; align-items: center; text-align: left; }
@media (max-width: 520px) { .reveal-card { flex-direction: column; text-align: center; } }

.reveal-poster {
  position: relative; width: 168px; flex: none; aspect-ratio: 2/3;
  border-radius: 6px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.15);
  animation: revealPop 0.7s var(--ease-nf);
}
.reveal-poster .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
@keyframes revealPop {
  0% { transform: scale(0.4) rotate(-12deg); opacity: 0; }
  60% { transform: scale(1.07) rotate(3deg); }
  100% { transform: none; opacity: 1; }
}

.reveal-text { min-width: 0; }
.reveal-kicker { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.reveal-title { font-size: clamp(20px, 2.4vw, 30px); font-weight: 800; line-height: 1.12; margin-bottom: 10px; letter-spacing: -0.5px; }
.reveal-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: #bbb; margin-bottom: 10px; }
.reveal-seen { font-size: 12px; color: var(--green); margin-bottom: 12px; }
.reveal-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.reveal-actions .btn { font-size: 14px; padding: 9px 18px; }

/* confetti */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 450; overflow: hidden; }
.confetti i { position: absolute; width: 9px; height: 14px; opacity: 0; animation: fall 2.4s linear forwards; }
@keyframes fall {
  0% { opacity: 1; transform: translateY(-12vh) rotate(0deg); }
  100% { opacity: 0; transform: translateY(105vh) rotate(760deg); }
}

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

.footer { padding: 40px 4% 60px; color: #757575; font-size: 13px; border-top: 1px solid #222; }
.footer b { color: #999; font-weight: 600; }
.footer code { color: #aaa; background: #1e1e1e; padding: 1px 5px; border-radius: 3px; font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .wheel { transition: transform 1.2s ease-out !important; }
}

/* ---------- Trailer player ---------- */

.trailer-scrim {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0, 0, 0, 0.93);
  display: grid; place-items: center; padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.trailer-scrim.open { opacity: 1; pointer-events: auto; }

.trailer-box {
  width: min(1100px, 94vw);
  transform: scale(0.95);
  transition: transform 0.3s var(--ease-nf);
}
.trailer-scrim.open .trailer-box { transform: none; }

.trailer-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 12px; flex-wrap: wrap;
}
.trailer-kicker {
  font-size: 11px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--red); font-weight: 800; margin-bottom: 3px;
}
.trailer-title { font-size: clamp(17px, 2.2vw, 25px); font-weight: 800; letter-spacing: -0.3px; }
.trailer-head-actions { display: flex; align-items: center; gap: 12px; }
.trailer-yt {
  color: var(--muted); font-size: 13px; text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.25); padding: 6px 12px; border-radius: 4px;
  transition: 0.15s; white-space: nowrap;
}
.trailer-yt:hover { color: #fff; border-color: #fff; }

.trailer-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.9);
}
.trailer-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- IMDb + personal scores ---------- */

.imdb {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; color: #f5c518; white-space: nowrap;
}
.imdb b {
  background: #f5c518; color: #000; font-size: 8px; font-weight: 900;
  padding: 1px 3px; border-radius: 2px; letter-spacing: -0.2px;
}
.imdb.big { font-size: 15px; }
.imdb.big b { font-size: 10px; padding: 2px 5px; }

.scores { display: inline-flex; gap: 5px; }
.score {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--who); color: var(--who);
  font-size: 11px; font-weight: 700;
  padding: 1px 7px; border-radius: 999px; white-space: nowrap;
}
.score i { font-style: normal; opacity: 0.8; font-size: 10px; }
.scores.compact { margin-bottom: 6px; }
.scores.compact .score { font-size: 10px; padding: 0 5px; }

/* ---------- rating control ---------- */

.rate { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.rate-label { font-size: 12px; color: var(--muted); margin-bottom: 9px; letter-spacing: 0.3px; }
.rate-label b { color: #fff; font-size: 13px; }
.rate-dots { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.rate-dot {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--muted); font-size: 12px; font-weight: 700; transition: 0.13s;
}
.rate-dot:hover { transform: translateY(-2px); border-color: var(--who); color: #fff; }
.rate-dot.on { background: color-mix(in srgb, var(--who) 30%, transparent); border-color: var(--who); color: #fff; }
.rate-dot.exact { background: var(--who); color: #fff; box-shadow: 0 4px 14px color-mix(in srgb, var(--who) 50%, transparent); }
.rate-clear {
  margin-left: 6px; width: 30px; height: 30px; border-radius: 50%;
  background: transparent; border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--dim); font-size: 12px; transition: 0.15s;
}
.rate-clear:hover { color: #fff; border-color: #fff; }

/* ---------- profile switcher ---------- */

.profile-wrap { position: relative; }

.avatar {
  width: 32px; height: 32px; border-radius: 4px;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
  flex: none; color: #fff; transition: 0.18s; padding: 0;
}
.avatar:hover { transform: scale(1.08); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6); }

.profile-menu {
  position: absolute; top: calc(100% + 12px); right: 0;
  min-width: 190px; padding: 6px;
  background: rgba(12, 12, 12, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px; box-shadow: 0 18px 46px rgba(0, 0, 0, 0.8);
  z-index: 260;
}
.profile-menu[hidden] { display: none; }

.profile-opt {
  width: 100%; display: flex; align-items: center; gap: 10px;
  background: transparent; color: #ddd; font-size: 14px;
  padding: 9px 10px; border-radius: 4px; transition: 0.14s; text-align: left;
}
.profile-opt:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.profile-opt.on { color: #fff; font-weight: 600; }
.profile-opt em { margin-left: auto; font-style: normal; font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; }
.pa {
  width: 26px; height: 26px; border-radius: 4px; flex: none;
  display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff;
}

/* ---------- Front door ---------- */

html.gate-locked, html.gate-locked body { overflow: hidden; height: 100%; }
html.gate-locked body > *:not(#gateScrim) { display: none !important; }

#gateScrim { display: none; }
html.gate-locked #gateScrim {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1200px 600px at 50% -10%, #2a0b0e 0%, transparent 70%),
    var(--bg);
}

.gate-card {
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.gate-logo {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -1.4px;
  color: var(--red);
  text-shadow: 0 2px 18px rgba(229, 9, 20, 0.45);
  margin-bottom: 6px;
}

.gate-sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.gate-card form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gate-card input[type="password"] {
  width: 100%;
  padding: 15px 16px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: #1c1c1c;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.gate-card input[type="password"]:focus {
  border-color: #777;
  background: #232323;
}
.gate-card input[type="password"]::placeholder { color: var(--dim); }

.gate-go {
  padding: 15px 16px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--red);
  border-radius: 6px;
  transition: background 0.15s;
}
.gate-go:hover { background: var(--red-hover); }

.gate-remember {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.gate-remember input { accent-color: var(--red); width: 15px; height: 15px; cursor: pointer; }

.gate-err {
  min-height: 18px;
  color: #f6c1c4;
  font-size: 13px;
}

.gate-foot {
  margin-top: 26px;
  color: var(--dim);
  font-size: 12px;
}

.gate-card.shake { animation: gate-shake 0.4s var(--ease-nf); }
@keyframes gate-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}
@media (prefers-reduced-motion: reduce) {
  .gate-card.shake { animation: none; }
}

.gate-signout {
  margin-left: 10px;
  padding: 4px 10px;
  font-size: 11px;
  color: var(--dim);
  background: transparent;
  border: 1px solid #333;
  border-radius: 4px;
  transition: color 0.15s, border-color 0.15s;
}
.gate-signout:hover { color: var(--muted); border-color: #555; }
