/* ══════════════════════════════════════════════════════════════
   MOOVIX — дизайн-система v3
   Кінематографічна темна тема. Шрифти — локальні (assets/fonts).
   Без CDN, без зовнішніх залежностей.
   ══════════════════════════════════════════════════════════════ */

:root {
  /* ── Полотно ─────────────────────────────────────── */
  --ink:        #0B0D11;   /* сторінка — холодний графіт, не чорний */
  --surface:    #12151C;   /* картки, панелі */
  --raised:     #191D27;   /* інпути, hover */
  --line:       rgba(255,255,255,.07);
  --line-2:     rgba(255,255,255,.14);

  /* ── Текст ───────────────────────────────────────── */
  --paper:      #EDEFF4;
  --muted:      #8A91A3;
  --faint:      #565E70;

  /* ── Акценти (вживаються рідко) ──────────────────── */
  --accent:     #E5003A;   /* тільки play / активний стан */
  --accent-hi:  #FF1F55;
  --accent-soft: rgba(229,0,58,.13);
  --gold:       #E8B931;   /* тільки рейтинг */

  /* ── Типографіка ─────────────────────────────────── */
  --f-display: 'Unbounded', 'Manrope', system-ui, sans-serif;
  --f-sans:    'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;

  /* ── Ритм ────────────────────────────────────────── */
  --gut:   clamp(16px, 4.5vw, 64px);   /* бічні поля */
  --max:   1480px;
  --sec:   clamp(56px, 8vw, 104px);    /* відступ між секціями */

  --r-sm:  6px;
  --r:     12px;
  --r-lg:  18px;

  --t:     .2s cubic-bezier(.2,.6,.3,1);
  --t-mid: .45s cubic-bezier(.2,.6,.3,1);
}

/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--f-sans);
  font-weight: 400;
  background: var(--ink);
  color: var(--paper);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a   { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font: inherit; color: inherit; }
ul  { list-style: none; }

:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 3px;
  border-radius: 3px;
}

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

.wrap  { max-width: var(--max); margin-inline: auto; padding-inline: var(--gut); }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ══════════════════════════════════════════════════════
   ПІДПИС ПРОЄКТУ — «лічильник часу»
   Кожен фільм показує свою тривалість як смужку відносно
   3 годин. Це не декор: глядач обирає, як провести вечір.
   ══════════════════════════════════════════════════════ */
.meter {
  display: block;
  height: 2px;
  background: var(--line-2);
  border-radius: 2px;
  overflow: hidden;
}
.meter i {
  display: block;
  height: 100%;
  width: calc(var(--fill, .5) * 100%);
  background: var(--faint);
  border-radius: 2px;
  transition: background var(--t), width var(--t-mid);
}

/* ══════════════════════════════════════════════════════
   ШАПКА
   ══════════════════════════════════════════════════════ */
.topbar {
  position: sticky; top: 0; z-index: 200;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid var(--line);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .topbar { background: rgba(11,13,17,.9); }
}

.topbar__in {
  max-width: var(--max); margin-inline: auto;
  padding-inline: var(--gut);
  height: 60px;
  display: flex; align-items: center; gap: 28px;
}

.brand {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: .06em;
  display: flex; align-items: baseline; gap: 3px;
  flex-shrink: 0;
}
.brand__mark {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 1px;
  display: inline-block;
  transform: translateY(-1px);
}

.nav { display: flex; gap: 2px; }
.nav a {
  font-size: 13.5px; font-weight: 600;
  color: var(--muted);
  padding: 7px 13px; border-radius: var(--r-sm);
  transition: color var(--t), background var(--t);
  white-space: nowrap;
}
.nav a:hover { color: var(--paper); background: var(--raised); }
.nav a[aria-current="page"] { color: var(--paper); }
.nav a[aria-current="page"]::after {
  content: ''; display: block;
  height: 2px; margin-top: 5px;
  background: var(--accent); border-radius: 2px;
}

