/* FilmSeries — premium dark cinematic theme. No external fonts, no inline styles (strict CSP). */

:root {
  --bg: #0B1018;
  --bg-raised: #0F1520;
  --surface: #131B27;
  --surface-2: #1A2433;
  --surface-3: #223045;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #EEF2F7;
  --text-soft: #BAC4D2;
  --muted: #8D99AA;
  --accent: #19C6B5;
  --accent-strong: #2BDECB;
  --accent-ink: #04211E;
  --accent-soft: rgba(25, 198, 181, 0.14);
  --gold: #F5B84B;
  --gold-soft: rgba(245, 184, 75, 0.14);
  --danger: #FF8A80;
  --success: #6EE7B7;
  --focus: #8FF7EC;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --container: 1320px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

@supports (overflow-x: clip) {
  body { overflow-x: clip; }
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.2; font-weight: 750; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
[role="list"] { list-style: none; }

a { color: var(--accent-strong); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.muted { color: var(--muted); }
.text-link { font-weight: 600; font-size: 0.92rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.97rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-strong); color: var(--accent-ink); }
.btn--ghost { border-color: var(--border-strong); background: rgba(255, 255, 255, 0.04); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.btn--small { min-height: 40px; padding: 8px 16px; font-size: 0.9rem; }

/* Watch Now: verified official destination only (see Tmdb\WatchDestination). */
.btn--watch {
  min-height: 50px;
  padding: 8px 20px 8px 8px;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent) 55%, #12A596);
  color: var(--accent-ink);
  font-size: 1rem;
  white-space: normal;
  box-shadow: 0 10px 26px -12px rgba(25, 198, 181, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn--watch:hover { background: linear-gradient(135deg, #46E8D6, var(--accent-strong) 55%, var(--accent)); color: var(--accent-ink); }
.btn--watch:not(:has(.btn__logo)) { padding-left: 20px; }
.btn__logo { flex: none; width: 34px; height: 34px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 2px rgba(4, 33, 30, 0.25); }
.btn__on { font-weight: 800; }
.btn__ext { flex: none; opacity: 0.75; }

.watch-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 14px 0 0;
  color: var(--text-soft);
  font-size: 0.88rem;
}
.watch-note__region {
  padding: 2px 10px;
  border: 1px solid rgba(25, 198, 181, 0.4);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 700;
}
.watch-note a { font-weight: 650; }
.watch-note__change { white-space: nowrap; }
.watch-note__change::before { content: "·"; display: inline-block; margin-right: 8px; color: var(--muted); text-decoration: none; }

.watch-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 22px;
  padding: 18px 20px;
  border: 1px solid rgba(25, 198, 181, 0.4);
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(25, 198, 181, 0.16), rgba(25, 198, 181, 0.04) 60%, rgba(245, 184, 75, 0.06)), var(--surface);
}
.watch-card--options { border-color: var(--border-strong); background: var(--surface); }
.watch-card__info { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 260px; }
.watch-card__logo { flex: none; width: 52px; height: 52px; border-radius: 12px; }
.watch-card__title { margin: 0; color: var(--text); font-size: 1.05rem; font-weight: 750; }
.watch-card__meta { margin: 2px 0 0; color: var(--muted); font-size: 0.86rem; }
@media (max-width: 560px) {
  .watch-card__btn { width: 100%; }
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.18s, border-color 0.18s, opacity 0.18s;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 16, 24, 0.88);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: var(--bg); }
}

/* Desktop: logo | centered menu | search. Equal 1fr side columns keep the menu at the true center. */
.site-header__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(12px, 2.5vw, 32px);
  height: var(--header-h);
}
.site-header__inner > .brand { justify-self: start; }
.site-header__tools { justify-self: end; display: flex; align-items: center; min-width: 0; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--text); }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__name span { color: var(--accent); }

