@import url('https://fonts.googleapis.com/css2?family=Onest:wght@400;500;600;700;800&display=swap');

/* ── Tokens ── */
:root,
[data-mode="dark"] {
  --bg: #0b0b0f;
  --surface: #16161e;
  --surface-2: #1e1e28;
  --border: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --muted: #9ca3af;
  --dim: #6b7280;
  --header-bg: rgba(11, 11, 15, 0.96);
  --header-top: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
  --hero-overlay:
    linear-gradient(77deg, rgba(11, 11, 15, 0.95) 0%, rgba(11, 11, 15, 0.6) 45%, transparent 75%),
    linear-gradient(0deg, var(--bg) 0%, transparent 35%),
    linear-gradient(180deg, rgba(11, 11, 15, 0.4) 0%, transparent 30%);
  --hero-desc: rgba(255, 255, 255, 0.78);
  --hero-tag: rgba(255, 255, 255, 0.55);
  --btn-ghost-bg: rgba(255, 255, 255, 0.15);
  --btn-ghost-color: #fff;
  --btn-ghost-hover: rgba(255, 255, 255, 0.25);
  --icon-btn-bg: rgba(255, 255, 255, 0.08);
  --icon-btn-hover: rgba(255, 255, 255, 0.14);
  --nav-link: rgba(255, 255, 255, 0.65);
  --accent: #e50914;
  --accent-hover: #f40612;
  --green: #46d369;
  --radius: 6px;
  --radius-lg: 12px;
  --font: "Onest", system-ui, sans-serif;
  --header-h: 64px;
  --container: 1200px;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-mode="light"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --border: rgba(0, 0, 0, 0.08);
  --text: #111118;
  --muted: #5c5c6e;
  --dim: #9494a8;
  --header-bg: rgba(255, 255, 255, 0.97);
  --header-top: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, transparent 100%);
  --hero-overlay:
    linear-gradient(77deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.82) 45%, transparent 75%),
    linear-gradient(0deg, var(--bg) 0%, transparent 35%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, transparent 30%);
  --hero-desc: var(--muted);
  --hero-tag: var(--dim);
  --btn-ghost-bg: #f3f4f6;
  --btn-ghost-color: var(--text);
  --btn-ghost-hover: #e5e7eb;
  --icon-btn-bg: #f3f4f6;
  --icon-btn-hover: #e5e7eb;
  --nav-link: var(--muted);
}

[data-color="red"]    { --accent: #e50914; --accent-hover: #f40612; }
[data-color="green"]  { --accent: #16a34a; --accent-hover: #22c55e; }
[data-color="blue"]   { --accent: #2563eb; --accent-hover: #3b82f6; }
[data-color="purple"] { --accent: #7c3aed; --accent-hover: #8b5cf6; }
[data-color="orange"] { --accent: #ea580c; --accent-hover: #f97316; }
[data-color="pink"]   { --accent: #db2777; --accent-hover: #ec4899; }
[data-color="cyan"]   { --accent: #0891b2; --accent-hover: #06b6d4; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ── */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  height: var(--header-h);
  transition: background 0.4s var(--ease);
}

.header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--header-top);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s;
}

.header.is-scrolled::after { opacity: 0; }

.header.is-scrolled {
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
  position: relative;
  z-index: 1;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--accent);
  flex-shrink: 0;
}

.logo__icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo--footer .logo__icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.nav {
  display: none;
  gap: 2px;
}

.nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--nav-link);
  padding: 8px 12px;
  border-radius: var(--radius);
  transition: color 0.2s;
}

.nav a:hover { color: var(--text); }
.nav a.is-active { color: var(--text); font-weight: 600; }

.header__actions {
  display: none;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
  padding: 8px;
}

.burger span {
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: 0.25s;
}

.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--bg);
  padding: 16px 24px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 199;
  overflow-y: auto;
}

.mobile-menu.is-open { display: flex; }

.mobile-menu a,
.mobile-menu button {
  padding: 14px 12px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  text-align: left;
}