/* ── Пошук ─────────────────────────────────────────── */
.search { position: relative; margin-left: auto; width: min(340px, 34vw); }
.search__form {
  display: flex; align-items: center; gap: 9px;
  background: var(--raised);
  border: 1px solid transparent;
  border-radius: 100px;
  padding: 0 6px 0 14px;
  transition: border-color var(--t), background var(--t);
}
.search__form:focus-within {
  border-color: var(--line-2);
  background: var(--surface);
}
.search__form svg { flex-shrink: 0; color: var(--faint); }
.search__form input {
  flex: 1; min-width: 0;
  background: none; border: none; outline: none;
  padding: 9px 0; font-size: 14px;
}
.search__form input::placeholder { color: var(--faint); }
.search__kbd {
  font-family: var(--f-mono); font-size: 10.5px;
  color: var(--faint);
  border: 1px solid var(--line-2); border-radius: 5px;
  padding: 3px 6px; flex-shrink: 0;
}
@media (hover: none) { .search__kbd { display: none; } }

.suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  box-shadow: 0 24px 60px rgba(0,0,0,.7);
  overflow: hidden auto;
  max-height: 60vh;
  display: none; z-index: 300;
}
.suggest[data-open="true"] { display: block; }
.suggest a {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  transition: background var(--t);
}
.suggest a:last-child { border-bottom: none; }
.suggest a:hover, .suggest a:focus-visible { background: var(--raised); }
.suggest img {
  width: 36px; height: 52px; object-fit: cover;
  border-radius: 4px; background: var(--raised); flex-shrink: 0;
}
.suggest a > span { min-width: 0; }
.suggest strong {
  display: block; font-size: 13.5px; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.suggest a span span { font-family: var(--f-mono); font-size: 11px; color: var(--muted); }

/* ── Бургер + мобільне меню ────────────────────────── */
.burger {
  display: none;
  width: 38px; height: 38px;
  background: none; border: none; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 5px;
  padding: 9px; margin-left: auto; flex-shrink: 0;
}
.burger span {
  display: block; height: 2px; background: var(--paper);
  border-radius: 2px; transition: transform var(--t), opacity var(--t);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.drawer {
  position: fixed; inset: 60px 0 0 0;
  background: var(--ink);
  z-index: 190;
  padding: 24px var(--gut) 60px;
  overflow-y: auto;
  display: none;
}
.drawer[data-open="true"] { display: block; }
.drawer__form { margin-bottom: 24px; }
.drawer__form input {
  width: 100%; background: var(--raised); border: 1px solid var(--line);
  border-radius: 100px; padding: 12px 18px; outline: none; font-size: 15px;
}
.drawer a {
  display: block;
  padding: 13px 2px;
  font-size: 16px; font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  transition: color var(--t);
}
.drawer a:hover { color: var(--paper); }

/* ══════════════════════════════════════════════════════
   КНОПКИ
   ══════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 14.5px; font-weight: 700;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 100px;
  cursor: pointer;
  transition: background var(--t), border-color var(--t), color var(--t);
  white-space: nowrap;
}
.btn svg { flex-shrink: 0; }
.btn--play { background: var(--accent); color: #fff; }
.btn--play:hover { background: var(--accent-hi); }
.btn--ghost {
  background: rgba(255,255,255,.06);
  border-color: var(--line-2);
  color: var(--paper);
}
.btn--ghost:hover { background: rgba(255,255,255,.12); }

/* ══════════════════════════════════════════════════════
   ГЕРОЙ — одна пропозиція + перемикач, без автокаруселі
   ══════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: min(76vh, 720px);
  display: flex; align-items: flex-end;
  padding: 120px 0 40px;
  overflow: hidden;
}

.hero__art { position: absolute; inset: 0; z-index: 0; }
.hero__shot {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 22%;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity .7s ease, transform 1.6s ease;
}
.hero__shot[data-active="true"] { opacity: 1; transform: scale(1); }
.hero__art::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(75deg, var(--ink) 8%, rgba(11,13,17,.72) 42%, rgba(11,13,17,.15) 100%),
    linear-gradient(0deg,  var(--ink) 2%, transparent 48%);
}

.hero__in {
  position: relative; z-index: 1;
  max-width: var(--max); margin-inline: auto;
  padding-inline: var(--gut);
  width: 100%; min-width: 0;
  display: grid; gap: 40px;
  grid-template-columns: minmax(0, 640px) minmax(0, 1fr);
  align-items: end;
}
.hero__in > * { min-width: 0; }

.hero__slot { display: none; }
.hero__slot[data-active="true"] { display: block; animation: riseIn .5s both; }

@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.eyebrow {
  font-family: var(--f-display);
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted);
  display: flex; align-items: center; gap: 9px;
}
.eyebrow::before {
  content: ''; width: 18px; height: 2px;
  background: var(--accent); border-radius: 2px;
}

.hero__title {
  font-size: clamp(38px, 6.5vw, 84px);
  font-weight: 800; letter-spacing: -.035em; line-height: .96;
  margin: 16px 0 14px;
  text-wrap: balance;
}

/* ── Рядок даних: моноширинний, як на квитку ───────── */
.data {
  font-family: var(--f-mono);
  font-size: 12.5px; font-weight: 500;
  letter-spacing: .01em;
  color: var(--muted);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.data i { font-style: normal; color: var(--faint); }
.data .rate { color: var(--gold); font-weight: 700; }

.hero__meter { max-width: 260px; margin: 14px 0 18px; }
.hero__meter .meter i { background: var(--accent); }
.hero__meter .data { margin-top: 7px; font-size: 11px; }

.hero__desc {
  font-size: 15px; color: var(--muted); line-height: 1.75;
  max-width: 50ch;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 24px;
}
.hero__acts { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Перемикач героя ───────────────────────────────── */
.hero__switch {
  display: flex; gap: 10px; justify-content: flex-end;
  padding-bottom: 4px;
  min-width: 0; overflow-x: auto; scrollbar-width: none;
}
.hero__switch::-webkit-scrollbar { display: none; }
.hero__pick {
  width: 68px; flex-shrink: 0;
  background: none; border: none; padding: 0; cursor: pointer;
  opacity: .45;
  transition: opacity var(--t), transform var(--t);
}
.hero__pick img {
  width: 100%; aspect-ratio: 2/3; object-fit: cover;
  border-radius: var(--r-sm);
  background: var(--raised);
  border: 1px solid var(--line);
}
.hero__pick:hover { opacity: .8; transform: translateY(-3px); }
.hero__pick[aria-selected="true"] { opacity: 1; }
.hero__pick[aria-selected="true"] img { border-color: var(--accent); }

/* ══════════════════════════════════════════════════════
   СЕКЦІЇ ТА РЕЙКИ
   ══════════════════════════════════════════════════════ */
.section { margin-top: var(--sec); }
.section:last-of-type { margin-bottom: var(--sec); }

.sec-head {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 20px;
}
.sec-head h2 {
  font-size: clamp(19px, 2.4vw, 26px);
  font-weight: 800; letter-spacing: -.02em;
  flex-shrink: 0;
}
.sec-head__tail { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.link-more {
  font-size: 13px; font-weight: 700; color: var(--muted);
  transition: color var(--t); white-space: nowrap;
}
.link-more:hover { color: var(--accent); }

.rail-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--raised); border: 1px solid var(--line);
  color: var(--muted); cursor: pointer;
  display: grid; place-items: center;
  transition: color var(--t), border-color var(--t), background var(--t);
}
.rail-btn:hover { color: var(--paper); border-color: var(--line-2); background: var(--surface); }
.rail-btn:disabled { opacity: .3; cursor: default; }
@media (hover: none) { .rail-btn { display: none; } }

.rail {
  display: flex; gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 6px;
  /* Рейка йде під край екрана — стрічка не закінчується */
  margin-inline: calc(var(--gut) * -1);
  padding-inline: var(--gut);
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { flex: 0 0 clamp(132px, 15vw, 174px); scroll-snap-align: start; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(132px, 15vw, 174px), 1fr));
  gap: clamp(14px, 1.6vw, 22px) clamp(12px, 1.4vw, 20px);
}

/* ══════════════════════════════════════════════════════
   КАРТКА ФІЛЬМУ
   ══════════════════════════════════════════════════════ */
.card { display: block; position: relative; }

.card__art {
  position: relative;
  aspect-ratio: 2/3;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface);
  transition: transform var(--t-mid), box-shadow var(--t-mid);
}
.card:hover .card__art,
.card:focus-visible .card__art {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0,0,0,.55);
}
.card__img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--t-mid), filter var(--t);
  filter: saturate(.92);
}
.card:hover .card__img { transform: scale(1.06); filter: saturate(1.05); }