.site-nav ul { display: flex; justify-content: center; gap: 2px; }
.site-nav a {
  position: relative;
  display: block;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.96rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s, background-color 0.18s;
}
.site-nav a:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 3px;
  height: 3px;
  border-radius: 3px;
  background: var(--accent);
}

.header-search {
  display: flex;
  align-items: center;
  width: min(300px, 26vw);
  padding: 3px 3px 3px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  transition: border-color 0.18s, width 0.25s var(--ease);
}
.header-search:focus-within { border-color: var(--accent); outline: 3px solid rgba(143, 247, 236, 0.35); outline-offset: 1px; }
.header-search input {
  flex: 1;
  min-width: 0;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.94rem;
}
.header-search input:focus { outline: none; }
.header-search input::placeholder { color: var(--muted); opacity: 1; }
.header-search__btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
}
.header-search__btn:hover { background: var(--accent-soft); color: var(--accent-strong); }

.search-link {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--text);
}
.search-link:hover, .search-link.is-current { background: var(--accent-soft); color: var(--accent-strong); }

@media (max-width: 1020px) {
  .site-nav a { padding: 10px 12px; }
  .site-nav a[aria-current="page"]::after { left: 12px; right: 12px; }
  .header-search { width: min(230px, 24vw); }
}

/* Tablet/mobile: logo + search icon on row 1, full-width centered menu on row 2. */
@media (max-width: 860px) {
  .site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 12px;
    height: auto;
    padding-top: 8px;
  }
  .brand { order: 1; min-height: 44px; }
  .site-header__tools { order: 2; margin-left: auto; }
  .header-search { display: none; }
  .search-link { display: grid; }
  .site-nav {
    order: 3;
    flex-basis: calc(100% + var(--gutter) * 2); /* full viewport width, so centering is the true center */
    margin-inline: calc(var(--gutter) * -1);
    padding: 4px var(--gutter) 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  /* Centered when it fits; falls back to start-aligned scrolling instead of clipping. */
  .site-nav ul { width: max-content; margin-inline: auto; }
  .site-nav a { padding: 9px 13px; font-size: 0.92rem; }
  .site-nav a[aria-current="page"]::after { left: 13px; right: 13px; bottom: 2px; }
  html { scroll-padding-top: 130px; }
}

@media (max-width: 360px) {
  .brand { font-size: 1.18rem; gap: 8px; }
  .brand__mark { width: 30px; height: 30px; }
  .site-nav a { padding: 9px 10px; font-size: 0.88rem; }
  .site-nav a[aria-current="page"]::after { left: 10px; right: 10px; }
}

/* ---------- Home hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: clamp(440px, 62vh, 600px);
  padding-block: 64px 108px;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: -2; background: var(--surface); }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(11, 16, 24, 0.96) 0%, rgba(11, 16, 24, 0.82) 32%, rgba(11, 16, 24, 0.35) 62%, rgba(11, 16, 24, 0.1) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(11, 16, 24, 0.6) 22%, rgba(11, 16, 24, 0) 52%);
}
.hero__inner > * { max-width: 620px; }

.eyebrow {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.eyebrow__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }

.hero__title {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin-bottom: 14px;
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 600;
}
.hero__meta a { color: var(--text-soft); text-decoration: none; }
.hero__meta a:hover { color: var(--accent-strong); }
.hero__score { display: inline-flex; align-items: center; gap: 5px; color: var(--gold); }
.hero__score small { color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.hero__overview {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 1.04rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 0; }

/* ---------- Finder (H1 + search) ---------- */

.finder { position: relative; z-index: 2; margin-top: -72px; }
.finder--solo { margin-top: 32px; }
.finder__panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 18px 36px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(25, 198, 181, 0.08), rgba(245, 184, 75, 0.04) 60%, transparent), var(--surface);
  box-shadow: var(--shadow);
}
.finder__intro h1 { margin-bottom: 6px; font-size: clamp(1.35rem, 2.4vw, 1.85rem); }
.finder__intro p { margin: 0; color: var(--text-soft); font-size: 0.97rem; }