.mobile-menu a:hover { background: var(--surface); }

@media (min-width: 768px) {
  .nav, .header__actions { display: flex; }
  .burger { display: none; }
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, opacity 0.2s;
  white-space: nowrap;
}

.btn:active { transform: scale(0.98); }

.btn--primary,
.btn--white,
.btn--light {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover,
.btn--white:hover { background: var(--accent-hover); }

.btn--ghost,
.btn--line,
.btn--secondary,
.btn--outline {
  background: var(--btn-ghost-bg);
  color: var(--btn-ghost-color);
  backdrop-filter: blur(4px);
}

.btn--ghost:hover,
.btn--line:hover { background: var(--btn-ghost-hover); }

.btn--play {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  flex-shrink: 0;
}

.btn--sm { padding: 8px 16px; font-size: 0.8125rem; }

.btn--icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius);
  background: var(--icon-btn-bg);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.btn--icon:hover { color: var(--text); background: var(--icon-btn-hover); }

/* ── Hero / Billboard ── */
.hero {
  position: relative;
  height: 85vh;
  min-height: 520px;
  max-height: 900px;
  display: flex;
  align-items: flex-end;
}

.hero__backdrop {
  position: absolute;
  inset: 0;
}

.hero__backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero__backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: calc(var(--header-h) + 32px) 24px 64px;
}

.hero__label {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.hero__title {
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  max-width: 560px;
  margin-bottom: 16px;
}

.hero__desc {
  font-size: clamp(0.9375rem, 1.8vw, 1.0625rem);
  color: var(--hero-desc);
  max-width: 480px;
  line-height: 1.65;
  margin-bottom: 24px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(70, 211, 105, 0.12);
  color: var(--green);
}

.hero__tag {
  font-size: 0.8125rem;
  color: var(--hero-tag);
  font-weight: 500;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero__stats {
  display: flex;
  gap: 40px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.hero__stat-num {
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero__stat-lbl {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

/* ── Content rows ── */
.main {
  position: relative;
  z-index: 3;
  padding: 8px 0 80px;
}

.row {
  margin-bottom: 40px;
}

.row__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 0 24px;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
}

.row__title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.row__link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}

.row__link:hover { color: var(--text); }

.row__scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 24px 20px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.row__scroll::-webkit-scrollbar { display: none; }

/* ── Poster tile ── */
.poster {
  flex: 0 0 132px;
  scroll-snap-align: start;
  transition: transform 0.35s var(--ease);
}

@media (min-width: 640px) { .poster { flex: 0 0 160px; } }
@media (min-width: 1024px) { .poster { flex: 0 0 180px; } }

.poster:hover { transform: scale(1.05); z-index: 5; }

.poster__img {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.poster__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster__score {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(0,0,0,0.72);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--green);
}

.poster__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.25s;
}

.poster:hover .poster__play { opacity: 1; }

.poster__play span {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.poster__info { padding: 10px 2px 0; }

.poster__name {
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poster__meta {
  font-size: 0.6875rem;
  color: var(--muted);
  margin-top: 2px;
}

/* Catalog cards (same look) */
.movies-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 0 20px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.movies-row::-webkit-scrollbar { display: none; }

.movie-card {
  flex: 0 0 132px;
  scroll-snap-align: start;
  transition: transform 0.35s var(--ease);
}

@media (min-width: 640px) { .movie-card { flex: 0 0 160px; } }

.movie-card:hover { transform: scale(1.04); }

.movie-card__poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.movie-card__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-card__overlay { display: none; }

.movie-card__rating {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(0,0,0,0.72);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--green);
}

.movie-card__body { padding: 10px 2px 0; }

.movie-card__title {
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-card__meta {
  font-size: 0.6875rem;
  color: var(--muted);
  margin-top: 2px;
}

/* ── Sections ── */
.section { padding: 64px 0; }

.section--gray,
.section--alt,
.section--fill,
.section--dark {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section__head,
.section__top,
.section__head--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.section__title,
.section-title {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section__sub,
.section-sub,
.section__label,
.section__eyebrow {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 6px;
}

.section__link,
.link-more {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
}

.section__link:hover { color: var(--text); }

.container--wide {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Steps — cinematic cards */
.steps,
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .steps, .features { grid-template-columns: repeat(3, 1fr); }
}

.step,
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
}

.step--cinema {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-height: 260px;
  cursor: default;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.35s;
}

.step--cinema:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.45),
    0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent),
    0 0 40px color-mix(in srgb, var(--accent) 20%, transparent);
}

.step__bg {
  position: absolute;
  inset: 0;
  background-image: var(--card-bg);
  background-size: cover;
  background-position: center;
  transition: transform 0.7s var(--ease), filter 0.5s;
}

.step--cinema:hover .step__bg {
  transform: scale(1.14);
  filter: brightness(1.08) saturate(1.15);
}

.step__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.94) 0%,
    rgba(0, 0, 0, 0.55) 45%,
    rgba(0, 0, 0, 0.25) 100%
  );
  transition: opacity 0.4s;
}