.card__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(6,7,10,.86) 0%, rgba(6,7,10,0) 55%);
  opacity: 0;
  display: grid; place-items: center;
  transition: opacity var(--t);
}
.card:hover .card__scrim, .card:focus-visible .card__scrim { opacity: 1; }
.card__play {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  transform: scale(.85);
  transition: transform var(--t);
}
.card:hover .card__play { transform: scale(1); }

.card__rate {
  position: absolute; top: 8px; left: 8px;
  font-family: var(--f-mono); font-size: 11px; font-weight: 700;
  color: var(--gold);
  background: rgba(6,7,10,.72);
  backdrop-filter: blur(8px);
  padding: 3px 7px; border-radius: 5px;
  letter-spacing: .02em;
}
.card__q {
  position: absolute; top: 8px; right: 8px;
  font-family: var(--f-mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .06em;
  color: var(--paper);
  background: rgba(6,7,10,.72);
  backdrop-filter: blur(8px);
  padding: 3px 7px; border-radius: 5px;
}

.card__body { padding: 11px 2px 8px; }
.card__title {
  font-size: 13.5px; font-weight: 700; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--t);
}
.card:hover .card__title { color: var(--accent-hi); }
.card__data {
  font-family: var(--f-mono); font-size: 11px;
  color: var(--faint); margin-top: 5px;
}
.card:hover .meter i { background: var(--accent); }