.finder__form { display: flex; gap: 10px; }
.finder__field {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-raised);
  color: var(--muted);
}
.finder__field:focus-within { border-color: var(--accent); outline: 3px solid rgba(143, 247, 236, 0.35); outline-offset: 1px; }
.finder__field input {
  flex: 1;
  min-width: 0;
  height: 48px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}
.finder__field input:focus { outline: none; }
.finder__field input::placeholder { color: var(--muted); opacity: 1; }
.finder__form select { width: auto; min-width: 118px; border-radius: 999px; }

.quick-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.quick-links a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  font-size: 0.87rem;
  font-weight: 600;
  text-decoration: none;
}
.quick-links a:hover { border-color: var(--accent); color: var(--text); }

@media (max-width: 900px) {
  .finder__panel { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hero { min-height: 420px; padding-block: 40px 96px; }
  .hero__overview { -webkit-line-clamp: 2; font-size: 0.98rem; }
  .hero__actions .btn { flex: 1 1 auto; }
  .finder { margin-top: -64px; }
  .finder__form { flex-wrap: wrap; }
  .finder__field { flex-basis: 100%; }
  .finder__form select { flex: 1; }
  .finder__form .btn { flex: 1; }
}

/* ---------- Section headings ---------- */

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.section-head h2 { margin: 0; }
.section-head__intro { margin: 4px 0 0; color: var(--muted); font-size: 0.93rem; }
.section-head__actions { display: flex; flex: none; align-items: center; gap: 12px; }
.see-all {
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.see-all::after { content: " →"; }
.see-all:hover { color: var(--text); }

/* ---------- Rails ---------- */

.rail { padding-block: clamp(26px, 4vw, 40px) 0; }
.rail__controls { display: flex; gap: 8px; }
.rail__controls[hidden] { display: none; }
.rail__viewport {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
  scrollbar-width: none;
}
.rail__viewport::-webkit-scrollbar { display: none; }
.rail__viewport:focus-visible { outline-offset: -3px; }
.rail__list {
  display: flex;
  gap: clamp(12px, 1.4vw, 18px);
  width: max-content;
  padding-inline: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter)));
  padding-block: 4px 10px;
}
.rail__list > li { width: clamp(138px, 14.5vw, 196px); scroll-snap-align: start; }

.rail--inset { padding-top: 0; }
.rail--inset .rail__list { padding-inline: 0; }
.rail--inset .rail__viewport { scroll-padding-inline: 0; }
.rail--inset .rail__list > li { width: 132px; }

/* ---------- Cards ---------- */

.card { position: relative; }
.card__link { display: block; color: var(--text); text-decoration: none; }
.card__poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--border);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}
.card__poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.card__link:hover .card__poster,
.card__link:focus-visible .card__poster {
  transform: translateY(-4px);
  box-shadow: 0 0 0 2px var(--accent), 0 16px 30px -14px rgba(0, 0, 0, 0.8);
}
.card__link:hover .card__poster img { transform: scale(1.04); }
.card__link:focus-visible { outline: none; }

.card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(11, 16, 24, 0.85);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.3;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.card__badge--score { color: var(--gold); }
.card__badge--date { color: var(--accent-strong); }
.card__type {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.card__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 10px;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.3;
}
.card__link:hover .card__title { color: var(--accent-strong); }
.card__meta { margin: 3px 0 0; color: var(--muted); font-size: 0.83rem; }