.step--cinema:hover .step__bg::after {
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.88) 0%,
    color-mix(in srgb, var(--accent) 25%, rgba(0, 0, 0, 0.5)) 55%,
    rgba(0, 0, 0, 0.2) 100%
  );
}

.step__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 40%,
    rgba(255, 255, 255, 0.12) 50%,
    transparent 60%
  );
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
  z-index: 2;
  pointer-events: none;
}

.step--cinema:hover .step__shine { transform: translateX(120%); }

.step__content {
  position: relative;
  z-index: 3;
  padding: 24px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
}

.step--cinema .step__title,
.step--cinema .step__text { color: #fff; }

.step--cinema .step__text { color: rgba(255, 255, 255, 0.72); }

.step__play {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.35s, transform 0.35s var(--ease);
  box-shadow: 0 4px 20px color-mix(in srgb, var(--accent) 50%, transparent);
}

.step--cinema:hover .step__play {
  opacity: 1;
  transform: scale(1);
}

.step__num,
.feature__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 40%, transparent);
}

.feature__icon { font-size: 0; }
.feature__icon svg { width: 20px; height: 20px; stroke: #fff; }

.step__title,
.feature__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step__text,
.feature__text {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Categories collage */
.collage {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 120px;
  gap: 8px;
}

@media (max-width: 767px) {
  .collage {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 100px;
  }
}

.collage__item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-2);
  grid-column: span 1;
  grid-row: span 2;
  transition: transform 0.4s var(--ease), box-shadow 0.4s;
}

.collage__item:hover {
  transform: scale(1.03);
  z-index: 2;
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.5),
    0 0 0 2px color-mix(in srgb, var(--accent) 70%, transparent);
}

.collage__item--lg {
  grid-column: span 2;
  grid-row: span 3;
}

.collage__item--md {
  grid-column: span 2;
  grid-row: span 2;
}

.collage__item--wide {
  grid-column: span 2;
  grid-row: span 2;
}

.collage__item--tall {
  grid-row: span 3;
}

@media (max-width: 767px) {
  .collage__item--lg,
  .collage__item--md,
  .collage__item--wide {
    grid-column: span 2;
    grid-row: span 2;
  }
  .collage__item--tall {
    grid-row: span 2;
  }
}

.collage__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.collage__item:hover img { transform: scale(1.12); filter: brightness(1.1); }

.collage__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.05) 55%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px 16px;
  transition: background 0.35s;
}

.collage__item:hover .collage__overlay {
  background: linear-gradient(
    0deg,
    color-mix(in srgb, var(--accent) 35%, rgba(0,0,0,0.9)) 0%,
    rgba(0,0,0,0.15) 60%
  );
}

.collage__item::after {
  content: "▶";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.35s, transform 0.35s var(--ease);
  z-index: 2;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  pointer-events: none;
}

.collage__item:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.collage__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
}

.collage__count {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}