/* ══════════════════════════════════════════════════════
   ТОП-СПИСОК (бічна колонка головної)
   ══════════════════════════════════════════════════════ */
.split { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: clamp(28px, 4vw, 56px); }

.chart { display: flex; flex-direction: column; }
.chart a {
  display: grid;
  grid-template-columns: 34px 40px minmax(0,1fr) auto;
  align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  transition: background var(--t);
}
.chart a:first-child { border-top: 1px solid var(--line); }
.chart a:hover { background: rgba(255,255,255,.03); }
.chart__n {
  font-family: var(--f-mono); font-size: 13px; font-weight: 700;
  color: var(--faint); text-align: center;
}
.chart a:nth-child(-n+3) .chart__n { color: var(--accent); }
.chart img {
  width: 40px; aspect-ratio: 2/3; object-fit: cover;
  border-radius: 4px; background: var(--raised);
}
.chart__t {
  display: block;
  font-size: 13px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chart__y { display: block; font-family: var(--f-mono); font-size: 11px; color: var(--faint); margin-top: 2px; }
.chart__r { font-family: var(--f-mono); font-size: 12px; font-weight: 700; color: var(--gold); }

/* ══════════════════════════════════════════════════════
   ЧІПИ (жанри, сортування, джерела)
   ══════════════════════════════════════════════════════ */
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chips--scroll {
  flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
  margin-inline: calc(var(--gut) * -1); padding-inline: var(--gut);
}
.chips--scroll::-webkit-scrollbar { display: none; }

.chip {
  font-size: 12.5px; font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 6px 15px;
  cursor: pointer; white-space: nowrap;
  transition: color var(--t), border-color var(--t), background var(--t);
}
.chip:hover { color: var(--paper); border-color: var(--line-2); }
.chip[aria-pressed="true"], .chip[aria-current="true"] {
  color: #fff; background: var(--accent); border-color: var(--accent);
}

/* ══════════════════════════════════════════════════════
   ЗАГОЛОВОК СТОРІНКИ (списки)
   ══════════════════════════════════════════════════════ */
.pagehead {
  border-bottom: 1px solid var(--line);
  padding: clamp(32px, 5vw, 56px) 0 clamp(24px, 3vw, 36px);
}
.pagehead h1 {
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 800; letter-spacing: -.035em; line-height: 1.02;
  margin: 12px 0 8px;
}
.pagehead p { color: var(--muted); font-size: 14.5px; }
.pagehead .data { margin-top: 4px; }

.toolbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 24px 0 24px;
}
.toolbar__label {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
}