.poster-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  padding: 14px;
  background: linear-gradient(160deg, var(--surface-3), var(--surface));
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: clamp(18px, 2vw, 26px) clamp(12px, 1.6vw, 20px);
}
@media (max-width: 700px) {
  .poster-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .poster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Home blocks ---------- */

.home-block { padding-block: clamp(36px, 5vw, 56px) 0; }

.genre-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.genre-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 92px;
  padding: 14px 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.22s var(--ease), border-color 0.22s;
}
.genre-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(120% 120% at 100% 0%, var(--tile, rgba(25, 198, 181, 0.32)), transparent 60%);
  opacity: 0.9;
}
.genre-tile > * { position: relative; }
.genre-tile span { font-size: 1.02rem; font-weight: 750; line-height: 1.25; }
.genre-tile small { color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.genre-tile:hover { transform: translateY(-3px); border-color: var(--accent); color: var(--text); }
.genre-tiles > li:nth-child(8n+2) .genre-tile { --tile: rgba(245, 184, 75, 0.3); }
.genre-tiles > li:nth-child(8n+3) .genre-tile { --tile: rgba(122, 140, 255, 0.32); }
.genre-tiles > li:nth-child(8n+4) .genre-tile { --tile: rgba(255, 110, 120, 0.28); }
.genre-tiles > li:nth-child(8n+5) .genre-tile { --tile: rgba(64, 196, 255, 0.28); }
.genre-tiles > li:nth-child(8n+6) .genre-tile { --tile: rgba(190, 120, 255, 0.28); }
.genre-tiles > li:nth-child(8n+7) .genre-tile { --tile: rgba(120, 220, 140, 0.26); }
.genre-tiles > li:nth-child(8n+8) .genre-tile { --tile: rgba(255, 150, 80, 0.28); }
@media (max-width: 480px) {
  .genre-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .genre-tile { min-height: 78px; }
}

.country-list { display: flex; flex-wrap: wrap; gap: 10px; }
.country-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.93rem;
  font-weight: 600;
  text-decoration: none;
}
.country-chip__code {
  display: grid;
  place-items: center;
  width: 34px;
  height: 28px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.country-chip:hover { border-color: var(--accent); color: var(--text); }

/* Homepage guide: sticky introduction beside a single reading column of short steps. */
.guide { padding-bottom: 8px; }
.guide__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.3fr);
  align-items: start;
  gap: clamp(28px, 5vw, 72px);
}
.guide__intro { position: sticky; top: calc(var(--header-h) + 24px); }
.guide__intro h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); letter-spacing: -0.02em; }
.guide__intro > p:not(.eyebrow) { color: var(--text-soft); font-size: 1.06rem; line-height: 1.7; }
.guide__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.guide__links a {
  display: inline-block;
  padding: 7px 15px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}
.guide__links a:hover { border-color: var(--accent); background: var(--accent-soft); }
.guide__body {
  padding: clamp(6px, 1.5vw, 12px) clamp(20px, 3vw, 36px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(25, 198, 181, 0.05), transparent 30%), var(--surface);
}
.guide__step { padding-block: 22px; border-bottom: 1px solid var(--border); }
.guide__step:last-child { border-bottom: 0; }
.guide__step h3 { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; font-size: 1.12rem; }
.guide__step h3::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--accent);
  transform: translateY(-1px) rotate(45deg);
}
.guide__step:nth-child(even) h3::before { background: var(--gold); }
.guide__step p { max-width: 68ch; margin: 0; color: var(--text-soft); line-height: 1.75; }
@media (max-width: 900px) {
  .guide__inner { grid-template-columns: minmax(0, 1fr); }
  .guide__intro { position: static; }
}

/* ---------- Page headings, breadcrumbs ---------- */

.page-head { padding-block: clamp(24px, 4vw, 44px) 10px; }
.page-head h1 { margin-bottom: 8px; }
.page-head__lede { max-width: 72ch; margin: 0; color: var(--text-soft); font-size: 1.04rem; }

.breadcrumbs { padding-top: 18px; font-size: 0.88rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; }
.breadcrumbs li { display: inline-flex; align-items: center; min-width: 0; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin-inline: 8px; color: var(--surface-3); }
.breadcrumbs a { color: var(--text-soft); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent-strong); text-decoration: underline; }
.breadcrumbs [aria-current] { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }

/* ---------- Forms ---------- */

input, select, textarea, button { font: inherit; }