/* Legacy category grid (unused) */
.categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 640px) { .categories { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 992px) { .categories { grid-template-columns: repeat(4, 1fr); } }

.category-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--surface-2);
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.category-card:hover img { transform: scale(1.06); }

.category-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.05) 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}

.category-card__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
}

.category-card__count {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.5);
  margin-top: 3px;
}

/* Random picker — cinematic */
.random-block {
  padding: 0 0 48px;
}

.random-block__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 36px 32px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 180px;
}

@media (min-width: 768px) {
  .random-block__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.random-block__text,
.random-block__btns {
  position: relative;
  z-index: 2;
}

.random-block__title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: #fff;
}

.random-block__desc {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.75);
}

.card-cinema__btn-ghost {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-cinema__btn-ghost:hover {
  background: rgba(255, 255, 255, 0.22) !important;
}

.random-block__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}

/* Shared cinematic card layers */
.card-cinema__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.card-cinema__float {
  position: absolute;
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  opacity: 0.55;
  transition: transform 0.6s var(--ease), opacity 0.4s;
}

.card-cinema__float--1 { width: 110px; height: 165px; top: -20px; right: 8%; transform: rotate(8deg); }
.card-cinema__float--2 { width: 90px; height: 135px; bottom: -15px; right: 22%; transform: rotate(-6deg); }
.card-cinema__float--3 { width: 100px; height: 150px; top: 10%; right: 35%; transform: rotate(4deg); opacity: 0.35; }
.card-cinema__float--4 { width: 80px; height: 120px; bottom: 5%; right: 48%; transform: rotate(-10deg); opacity: 0.3; }

.random-block__inner:hover .card-cinema__float--1 { transform: rotate(4deg) translateY(-6px); opacity: 0.75; }
.random-block__inner:hover .card-cinema__float--2 { transform: rotate(-2deg) translateY(4px); opacity: 0.65; }
.random-block__inner:hover .card-cinema__float--3 { transform: rotate(8deg) scale(1.05); opacity: 0.5; }
.random-block__inner:hover .card-cinema__float--4 { transform: rotate(-5deg) scale(1.08); opacity: 0.45; }

.card-cinema__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.7) 45%, rgba(0,0,0,0.4) 100%),
    linear-gradient(0deg, color-mix(in srgb, var(--accent) 15%, transparent), transparent 60%);
  z-index: 1;
  pointer-events: none;
}

.card-cinema__shade--cta {
  background:
    linear-gradient(0deg, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.55) 50%, rgba(0,0,0,0.35) 100%),
    radial-gradient(ellipse at 50% 100%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%);
}