/* ══════════════════════════════════════════════════════
   СТОРІНКА ФІЛЬМУ
   ══════════════════════════════════════════════════════ */
.crumbs {
  font-family: var(--f-mono); font-size: 11.5px;
  color: var(--faint);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 14px 0;
}
.crumbs a { transition: color var(--t); }
.crumbs a:hover { color: var(--paper); }

.film { position: relative; }
.film__art {
  position: absolute; top: 0; left: 0; right: 0;
  height: clamp(280px, 46vw, 560px);
  background-size: cover; background-position: center 20%;
  z-index: 0;
}
.film__art::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(0deg, var(--ink) 4%, rgba(11,13,17,.62) 58%, rgba(11,13,17,.35) 100%),
    linear-gradient(90deg, rgba(11,13,17,.82) 0%, transparent 62%);
}
.film__in {
  position: relative; z-index: 1;
  padding-top: clamp(150px, 26vw, 320px);
  display: grid;
  grid-template-columns: 260px minmax(0,1fr);
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
}

.poster {
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0,0,0,.7);
  position: relative;
  background: var(--surface);
}
.poster img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.poster__flag {
  position: absolute; top: 10px; left: 10px;
  font-family: var(--f-mono); font-size: 10px; font-weight: 700;
  letter-spacing: .06em;
  background: var(--gold); color: #0B0D11;
  padding: 4px 9px; border-radius: 5px;
}

.specs { margin-top: 18px; }
.specs div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.specs div:first-child { border-top: 1px solid var(--line); }
.specs dt {
  font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--faint);
  flex-shrink: 0;
}
.specs dd { text-align: right; font-weight: 600; }

.film__title {
  font-size: clamp(30px, 4.6vw, 58px);
  font-weight: 800; letter-spacing: -.035em; line-height: .98;
  text-wrap: balance;
}
.film__orig { color: var(--muted); font-size: 14.5px; margin-top: 8px; }

.film__stats {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  margin: 22px 0;
}
.score { display: flex; align-items: baseline; gap: 3px; }
.score b {
  font-family: var(--f-mono); font-size: 34px; font-weight: 700;
  color: var(--gold); line-height: 1;
}
.score span { font-family: var(--f-mono); font-size: 12px; color: var(--faint); }

.film__tagline {
  font-size: 16px; color: var(--muted); font-style: italic;
  border-left: 2px solid var(--accent);
  padding-left: 14px;
  margin-bottom: 20px;
}
.film__text { font-size: 15.5px; line-height: 1.8; color: #C7CCD8; max-width: 68ch; }

.block { margin-top: 32px; }
.block__h {
  font-family: var(--f-mono); font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--faint);
  margin-bottom: 12px;
}

.cast { display: flex; flex-wrap: wrap; gap: 8px; }
.cast div {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 8px 13px;
}
.cast b { display: block; font-size: 13px; font-weight: 700; }
.cast span { font-size: 11.5px; color: var(--muted); }