select,
.field input,
.field textarea,
.search-form input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background-color: var(--bg-raised);
  color: var(--text);
}
select {
  padding-right: 38px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%2319C6B5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  cursor: pointer;
}
select option, select optgroup { background: var(--surface); color: var(--text); }
select:hover, .field input:hover, .field textarea:hover, .search-form input:hover { border-color: rgba(255, 255, 255, 0.28); }
select:focus-visible, .field input:focus-visible, .field textarea:focus-visible, .search-form input:focus-visible {
  border-color: var(--accent);
  outline: 3px solid rgba(143, 247, 236, 0.35);
  outline-offset: 1px;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }

label { display: block; margin-bottom: 6px; color: var(--text-soft); font-size: 0.85rem; font-weight: 650; }

/* ---------- Catalog tools ---------- */

.catalog-tools {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.segmented {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  border-radius: 999px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
}
.segmented a {
  padding: 8px 18px;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}
.segmented a:hover { color: var(--text); }
.segmented a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }

.filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 12px;
}
.filters__field { min-width: 0; }
.filters__actions .btn { width: 100%; }
@media (max-width: 1100px) {
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .catalog-tools { padding: 14px; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .filters__actions { grid-column: 1 / -1; }
  .filters__field:nth-child(5) { grid-column: 1 / -1; }
}
@media (max-width: 380px) {
  .filters select { padding-left: 10px; padding-right: 28px; background-position: right 8px center; font-size: 0.9rem; }
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.active-filters__label { color: var(--muted); font-size: 0.87rem; font-weight: 600; }
.active-filters__clear { font-size: 0.87rem; font-weight: 700; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
}
.chip:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.chip--removable { border-color: rgba(25, 198, 181, 0.45); background: var(--accent-soft); }

.catalog-results { padding-top: 24px; }
.result-count { margin-bottom: 18px; color: var(--muted); font-size: 0.9rem; }

.empty-state {
  max-width: 560px;
  margin: 24px auto;
  padding: 34px 28px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  text-align: center;
}
.empty-state p { color: var(--text-soft); }
.empty-state p:last-child { margin-bottom: 0; }

.notice {
  margin-block: 24px;
  padding: 22px 24px;
  border: 1px solid rgba(245, 184, 75, 0.35);
  border-radius: var(--radius);
  background: var(--gold-soft);
}
.notice h2 { font-size: 1.15rem; }
.notice p:last-child { margin-bottom: 0; }
.notice--inline { margin-block: 0 16px; padding: 12px 16px; font-size: 0.93rem; }
.notice__dev { color: var(--gold); font-size: 0.88rem; }

/* ---------- Pagination ---------- */

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}
.pagination ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pagination a,
.pagination [aria-current] {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}
.pagination a:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.pagination [aria-current] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.pagination__gap { color: var(--muted); padding-inline: 4px; }
.pagination__step { padding-inline: 18px !important; }

/* ---------- Search ---------- */

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 8px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.search-form--compact { grid-template-columns: minmax(0, 1fr) auto; margin-block: 20px; }
.search-form__field { min-width: 0; }
.search-hint { margin: 12px 0 0; color: var(--muted); font-size: 0.9rem; }
@media (max-width: 760px) {
  .search-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-form__field:first-child { grid-column: 1 / -1; }
  .search-form > .btn { grid-column: 1 / -1; }
  .search-form--compact { grid-template-columns: 1fr; }
}

/* ---------- Title page ---------- */

.title-hero {
  position: relative;
  isolation: isolate;
  margin-top: 14px;
  padding-block: clamp(28px, 5vw, 56px);
  overflow: hidden;
}
.title-hero__media { position: absolute; inset: 0; z-index: -2; }
.title-hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; opacity: 0.5; }
.title-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(11, 16, 24, 0.97) 0%, rgba(11, 16, 24, 0.86) 45%, rgba(11, 16, 24, 0.6) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(11, 16, 24, 0) 40%);
}
.title-hero__inner {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: start;
  gap: clamp(24px, 4vw, 48px);
}
.title-hero__poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--border), var(--shadow);
}
.title-hero__poster img { width: 100%; height: 100%; object-fit: cover; }
.title-hero__body h1 { margin-bottom: 8px; font-size: clamp(1.9rem, 4vw, 3rem); }
.title-hero__year { color: var(--muted); font-weight: 500; }
.title-hero__facts { margin-bottom: 14px; color: var(--text-soft); font-weight: 600; }
.title-hero__tagline { margin: 16px 0 6px; color: var(--gold); font-style: italic; }
.title-hero__overview { max-width: 70ch; color: var(--text-soft); font-size: 1.04rem; }
.title-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }

.cert, .status-pill {
  padding: 2px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}
.status-pill { border-color: rgba(25, 198, 181, 0.45); color: var(--accent-strong); }

.score-row { margin-top: 18px; }
.score { display: flex; align-items: center; gap: 14px; margin: 0; }
.score__ring {
  display: grid;
  place-items: center;
  flex: none;
  width: 58px;
  height: 58px;
  border: 3px solid var(--gold);
  border-radius: 50%;
  background: rgba(11, 16, 24, 0.8);
  color: var(--gold);
  font-size: 1.15rem;
  font-weight: 800;
}
.score__label { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.score__label strong { color: var(--text); font-size: 0.95rem; }

@media (max-width: 900px) {
  .title-hero__inner { grid-template-columns: 220px minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .title-hero__inner { grid-template-columns: 1fr; }
  .title-hero__poster { width: min(46vw, 200px); }
  .title-hero__actions .btn { flex: 1 1 auto; }
}

.title-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: clamp(28px, 4vw, 48px);
  padding-top: 18px;
}
.title-main { min-width: 0; }
@media (max-width: 980px) {
  .title-layout { grid-template-columns: minmax(0, 1fr); }
}

.title-section { padding-bottom: 36px; margin-bottom: 36px; border-bottom: 1px solid var(--border); }
.title-section:last-child { border-bottom: 0; margin-bottom: 0; }

.trailer__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
}
.trailer__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.trailer__launch { position: absolute; inset: 0; display: block; color: var(--text); }
.trailer__launch img { width: 100%; height: 100%; object-fit: cover; opacity: 0.75; transition: opacity 0.25s, transform 0.4s var(--ease); }
.trailer__launch:hover img { opacity: 0.9; transform: scale(1.02); }
.trailer__play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px 14px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  transform: translate(-50%, -50%);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.7);
}
.trailer__launch:focus-visible { outline-offset: -4px; }
.fine-print { margin: 12px 0 0; color: var(--muted); font-size: 0.85rem; }

.watch-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 18px; }
.watch-head h2 { margin: 0; }
.region-form { display: flex; align-items: center; gap: 10px; }
.region-form label { margin: 0; }
.region-form select { width: auto; max-width: 220px; min-height: 40px; padding-block: 6px; }
.js .region-form[data-autosubmit] .btn { display: none; }

.provider-groups { display: grid; gap: 20px; }
.provider-group h3 { margin-bottom: 10px; color: var(--text-soft); font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; }
.provider-list { display: flex; flex-wrap: wrap; gap: 10px; }
.provider {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  font-size: 0.92rem;
  font-weight: 600;
}
.provider img, .provider__initial { width: 36px; height: 36px; border-radius: 8px; }
.provider__initial { display: grid; place-items: center; background: var(--surface-3); color: var(--gold); font-weight: 800; }

.elsewhere { margin-top: 22px; }
.elsewhere h3 { color: var(--text-soft); font-size: 0.95rem; }