/* Stats — poster mosaic */
.stats-bar,
.stats {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 32px;
  border-radius: var(--radius-lg);
  align-items: center;
  text-align: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stats-bar__mosaic {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  opacity: 0.45;
  filter: blur(1px);
  transition: opacity 0.5s, transform 0.6s var(--ease);
}

.stats-bar:hover .stats-bar__mosaic {
  opacity: 0.65;
  transform: scale(1.04);
}

.stats-bar__mosaic span {
  overflow: hidden;
}

.stats-bar__mosaic img {
  width: 100%;
  height: 100%;
  min-height: 120px;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.stats-bar:hover .stats-bar__mosaic span:nth-child(odd) img { transform: scale(1.1) translateY(-4px); }
.stats-bar:hover .stats-bar__mosaic span:nth-child(even) img { transform: scale(1.1) translateY(4px); }

.stats-bar__cell {
  position: relative;
  z-index: 2;
}

.stats-bar .card-cinema__shade {
  background: linear-gradient(
    90deg,
    rgba(0,0,0,0.93) 0%,
    rgba(0,0,0,0.82) 40%,
    rgba(0,0,0,0.75) 100%
  );
}

.stats-bar__value,
.stats-bar .stats-bar__value {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.stats-bar__label {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 4px;
}

.stats__cell { text-align: center; }
.stats__cell--cta { display: flex; align-items: center; justify-content: center; }

@media (min-width: 768px) {
  .stats-bar, .stats {
    grid-template-columns: 1fr 1fr auto;
    text-align: left;
  }
}

.stats__val {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.stats__lbl {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 4px;
}

/* CTA — poster wall */
.cta-banner {
  position: relative;
  text-align: center;
  padding: 56px 32px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cta-banner__bg {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  z-index: 0;
}

.cta-banner__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease), filter 0.5s;
}

.cta-banner:hover .cta-banner__bg img:nth-child(1) { transform: scale(1.08); filter: brightness(1.1); }
.cta-banner:hover .cta-banner__bg img:nth-child(2) { transform: scale(1.12) translateY(-6px); filter: brightness(1.15); }
.cta-banner:hover .cta-banner__bg img:nth-child(3) { transform: scale(1.08); filter: brightness(1.1); }

.cta-banner__content {
  position: relative;
  z-index: 2;
  color: #fff;
}

.cta-banner h2 {
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  color: #fff;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 24px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.9375rem;
}

/* Footer — cinematic */
.footer {
  position: relative;
  overflow: hidden;
  border-top: none;
  padding: 0;
}

.footer--cinema {
  margin-top: 16px;
}

.footer__backdrop {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  z-index: 0;
}

.footer__backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  transition: transform 8s var(--ease), opacity 0.5s;
}

.footer--cinema:hover .footer__backdrop img:nth-child(odd) { transform: scale(1.08); opacity: 0.45; }
.footer--cinema:hover .footer__backdrop img:nth-child(even) { transform: scale(1.05); opacity: 0.4; }

.footer__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.97) 0%, rgba(0, 0, 0, 0.88) 40%, rgba(0, 0, 0, 0.82) 100%),
    radial-gradient(ellipse at 50% 100%, color-mix(in srgb, var(--accent) 25%, transparent), transparent 65%);
  pointer-events: none;
}

.footer__glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 3;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent),
    color-mix(in srgb, var(--accent) 60%, #fff),
    var(--accent),
    transparent
  );
  box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 50%, transparent);
}

.footer__filmstrip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 14px;
  z-index: 2;
  opacity: 0.4;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 8px,
    rgba(255, 255, 255, 0.15) 8px,
    rgba(255, 255, 255, 0.15) 12px
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__inner {
  position: relative;
  z-index: 5;
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px 24px 32px;
}

.footer__top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .footer__top {
    grid-template-columns: 1.2fr 2fr;
    gap: 48px;
    align-items: start;
  }
}

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.footer__brand .logo { color: var(--accent); }

.footer__tagline {
  font-size: 0.875rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.65);
  max-width: 280px;
}

.footer__cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 24px;
}

@media (min-width: 640px) {
  .footer__cols { grid-template-columns: repeat(3, 1fr); }
}

.footer__col-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 14px;
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__nav a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.2s, transform 0.2s;
}

.footer__nav a:hover {
  color: #fff;
  transform: translateX(4px);
}

.footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

@media (min-width: 640px) {
  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
}

.footer__copy {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

.footer__online {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--green);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.footer__logo {
  font-weight: 800;
  color: var(--accent);
}

/* Simple footer fallback (watch page) */
.footer:not(.footer--cinema) {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 40px 24px 32px;
}

.footer:not(.footer--cinema) .footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
  padding: 0;
}

.footer:not(.footer--cinema) .footer__copy {
  color: var(--dim);
}

/* ── Watch page ── */
.watch-page {
  padding: calc(var(--header-h) + 20px) 0 0;
  min-height: 100vh;
}

.watch-player {
  margin-bottom: 0;
  width: 100%;
  max-width: var(--container);
}

/* Embed player — 16:9, iframe на весь блок */
.player-wrap--embed {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border);
}

.player-wrap--embed .embed-iframe,
.player-wrap--embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  border: 0;
  display: block;
}

.player-wrap--embed.player-wrap--empty {
  height: auto;
  padding-bottom: 0;
  aspect-ratio: 16 / 9;
  min-height: 240px;
}