/* ── Плеєр ─────────────────────────────────────────── */
.player { background: #06070A; margin-top: var(--sec); border-block: 1px solid var(--line); }
/* Плеєр вужчий за сітку: 16:9 на всю ширину не влазить у висоту екрана */
.player__in { max-width: 1180px; padding-block: clamp(28px, 4vw, 44px); }
.player__head {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.player__head h2 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.player__frame {
  aspect-ratio: 16/9; width: 100%;
  border-radius: var(--r-lg); overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 1px var(--line), 0 40px 90px rgba(0,0,0,.8);
}
.player__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.player__empty {
  aspect-ratio: 16/9; display: grid; place-items: center;
  background: var(--surface); border-radius: var(--r-lg);
  color: var(--muted); font-size: 14.5px; text-align: center; padding: 24px;
}
.player__note {
  margin-top: 12px;
  font-family: var(--f-mono); font-size: 11px; line-height: 1.7;
  color: var(--faint); max-width: 72ch;
}

/* Трейлер — другорядний, тому не на всю ширину колонки */
.frame16 { aspect-ratio: 16/9; max-width: 720px; border-radius: var(--r); overflow: hidden; background: #000; }
.frame16 iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ══════════════════════════════════════════════════════
   ПАГІНАЦІЯ · ПОРОЖНІ СТАНИ
   ══════════════════════════════════════════════════════ */
.pager { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 44px; }
.pager a {
  font-family: var(--f-mono); font-size: 13px;
  min-width: 38px; height: 38px;
  display: grid; place-items: center; padding-inline: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); color: var(--muted);
  transition: color var(--t), border-color var(--t);
}
.pager a:hover { color: var(--paper); border-color: var(--line-2); }
.pager a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #fff; }

.blank { padding: clamp(56px, 10vw, 110px) 0; text-align: center; }
.blank h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 10px; }
.blank p { color: var(--muted); margin-bottom: 22px; }

.notfound {
  min-height: 62vh; display: grid; place-content: center; text-align: center; gap: 14px;
}
.notfound__code {
  font-family: var(--f-mono); font-size: clamp(56px, 12vw, 120px); font-weight: 700;
  color: var(--accent); line-height: 1; letter-spacing: -.04em;
}

/* ══════════════════════════════════════════════════════
   ПІДВАЛ
   ══════════════════════════════════════════════════════ */
.footer { border-top: 1px solid var(--line); margin-top: var(--sec); padding-block: 48px 32px; }
.footer__top {
  display: grid; grid-template-columns: minmax(220px, 1fr) 2fr;
  gap: 40px; padding-bottom: 36px;
}
.footer__brand p { color: var(--muted); font-size: 13.5px; line-height: 1.7; max-width: 30ch; margin-top: 12px; }
.footer__cols { display: flex; gap: clamp(28px, 5vw, 72px); flex-wrap: wrap; }
.footer__col { display: flex; flex-direction: column; gap: 9px; }
.footer__col h3 {
  font-family: var(--f-mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--faint);
  margin-bottom: 3px;
}
.footer__col a { font-size: 13.5px; color: var(--muted); transition: color var(--t); }
.footer__col a:hover { color: var(--paper); }
/* Атрибуція TMDB — навмисно тихіша за логотип MOOVIX:
   умови TMDB вимагають, щоб їхній знак був менш помітним за ваш. */
.footer__tmdb {
  display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-block: 26px;
}
.footer__tmdb a { flex-shrink: 0; margin-top: 3px; }
.footer__tmdb img {
  width: 104px; height: auto; display: block;
  opacity: .85; transition: opacity var(--t);
}
.footer__tmdb a:hover img { opacity: 1; }
.footer__tmdb p {
  font-size: 12.5px; line-height: 1.7;
  color: var(--muted); max-width: 68ch; min-width: 0;
}
/* Український рядок — довідковий, тому тихіший за обов'язковий напис */
.footer__tmdb p span {
  display: block; margin-top: 4px;
  font-family: var(--f-mono); font-size: 10.5px; color: var(--faint);
}

.footer__bottom {
  border-top: 1px solid var(--line); padding-top: 22px;
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  font-family: var(--f-mono); font-size: 11px; color: var(--faint); line-height: 1.7;
}

/* ══════════════════════════════════════════════════════
   ПОЯВА ПРИ СКРОЛІ
   ══════════════════════════════════════════════════════ */
.reveal { opacity: 0; transform: translateY(16px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s ease; }

.spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--line-2); border-top-color: var(--accent);
  animation: spin .7s linear infinite; margin: 48px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════
   АДАПТИВ
   ══════════════════════════════════════════════════════ */
@media (max-width: 1080px) {
  .split { grid-template-columns: 1fr; }
  .hero__in { grid-template-columns: 1fr; }
  .hero__switch { justify-content: flex-start; }
}

@media (max-width: 860px) {
  .film__in { grid-template-columns: 1fr; }
  .poster { max-width: 220px; }
  .footer__top { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 760px) {
  .nav, .search { display: none; }
  .burger { display: flex; }
  .hero { min-height: 0; padding: 90px 0 32px; }
  .hero__title { line-height: 1.02; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .hero__acts .btn { flex: 1; }
}

@media (max-width: 420px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .chart a { grid-template-columns: 28px 34px minmax(0,1fr) auto; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