.cast-card { display: flex; flex-direction: column; }
.cast-card__photo {
  display: block;
  aspect-ratio: 2 / 3;
  margin-bottom: 8px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.cast-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.cast-card__initials { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 2rem; font-weight: 800; }
.cast-card__name { font-size: 0.9rem; font-weight: 700; line-height: 1.3; }
.cast-card__role { color: var(--muted); font-size: 0.82rem; line-height: 1.35; }

.next-episode { padding: 10px 14px; border-left: 3px solid var(--gold); background: var(--gold-soft); border-radius: 0 8px 8px 0; font-size: 0.93rem; }
.season-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.season {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.season__poster { flex: none; width: 52px; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 6px; background: var(--surface-3); }
.season__poster img { width: 100%; height: 100%; object-fit: cover; }
.season__body { display: flex; flex-direction: column; min-width: 0; }
.season__name { font-weight: 700; }
.season__meta { color: var(--muted); font-size: 0.85rem; }

.title-facts {
  position: sticky;
  top: calc(var(--header-h) + 18px);
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.title-facts dl { margin: 0; }
.title-facts dl > div { padding-block: 10px; border-bottom: 1px solid var(--border); }
.title-facts dl > div:first-child { padding-top: 0; }
.title-facts dt { color: var(--muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.title-facts dd { margin: 2px 0 0; font-weight: 600; }
.external-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; font-size: 0.92rem; font-weight: 600; }
@media (max-width: 980px) {
  .title-facts { position: static; }
}

/* ---------- Compare ---------- */

.compare-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 12px; }
.compare-slot {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 140px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.compare-slot--empty { flex-direction: column; align-items: flex-start; justify-content: center; border-style: dashed; }
.compare-slot--empty p { margin: 0; }
.compare-slot__label { font-weight: 700; }
.compare-slot__poster { flex: none; width: 84px; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 8px; background: var(--surface-2); }
.compare-slot__poster img { width: 100%; height: 100%; object-fit: cover; }
.compare-slot__title { margin-bottom: 2px; font-size: 1.1rem; }
.compare-slot__title a { color: var(--text); text-decoration: none; }
.compare-slot__title a:hover { color: var(--accent-strong); }
.compare-slot .muted { margin-bottom: 6px; font-size: 0.88rem; }
@media (max-width: 560px) {
  .compare-slots { grid-template-columns: 1fr; }
}

.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.pick {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
.pick:hover { border-color: var(--accent); color: var(--text); }
.pick__poster { flex: none; width: 46px; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 6px; background: var(--surface-3); }
.pick__body { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.35; }
.pick__body .muted { font-size: 0.85rem; }
.pick__action { color: var(--accent-strong); font-size: 0.88rem; font-weight: 700; }

.compare-common {
  margin-top: 24px;
  padding: 18px 22px;
  border: 1px solid rgba(25, 198, 181, 0.35);
  border-radius: var(--radius);
  background: var(--accent-soft);
}
.compare-common h2 { font-size: 1.1rem; }
.compare-common ul { display: grid; gap: 4px; }
.compare-common p { margin: 0; }

.compare-table-wrap, .table-wrap { margin-top: 20px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.compare-table, .table-wrap table { width: 100%; min-width: 560px; border-collapse: collapse; }
.compare-table th, .compare-table td, .table-wrap th, .table-wrap td { padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.compare-table tr:last-child > *, .table-wrap tr:last-child > * { border-bottom: 0; }
.compare-table thead th { background: var(--surface-2); font-size: 1rem; }
.compare-table thead td { background: var(--surface-2); }
.compare-table tbody th { width: 22%; color: var(--muted); font-size: 0.85rem; font-weight: 700; }
.compare-table tbody td { width: 39%; }
.table-wrap thead th { background: var(--surface-2); font-size: 0.85rem; }

/* ---------- Static pages and contact ---------- */

.static-page { max-width: 880px; padding-bottom: 24px; }
.prose { color: var(--text-soft); font-size: 1.02rem; }
.prose h2 { margin-top: 2em; color: var(--text); font-size: 1.35rem; }
.prose h3 { margin-top: 1.5em; color: var(--text); }
.prose ul { padding-left: 1.3em; margin-bottom: 1em; }
.prose li { margin-bottom: 0.4em; }
.prose strong { color: var(--text); }
.prose code { padding: 1px 6px; border-radius: 5px; background: var(--surface-2); color: var(--text); font-size: 0.9em; }
.lead { color: var(--text); font-size: 1.12rem; }
.draft-notice { padding: 12px 16px; border: 1px dashed var(--gold); border-radius: var(--radius-sm); color: var(--gold); font-size: 0.9rem; }

.contact-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 12px; }
@media (max-width: 860px) { .contact-layout { grid-template-columns: 1fr; } }
.contact-form { display: grid; gap: 18px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.contact-form .btn { justify-self: start; }
.field__hint { margin: 6px 0 0; color: var(--muted); font-size: 0.85rem; }
.field__error { margin: 6px 0 0; color: var(--danger); font-size: 0.88rem; font-weight: 600; }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field--honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field--checkbox { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.field--checkbox input { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; accent-color: var(--accent); }
.field--checkbox label { margin: 0; font-weight: 500; font-size: 0.9rem; }
.field--checkbox .field__error { grid-column: 1 / -1; }
.field textarea { resize: vertical; min-height: 160px; }
.contact-aside { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-raised); color: var(--text-soft); font-size: 0.94rem; }
.contact-aside h2 { color: var(--text); font-size: 1.1rem; }
.contact-aside ul { display: grid; gap: 10px; padding-left: 1.1em; }
.alert { margin-bottom: 18px; padding: 16px 18px; border-radius: var(--radius-sm); }
.alert p:last-child, .alert ul:last-child { margin-bottom: 0; }
.alert ul { padding-left: 1.2em; }
.alert--success { border: 1px solid rgba(110, 231, 183, 0.45); background: rgba(110, 231, 183, 0.1); }
.alert--error { border: 1px solid rgba(255, 138, 128, 0.5); background: rgba(255, 138, 128, 0.1); }

/* ---------- Errors ---------- */

.error-block { max-width: 640px; padding-block: clamp(48px, 10vw, 100px); text-align: center; }
.error-block .brand { margin-bottom: 28px; }
.error-block__search { width: 100%; max-width: 440px; margin: 24px auto; }
.error-block__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.debug { margin-top: 32px; padding: 16px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-raised); color: var(--text-soft); font-size: 0.8rem; text-align: left; white-space: pre-wrap; }

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

.site-footer {
  margin-top: clamp(56px, 8vw, 96px);
  padding-block: 48px 28px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-raised), var(--bg));
  color: var(--text-soft);
  font-size: 0.93rem;
}
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-brand p { max-width: 42ch; margin-top: 14px; }
.footer-heading { margin-bottom: 12px; color: var(--text); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; }
.footer-col ul { display: grid; gap: 4px; }
.footer-col a { display: inline-block; padding-block: 4px; color: var(--text-soft); text-decoration: none; }
.footer-col a:hover { color: var(--accent-strong); text-decoration: underline; }
.footer-attribution {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 36px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.86rem;
}
.footer-attribution p { margin: 0; }
.tmdb-badge { flex: none; text-decoration: none; }
.tmdb-badge img { width: 120px; height: auto; }
.tmdb-badge__text {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #90CEA1, #3CBEC9 56%, #00B3E5);
  color: #0D253F;
  font-weight: 900;
  letter-spacing: 0.06em;
}
.footer-copy { margin: 20px 0 0; color: var(--muted); font-size: 0.85rem; }
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-attribution { flex-direction: column; align-items: flex-start; }
}

/* ---------- Broken images ---------- */

.img-broken { position: relative; background: linear-gradient(160deg, var(--surface-3), var(--surface)); }
.img-broken img { visibility: hidden; }
.img-broken::after {
  content: "Image unavailable";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
}
.hero__media.img-broken::after, .title-hero__media.img-broken::after, .trailer__launch.img-broken::after { content: none; }

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .card__link:hover .card__poster, .genre-tile:hover { transform: none; }
}