.player-wrap--embed.player-wrap--empty .player-unavailable {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.watch-player .player-wrap {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border);
}

/* Detail block — poster as background */
.watch-detail {
  position: relative;
  overflow: hidden;
  margin-top: 0;
}

.watch-detail__bg {
  position: absolute;
  inset: -20px;
  background-image: var(--watch-poster);
  background-size: cover;
  background-position: center 30%;
  filter: blur(28px) brightness(0.45) saturate(1.2);
  transform: scale(1.06);
  pointer-events: none;
}

.watch-detail__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--bg) 0%, rgba(0, 0, 0, 0.75) 8%, rgba(0, 0, 0, 0.88) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0.85) 100%);
  pointer-events: none;
}

[data-mode="light"] .watch-detail__overlay {
  background:
    linear-gradient(180deg, var(--bg) 0%, rgba(0, 0, 0, 0.8) 10%, rgba(0, 0, 0, 0.92) 100%);
}

.watch-detail__inner {
  position: relative;
  z-index: 1;
  padding: 32px 24px 64px;
}

.watch-detail__head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 8px;
}

@media (min-width: 640px) {
  .watch-detail__head {
    grid-template-columns: 140px 1fr;
    gap: 28px;
    align-items: start;
  }
}

@media (min-width: 768px) {
  .watch-detail__head {
    grid-template-columns: 180px 1fr;
    gap: 32px;
  }
}

.watch-detail__poster {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  aspect-ratio: 2 / 3;
  max-width: 180px;
}

.watch-detail__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.watch-detail__info {
  min-width: 0;
}

.watch-detail .movie-info__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
  color: #fff;
}

.watch-detail .movie-info__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.watch-detail .tag {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
}

.watch-detail .tag--rating { color: var(--green); border-color: rgba(70, 211, 105, 0.35); }
.watch-detail .tag--quality { color: #7dd3fc; border-color: rgba(125, 211, 252, 0.35); }
.watch-detail .tag--red { color: #fca5a5; border-color: rgba(252, 165, 165, 0.35); }

.watch-detail .movie-info__desc {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.75;
  margin-bottom: 22px;
  max-width: 720px;
  font-size: 0.9375rem;
}

.watch-detail .movie-info__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.watch-detail__btn-ghost {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.watch-detail__btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

/* Comments on watch page */
.watch-detail .comments {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.watch-detail .comments__title {
  color: #fff;
}

.watch-detail .comments__count {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
}

.watch-detail .comment-form {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.watch-detail .comment-form__name,
.watch-detail .comment-form__text {
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.watch-detail .comment-form__name::placeholder,
.watch-detail .comment-form__text::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.watch-detail .comment {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
}

.watch-detail .comment__author { color: #fff; }
.watch-detail .comment__date { color: rgba(255, 255, 255, 0.45); }
.watch-detail .comment__text { color: rgba(255, 255, 255, 0.72); }

.player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.player-wrap:not(.player-wrap--embed) {
  width: 100%;
}

.player-wrap video { width: 100%; height: 100%; display: block; }

.player-wrap:not(.player-wrap--embed) iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.player-unavailable {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 32px 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.15);
}

.player-unavailable p {
  margin: 0 0 16px;
  max-width: 420px;
  line-height: 1.6;
}

.watch-detail .movie-info__subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.55);
  margin: -8px 0 14px;
  font-weight: 500;
}

.watch-detail #vk_comments {
  min-height: 120px;
}

.watch-player__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.watch-detail__badge-trailer {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.watch-detail__share {
  margin-top: 18px;
}

.player-big-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  cursor: pointer;
  transition: opacity 0.3s;
}

.player-big-play.hidden { opacity: 0; pointer-events: none; }

.player-big-play__btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.player-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 16px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,0.9));
  opacity: 0;
  transition: opacity 0.3s;
}

.player-wrap:hover .player-controls,
.player-wrap.is-playing .player-controls { opacity: 1; }

.player-progress {
  height: 3px;
  background: rgba(255,255,255,0.25);
  border-radius: 2px;
  margin-bottom: 10px;
  cursor: pointer;
}

.player-progress__fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
}

.player-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.player-bar__left,
.player-bar__right { display: flex; gap: 4px; align-items: center; }

.player-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 4px;
}

.player-btn:hover { background: rgba(255,255,255,0.1); }

.player-time {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.8);
  font-variant-numeric: tabular-nums;
}

.movie-info { margin-top: 24px; }

.movie-info__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.movie-info__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tag {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
}

.tag--rating { color: var(--green); }
.tag--red { color: var(--accent); }

.movie-info__desc {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 640px;
  font-size: 0.9375rem;
}

.movie-info__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Comments */
.comments {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.comments__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.comments__title {
  font-size: 1.125rem;
  font-weight: 700;
}

.comments__count {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.comment-form__name,
.comment-form__text {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.875rem;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s;
}

.comment-form__name:focus,
.comment-form__text:focus {
  border-color: rgba(229, 9, 20, 0.45);
}

.comment-form__text { min-height: 80px; }

.comment-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.comment__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.comment__body { flex: 1; min-width: 0; }

.comment__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.comment__author {
  font-size: 0.875rem;
  font-weight: 700;
}

.comment__date {
  font-size: 0.75rem;
  color: var(--dim);
}

.comment__text {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}

.episodes-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.episodes-panel__head {
  padding: 14px 16px;
  font-weight: 700;
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--border);
}

.episodes-list { max-height: 380px; overflow-y: auto; }

.episode-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

.episode-item:hover { background: var(--surface-2); }

.episode-item.is-active {
  background: rgba(229, 9, 20, 0.08);
  border-left: 3px solid var(--accent);
}

.episode-item__num {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  flex-shrink: 0;
}

.episode-item.is-active .episode-item__num {
  background: var(--accent);
  color: #fff;
}

.episode-item__title {
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.episode-item__dur {
  font-size: 0.6875rem;
  color: var(--dim);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (min-width: 640px) { .related-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .related-grid { grid-template-columns: repeat(6, 1fr); } }

/* ── Catalog ── */
.catalog-hero {
  padding: calc(var(--header-h) + 32px) 24px 24px;
  max-width: var(--container);
  margin: 0 auto;
}

.catalog-search {
  position: relative;
  margin-top: 20px;
  max-width: 440px;
}

.catalog-search input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.2s;
}

.catalog-search input:focus { border-color: rgba(229,9,20,0.5); }
.catalog-search input::placeholder { color: var(--dim); }

.catalog-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dim);
}

.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.filter-chip {
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-chip:hover { color: var(--text); }
.filter-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 28px 24px 64px;
}

@media (min-width: 640px) { .catalog-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 992px) { .catalog-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1200px) { .catalog-grid { grid-template-columns: repeat(5, 1fr); } }

.catalog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px;
  color: var(--dim);
}

.gradient-text { color: var(--accent); }

/* ── Theme picker ── */
.theme-picker {
  position: relative;
}

.theme-picker__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 240px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  z-index: 300;
}

[data-mode="light"] .theme-picker__panel {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.theme-picker__panel[hidden] { display: none; }

.theme-picker__label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 10px;
}

.theme-picker__label + .theme-picker__label { margin-top: 14px; }

.theme-picker__modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.theme-picker__mode {
  padding: 9px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.2s;
}

.theme-picker__mode:hover { color: var(--text); border-color: var(--accent); }

.theme-picker__mode.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.theme-picker__colors {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.theme-picker__color {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--swatch);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.theme-picker__color:hover { transform: scale(1.1); }

.theme-picker__color.is-active {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--swatch);
}

.theme-picker--mobile {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.theme-picker--mobile .theme-picker__panel {
  position: static;
  width: 100%;
  box-shadow: none;
  padding: 0;
  border: none;
  background: transparent;
}

.theme-picker--mobile .theme-picker__panel[hidden] { display: block; }
