@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

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

:root {
  --bg: #0f1117;
  --bg-elevated: #151925;
  --card: #1a1f2b;
  --card-strong: #202636;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f8fafc;
  --text-soft: #c5cfdf;
  --text-muted: #94a3b8;
  --primary: #3b5bdb;
  --primary-strong: #3551c8;
  --brand: #6366f1;
  --brand-soft: rgba(99, 102, 241, 0.18);
  --surface-white: rgba(255, 255, 255, 0.06);
  --shadow-sm: 0 12px 28px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 24px 48px rgba(0, 0, 0, 0.34);
  --shadow-lg: 0 36px 72px rgba(0, 0, 0, 0.42);
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --header-h: 78px;
  --player-header-gap: clamp(28px, 4vw, 48px);
  --container: min(1360px, calc(100vw - 2 * var(--page-pad)));
  --page-pad: clamp(16px, 4vw, 48px);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  background-color: var(--bg);
}

body {
  min-height: 100dvh;
  background-color: var(--bg);
  background-image: radial-gradient(ellipse 100% 60% at 50% -10%, rgba(59, 91, 219, 0.1), transparent 55%);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

body.is-player-wide-mode {
  overflow-x: hidden;
}

html.is-player-wide-mode,
html:has(body.is-player-wide-mode) {
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.9);
  outline-offset: 3px;
}

::selection {
  background: rgba(99, 102, 241, 0.32);
  color: #fff;
}

.page-shell {
  min-height: 100dvh;
}

.page-detail {
  overflow-x: clip;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.page-detail #filmDetail,
.page-detail #diziDetail {
  flex: 1 0 auto;
  width: 100%;
}

.page-detail #footer {
  flex-shrink: 0;
  margin-top: auto;
}

.page-detail--loading .page-body {
  opacity: 0.55;
  pointer-events: none;
}

.detail--loading {
  min-height: min(72vh, 720px);
}

.detail__backdrop--shell {
  position: absolute;
  inset: 0 0 auto;
  height: min(72vh, 720px);
  background:
    linear-gradient(110deg, #12151d 8%, #1a2030 18%, #12151d 33%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.detail__backdrop--shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 10, 15, 0.94) 0%, rgba(8, 10, 15, 0.8) 22%, rgba(8, 10, 15, 0.3) 48%, rgba(8, 10, 15, 0.12) 65%, rgba(8, 10, 15, 0.85) 100%),
    linear-gradient(180deg, rgba(8, 10, 15, 0.18) 0%, rgba(8, 10, 15, 0.9) 100%);
}

.detail-shell__poster {
  width: min(240px, 34vw);
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  background: linear-gradient(110deg, #161a24 8%, #222838 18%, #161a24 33%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}

.detail-shell__line {
  display: block;
  height: 12px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.06) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.detail-shell__line--title {
  height: 34px;
  width: min(420px, 72%);
  margin-bottom: 18px;
}

.detail-shell__line--meta {
  width: min(280px, 55%);
  margin-bottom: 22px;
}

.detail-shell__line--short {
  width: 62%;
}

.detail-shell__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.detail-shell__btn {
  display: inline-block;
  width: 148px;
  height: 46px;
  border-radius: 999px;
  background: linear-gradient(110deg, rgba(59, 91, 219, 0.35) 8%, rgba(59, 91, 219, 0.55) 18%, rgba(59, 91, 219, 0.35) 33%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.detail-shell__btn--ghost {
  width: 132px;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.05) 8%, rgba(255, 255, 255, 0.1) 18%, rgba(255, 255, 255, 0.05) 33%);
}

.content-grid--skeleton .content-card--skeleton {
  pointer-events: none;
}

.content-card__image--skeleton {
  aspect-ratio: 2 / 3;
  background: linear-gradient(110deg, #161a24 8%, #222838 18%, #161a24 33%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.content-card--skeleton .content-card__body {
  padding-top: 12px;
}

.content-card--skeleton .detail-shell__line {
  height: 10px;
  margin-bottom: 8px;
}

.content-card--skeleton .detail-shell__line--short {
  width: 48%;
}

.site-header,
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1200;
  min-height: calc(var(--header-h) + var(--safe-top));
  padding-top: var(--safe-top);
  transition:
    background-color 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    backdrop-filter 0.28s ease;
  background:
    linear-gradient(180deg, rgba(10, 12, 18, 0.88) 0%, rgba(10, 12, 18, 0.45) 58%, transparent 100%);
}

.site-header.is-scrolled,
#header.is-scrolled,
#header.scrolled {
  background: rgba(15, 17, 23, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.26);
}

@media (max-width: 768px) {
  .site-header.is-scrolled,
  #header.is-scrolled,
  #header.scrolled {
    background: rgba(15, 17, 23, 0.96);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.site-header__inner,
.header-inner {
  width: min(1360px, calc(100% - 2 * var(--page-pad)));
  margin: 0 auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
  padding-left: max(0px, var(--safe-left));
  padding-right: max(0px, var(--safe-right));
}

.brand,
.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  flex-shrink: 0;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  font-size: clamp(1.45rem, 1.3rem + 0.7vw, 1.95rem);
}

.brand__720,
.brand__film,
.logo .soft {
  color: #ffffff;
}

.brand__hd,
.logo .tv {
  color: var(--primary);
}

.site-nav,
.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1vw, 22px);
}

.site-nav a,
.main-nav .nav-link {
  position: relative;
  color: rgba(232, 238, 255, 0.82);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 6px 0;
  transition: color 0.2s ease;
}

.site-nav a::after,
.main-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--brand));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active,
.main-nav .nav-link:hover,
.main-nav .nav-link.active {
  color: #fff;
}

.site-nav a:hover::after,
.site-nav a.active::after,
.main-nav .nav-link:hover::after,
.main-nav .nav-link.active::after {
  transform: scaleX(1);
}

.site-header__actions,
.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.free-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.free-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--brand));
  box-shadow: 0 0 0 6px rgba(59, 91, 219, 0.12);
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
  width: min(280px, 32vw);
  height: 44px;
}

.search-form svg,
.search-form .material-symbols-outlined {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  z-index: 1;
  line-height: 1;
}

.search-form svg {
  width: 18px;
  height: 18px;
  fill: var(--text-muted);
}

.search-form input {
  width: 100%;
  height: 100%;
  padding: 0 16px 0 42px;
  color: var(--text);
  text-align: left;
  background: rgba(16, 20, 31, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input::placeholder {
  color: #7f8ba3;
}

.search-form input:hover,
.search-form input:focus {
  border-color: rgba(99, 102, 241, 0.42);
  background: rgba(20, 25, 37, 0.96);
  box-shadow: 0 0 0 4px rgba(59, 91, 219, 0.12);
}

.menu-toggle,
.menu-btn,
.mobile-search-link {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.menu-toggle:hover,
.menu-btn:hover,
.mobile-search-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.menu-toggle svg,
.menu-btn svg,
.mobile-search-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

body.menu-open .menu-btn,
body.menu-open .menu-toggle {
  transform: rotate(90deg);
}

.header-icon,
.header-profile,
.no-member-badge {
  display: none !important;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1090;
  opacity: 0;
  visibility: hidden;
  background: rgba(4, 7, 14, 0.58);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.nav-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav {
  position: fixed;
  top: calc(var(--header-h) + var(--safe-top) + 8px);
  left: calc(var(--page-pad) + var(--safe-left));
  right: calc(var(--page-pad) + var(--safe-right));
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(17, 21, 31, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-10px);
  transition:
    opacity 0.24s ease,
    visibility 0.24s ease,
    transform 0.24s ease;
}

.mobile-nav.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.mobile-nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  color: var(--text-soft);
  border: 1px solid transparent;
  background: transparent;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-size: 0.96rem;
  font-weight: 700;
  white-space: nowrap;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.btn-primary,
.btn-play {
  color: #fff;
  background: linear-gradient(180deg, #4868ea 0%, var(--primary) 100%);
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: 0 8px 20px rgba(59, 91, 219, 0.2);
}

.btn-primary:hover,
.btn-play:hover {
  background: linear-gradient(180deg, #5070f1 0%, var(--primary-strong) 100%);
  box-shadow: 0 18px 34px rgba(59, 91, 219, 0.32);
}

.btn-secondary,
.btn-ghost,
.btn-info {
  color: #edf2ff;
  background: rgba(15, 17, 23, 0.58);
  border-color: rgba(255, 255, 255, 0.14);
}

.btn-secondary:hover,
.btn-ghost:hover,
.btn-info:hover {
  background: rgba(30, 35, 48, 0.82);
  border-color: rgba(255, 255, 255, 0.22);
}

.btn-sm {
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.84rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.back-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(-1px);
}

.back-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.page-player .site-header--player .site-header__inner {
  gap: 14px;
}

.page-player .site-header--player {
  background: rgba(15, 17, 23, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.page-player .player-page {
  padding-top: calc(var(--header-h) + var(--safe-top) + var(--player-header-gap));
}

.page-player .player-stage,
.page-player .player-box {
  width: 100%;
  height: min(48vw, 62vh, 640px);
  aspect-ratio: auto;
  max-height: none;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

.page-player .player-stage__img {
  object-position: center center;
}

.page-player .player-stage__overlay {
  align-items: flex-start;
  justify-content: flex-end;
  padding:
    clamp(20px, 4vw, 36px)
    max(var(--page-pad), calc(var(--page-pad) + var(--safe-right)))
    clamp(36px, 6vh, 64px)
    max(var(--page-pad), calc(var(--page-pad) + var(--safe-left)));
  background:
    linear-gradient(90deg, rgba(8, 10, 15, 0.92) 0%, rgba(8, 10, 15, 0.5) 38%, rgba(8, 10, 15, 0.08) 68%),
    linear-gradient(0deg, rgba(8, 10, 15, 0.92) 0%, rgba(8, 10, 15, 0.35) 45%, transparent 72%);
}

.page-player {
  display: flex;
  flex-direction: column;
}

.page-player #playerPage {
  flex: 1 0 auto;
  width: 100%;
  min-height: calc(100svh - var(--header-h) - var(--safe-top));
}

.page-player #footer {
  flex-shrink: 0;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* player loading shell */
.player-shell__poster {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(18, 22, 36, 0.96) 0%, rgba(10, 12, 20, 0.98) 100%);
}

.player-shell__title {
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  letter-spacing: -0.03em;
}

.player-shell__meta,
.player-shell__desc {
  margin: 0;
}

.player-shell__line {
  display: block;
  height: 12px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.06) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

.player-shell__line--short {
  width: 42%;
}

.player-page--loading .player-shell .stream-player__status {
  z-index: 2;
  background: rgba(8, 10, 18, 0.9);
}

.hero {
  position: relative;
  width: 100%;
  min-height: 82vh;
  max-height: 860px;
  margin-top: calc(-1 * (var(--header-h) + var(--safe-top)));
  overflow: hidden;
  isolation: isolate;
}

.hero-slider {
  position: relative;
  height: 100%;
  min-height: inherit;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide__media {
  position: absolute;
  inset: 0;
}

.hero-slide--portrait .hero-slide__media {
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  background:
    radial-gradient(circle at 16% 24%, rgba(59, 91, 219, 0.16), transparent 36%),
    radial-gradient(circle at 82% 18%, rgba(91, 124, 255, 0.08), transparent 28%),
    linear-gradient(115deg, #07090f 0%, #0f1117 44%, #171c28 100%);
}

.hero-slide--portrait .hero-slide__media::before,
.detail__backdrop--portrait::before {
  display: none;
}

.hero-slide--portrait .hero-slide__img,
.detail__backdrop--portrait .detail__backdrop-img {
  opacity: 1;
  pointer-events: none;
}

.hero-slide--portrait .hero-slide__img--poster {
  position: relative;
  width: auto;
  height: min(calc(100% - 48px), 680px);
  max-width: min(36vw, 440px);
  margin:
    calc(var(--header-h) + var(--safe-top) + 24px)
    max(var(--page-pad), calc(var(--page-pad) + var(--safe-right)))
    48px
    auto;
  object-fit: contain;
  object-position: right center;
  transform: none;
  filter: drop-shadow(0 28px 56px rgba(0, 0, 0, 0.58));
}

.hero-slide--portrait.is-active .hero-slide__img--poster {
  transform: none;
}

.hero-slide--portrait .hero-slide__overlay {
  background:
    linear-gradient(90deg, rgba(9, 11, 17, 0.98) 0%, rgba(9, 11, 17, 0.9) 36%, rgba(9, 11, 17, 0.42) 54%, transparent 70%),
    linear-gradient(0deg, #0f1117 0%, rgba(15, 17, 23, 0.72) 28%, transparent 72%);
}

.detail__backdrop--gradient {
  background:
    radial-gradient(circle at 18% 20%, rgba(59, 91, 219, 0.14), transparent 34%),
    linear-gradient(115deg, #07090f 0%, #0f1117 48%, #171c28 100%);
}

.detail__backdrop--gradient::after {
  background:
    linear-gradient(90deg, rgba(8, 10, 15, 0.94) 0%, rgba(8, 10, 15, 0.82) 24%, rgba(8, 10, 15, 0.35) 48%, rgba(8, 10, 15, 0.12) 65%, rgba(8, 10, 15, 0.85) 100%),
    linear-gradient(180deg, rgba(8, 10, 15, 0.18) 0%, rgba(8, 10, 15, 0.9) 100%);
}

.detail__backdrop--portrait {
  isolation: isolate;
}

.detail__backdrop--portrait::after {
  z-index: 1;
}

.hero-slide__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.04);
  transition: transform 6s ease;
}

.hero-slide.is-active .hero-slide__img {
  transform: scale(1);
}

.hero-slide__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 11, 17, 0.94) 0%, rgba(9, 11, 17, 0.72) 28%, rgba(9, 11, 17, 0.2) 55%, transparent 78%),
    linear-gradient(0deg, #0f1117 0%, rgba(15, 17, 23, 0.55) 32%, rgba(15, 17, 23, 0.12) 68%, transparent 88%);
}

.hero-slide__content {
  position: absolute;
  z-index: 2;
  left: max(var(--page-pad), calc(var(--page-pad) + var(--safe-left)));
  bottom: 120px;
  width: min(560px, calc(100% - 2 * var(--page-pad)));
  padding: 0;
}

.hero-slide__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 10px;
  margin: 0 0 14px;
  border-radius: 6px;
  color: #f4f7ff;
  background: rgba(59, 91, 219, 0.92);
  border: none;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: none;
  box-shadow: 0 6px 18px rgba(59, 91, 219, 0.28);
  vertical-align: middle;
}

.hero-slide__access {
  display: none;
}

.hero-slide__content h1 {
  margin-bottom: 12px;
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}

.hero-slide__desc {
  max-width: 52ch;
  margin-bottom: 16px;
  color: var(--text-soft);
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-slide__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 22px;
  color: rgba(232, 238, 255, 0.88);
  font-size: 0.9rem;
}

.hero-slide__meta span {
  position: relative;
}

.hero-slide__meta span:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -10px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-50%);
}

.hero-slide__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-dots {
  position: absolute;
  left: max(var(--page-pad), calc(var(--page-pad) + var(--safe-left)));
  bottom: 72px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 28px;
  height: 4px;
  border-radius: 4px;
  border: none;
  background: rgba(255, 255, 255, 0.28);
  transition: width 0.2s ease, background-color 0.2s ease;
}

.hero-dot:hover {
  background: rgba(255, 255, 255, 0.45);
}

.hero-dot.is-active,
.hero-dot.active {
  width: 36px;
  background: linear-gradient(90deg, var(--primary), var(--brand));
}

.home,
.browse {
  position: relative;
  z-index: 3;
  width: min(1360px, calc(100% - 2 * var(--page-pad)));
  margin: 0 auto;
  padding: 36px 0 calc(56px + var(--safe-bottom));
  background: transparent;
}

.home-row--top10 .home-row__scroller {
  position: relative;
}

.home-row--top10 .home-row__scroller::before,
.home-row--top10 .home-row__scroller::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 20px;
  width: 56px;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.home-row--top10 .home-row__scroller:not(.is-at-start)::before {
  left: 0;
  opacity: 1;
  background: linear-gradient(90deg, var(--bg) 18%, transparent 100%);
}

.home-row--top10 .home-row__scroller:not(.is-at-end)::after {
  right: 0;
  opacity: 1;
  background: linear-gradient(270deg, var(--bg) 18%, transparent 100%);
}

.home-row__nav {
  position: absolute;
  top: 42%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(15, 17, 23, 0.88);
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.home-row__nav:hover:not(:disabled) {
  transform: translateY(-1px);
  background: rgba(28, 34, 48, 0.96);
  border-color: rgba(255, 255, 255, 0.24);
}

.home-row__nav:disabled {
  opacity: 0;
  pointer-events: none;
}

.home-row__nav--prev {
  left: 6px;
}

.home-row__nav--next {
  right: 6px;
}

.home-row--top10 .home-row__track {
  gap: 64px;
  padding: 8px 52px 20px 44px;
  scroll-padding-inline: 52px;
  scroll-snap-type: x mandatory;
}

.home-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.home-row__head h2,
.page-section__title {
  margin-bottom: 6px;
  font-size: clamp(1rem, 0.92rem + 0.45vw, 1.3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-section__lead {
  margin-bottom: 18px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.home-row__more {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.home-row__more:hover {
  color: #fff;
}

.home-row__track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 2px 18px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x proximity;
}

.home-row__track::-webkit-scrollbar,
.category-pills::-webkit-scrollbar {
  display: none;
}

.category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.channel-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(26, 31, 43, 0.82);
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.channel-filter:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.channel-filter.is-active,
.channel-filter.active,
.is-active.channel-filter {
  color: #0f1117;
  background: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 10px 24px rgba(255, 255, 255, 0.12);
}

.browse-genres {
  position: relative;
  min-width: 0;
}

.browse-genres::before,
.browse-genres::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28px;
  z-index: 1;
  pointer-events: none;
}

.browse-genres::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg) 0%, transparent 100%);
}

.browse-genres::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg) 0%, transparent 100%);
}

.browse-genres__track .category-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: rgba(219, 228, 255, 0.58);
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  scroll-snap-align: start;
  position: relative;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.browse-genres__track .category-pill::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #4868ea 0%, var(--primary) 100%);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.22s ease;
}

.browse-genres__track .category-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  transform: none;
}

.browse-genres__track .category-pill.is-active,
.browse-genres__track .category-pill.active,
.browse-genres__track .is-active.category-pill {
  color: #fff;
  background: rgba(59, 91, 219, 0.14);
  border: none;
  box-shadow: none;
}

.browse-genres__track .category-pill.is-active::after,
.browse-genres__track .category-pill.active::after,
.browse-genres__track .is-active.category-pill::after {
  transform: scaleX(1);
}

.browse-genres--home::before,
.browse-genres--home::after {
  display: none;
}

.browse-genres--home .browse-genres__track {
  flex-wrap: wrap;
  overflow: visible;
  gap: 10px;
  padding: 2px 0 4px;
}

.content-card {
  flex: 0 0 clamp(210px, 22vw, 280px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-snap-align: start;
  transition: transform 0.24s ease;
}

.content-card:hover {
  transform: translateY(-6px) scale(1.02);
}

.content-card__image {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  flex-shrink: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #0c1018;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-sm);
}

.content-card__img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: filter 0.28s ease;
}

.content-card:hover .content-card__img {
  filter: saturate(1.05);
}

.content-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.content-card__title {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: #f5f7ff;
}

.content-card__meta,
.content-card__genres {
  display: block;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.top10-card {
  position: relative;
  flex: 0 0 clamp(168px, 16vw, 200px);
  scroll-snap-align: start;
  display: block;
  min-width: 0;
  padding-left: clamp(14px, 2.2vw, 22px);
  transition: transform 0.24s ease;
}

.top10-card:hover {
  transform: translateY(-4px);
}

.top10-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.top10-card__visual {
  position: relative;
  display: block;
  isolation: isolate;
}

.top10-card__rank {
  position: absolute;
  left: -0.12em;
  bottom: -0.06em;
  z-index: 2;
  font-size: clamp(5.6rem, 12vw, 8rem);
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 3px rgba(236, 242, 255, 0.92);
  paint-order: stroke fill;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.75),
    0 6px 22px rgba(0, 0, 0, 0.5);
  user-select: none;
  pointer-events: none;
}

.top10-card[data-rank="10"] .top10-card__rank,
.top10-card[data-rank="9"] .top10-card__rank,
.top10-card[data-rank="8"] .top10-card__rank {
  left: 0;
  font-size: clamp(4.4rem, 9vw, 6.2rem);
  letter-spacing: -0.1em;
}

.top10-card__image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  flex-shrink: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #0c1018;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.top10-card__img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: filter 0.28s ease;
}

.top10-card:hover .top10-card__img {
  filter: saturate(1.05);
}

.top10-card__title {
  position: relative;
  z-index: 2;
  margin-top: 0;
  padding-left: 2px;
  font-size: 0.94rem;
  font-weight: 700;
  color: #f5f7ff;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-row {
  margin-bottom: 34px;
}

.home-row--categories {
  margin-bottom: 38px;
}

.page-hero {
  padding:
    calc(var(--header-h) + var(--safe-top) + 36px)
    max(var(--page-pad), calc(var(--page-pad) + var(--safe-right)))
    28px
    max(var(--page-pad), calc(var(--page-pad) + var(--safe-left)));
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.page-hero .inner {
  width: min(1360px, 100%);
  margin: 0 auto;
}

.page-hero h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 3.2vw, 3rem);
  letter-spacing: -0.04em;
}

.page-hero p {
  color: var(--text-soft);
  max-width: 62ch;
}

/* Film collections */
.page-collection {
  background: var(--bg);
}

.collection-hero {
  position: relative;
  overflow: hidden;
  padding:
    calc(var(--header-h) + var(--safe-top) + 48px)
    max(var(--page-pad), calc(var(--page-pad) + var(--safe-right)))
    40px
    max(var(--page-pad), calc(var(--page-pad) + var(--safe-left)));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.collection-hero__backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.collection-hero__backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 11, 16, 0.35) 0%, rgba(9, 11, 16, 0.88) 72%, rgba(9, 11, 16, 0.98) 100%),
    linear-gradient(90deg, rgba(9, 11, 16, 0.92) 0%, rgba(9, 11, 16, 0.55) 48%, rgba(9, 11, 16, 0.2) 100%);
}

.collection-hero__backdrop-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  opacity: 0.55;
}

.collection-hero__content {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  margin: 0 auto;
}

.collection-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.collection-hero__meta {
  margin: 0 0 16px;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.collection-hero__desc {
  margin: 0;
  max-width: 72ch;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.collection-body {
  width: min(1360px, calc(100% - 2 * var(--page-pad)));
  margin: 0 auto;
  padding:
    32px
    max(0px, var(--safe-right))
    48px
    max(0px, var(--safe-left));
}

.collection-body__title {
  margin: 0 0 20px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.collection-films-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 20px 16px;
}

.collection-film-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  transition: transform 0.2s ease;
}

.collection-film-card:hover {
  transform: translateY(-2px);
}

.collection-film-card__image {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, #1b2233 0%, #10141d 100%);
}

.collection-film-card__badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.92);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.collection-film-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-film-card__title {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
}

.collection-film-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.collection-film-card__rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #fbbf24;
}

.collection-film-card__rating .material-symbols-outlined {
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

.collections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.collection-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(16, 20, 31, 0.72);
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.collection-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(20, 25, 37, 0.92);
}

.collection-card__image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(135deg, #1b2233 0%, #10141d 100%);
}

.collection-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-card__title {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.collection-card__meta {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.collection-empty {
  width: min(720px, calc(100% - 2 * var(--page-pad)));
  margin: calc(var(--header-h) + var(--safe-top) + 48px) auto 64px;
  padding: 0 max(0px, var(--safe-right)) 0 max(0px, var(--safe-left));
  text-align: center;
}

.collection-empty h1 {
  margin-bottom: 12px;
}

.collection-empty p {
  margin-bottom: 20px;
  color: var(--text-soft);
}

.detail-collection-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 4px 0 12px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.28);
  background: rgba(59, 130, 246, 0.1);
  color: #93c5fd;
  font-size: 0.86rem;
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.detail-collection-link:hover {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.42);
  color: #bfdbfe;
}

.search-page-form {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(560px, 100%);
  height: 52px;
  margin-top: 20px;
  padding: 0 6px 0 16px;
  background: rgba(16, 20, 31, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.search-page-form:focus-within {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(20, 25, 37, 0.96);
  box-shadow: 0 0 0 4px rgba(59, 91, 219, 0.14);
}

.search-page-form svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  fill: var(--text-muted);
}

.search-page-form input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
}

.search-page-form input::placeholder {
  color: #7f8ba3;
}

.search-page-form input:focus {
  outline: none;
}

.search-page-form button {
  flex: 0 0 auto;
  height: 40px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  transition:
    background-color 0.2s ease,
    transform 0.1s ease;
}

.search-page-form button:hover {
  background: var(--primary-strong);
}

.search-page-form button:active {
  transform: scale(0.97);
}

.page-body {
  width: min(1360px, calc(100% - 2 * var(--page-pad)));
  margin: 0 auto;
  padding:
    30px
    max(0px, var(--safe-right))
    calc(60px + var(--safe-bottom))
    max(0px, var(--safe-left));
}

.detail {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.detail__backdrop {
  position: absolute;
  inset: 0 0 auto;
  height: min(72vh, 720px);
  overflow: hidden;
}

.detail__backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 10, 15, 0.94) 0%, rgba(8, 10, 15, 0.8) 22%, rgba(8, 10, 15, 0.3) 48%, rgba(8, 10, 15, 0.12) 65%, rgba(8, 10, 15, 0.85) 100%),
    linear-gradient(180deg, rgba(8, 10, 15, 0.18) 0%, rgba(8, 10, 15, 0.9) 100%);
}

.detail__backdrop-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

.detail__inner {
  position: relative;
  z-index: 1;
  width: min(1360px, calc(100% - 2 * var(--page-pad)));
  margin: 0 auto;
  min-height: min(68vh, 680px);
  display: flex;
  align-items: stretch;
  gap: 32px;
  padding:
    calc(var(--header-h) + var(--safe-top) + 48px)
    max(0px, var(--safe-right))
    56px
    max(0px, var(--safe-left));
}

.detail--series .detail__inner {
  padding-bottom: 64px;
}

.detail__poster {
  width: clamp(180px, 19vw, 260px);
  flex-shrink: 0;
  align-self: flex-end;
}

.detail__poster-img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  object-position: center top;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lg);
}

.detail__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: min(760px, 100%);
  min-width: 0;
  padding-bottom: 0;
}

.detail__brand {
  margin-bottom: 12px;
  color: #b5c3ff;
  font-size: 0.88rem;
  font-weight: 700;
}

.detail__content h1 {
  margin-bottom: 14px;
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 14px;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.detail__genres {
  margin-bottom: 16px;
  color: #d8e0f1;
  font-size: 0.95rem;
  font-weight: 600;
}

.detail__desc {
  max-width: 70ch;
  margin-bottom: 16px;
  color: var(--text-soft);
}

.detail--series .detail__desc {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.detail__cast {
  margin-bottom: 28px;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 0;
  margin-bottom: 0;
}

.season-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-bottom: 22px;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.season-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 2px;
  border: none;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.season-tab:hover {
  color: #fff;
  transform: none;
}

.season-tab.is-active,
.season-tab.active {
  color: #fff;
  background: transparent;
  border-color: transparent;
  border-bottom-color: var(--primary);
  box-shadow: none;
}

.detail__episodes {
  position: relative;
  z-index: 1;
  width: min(1360px, calc(100% - 2 * var(--page-pad)));
  margin: 40px auto 0;
  padding:
    0
    max(0px, var(--safe-right))
    calc(60px + var(--safe-bottom))
    max(0px, var(--safe-left));
}

.episodes {
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.episodes__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.episodes__head h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.episodes__head span {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.episodes__grid,
.episode-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.episode-card,
.ep-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 10px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.episode-card:hover,
.ep-card:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

.episode-card__image,
.ep-thumb {
  position: relative;
  width: 168px;
  flex-shrink: 0;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #1b2233 0%, #10141d 100%);
}

.episode-card__img,
.ep-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.episode-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 10, 15, 0.42);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.episode-card__play svg {
  width: 34px;
  height: 34px;
  fill: #fff;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.episode-card:hover .episode-card__play {
  opacity: 1;
}

.episode-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 2px 0;
}

.episode-card__body strong {
  font-size: 0.98rem;
  font-weight: 700;
  color: #f5f7ff;
}

.episode-card__duration {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.episode-card__desc {
  color: rgba(184, 194, 214, 0.72);
  font-size: 0.8rem;
}

.ep-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.ep-info h4 {
  font-size: 0.96rem;
  font-weight: 700;
  color: #f5f7ff;
}

.ep-info span {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.player-page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 0 calc(48px + var(--safe-bottom));
}

.player-immersive {
  width: 100%;
}

.player-body {
  width: min(1360px, calc(100% - 2 * var(--page-pad)));
  margin: 0 auto;
  padding:
    24px
    max(0px, var(--safe-right))
    0
    max(0px, var(--safe-left));
}

.player-stage,
.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #0a0c12;
}

.player-stage__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-stage__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 32px;
  background:
    linear-gradient(180deg, rgba(8, 10, 15, 0.06) 0%, rgba(8, 10, 15, 0.2) 42%, rgba(8, 10, 15, 0.88) 100%);
}

.player-stage__overlay h1 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  letter-spacing: -0.04em;
}

.player-stage__overlay p {
  color: var(--text-soft);
}

.player-now-playing {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: min(480px, 100%);
  max-width: 100%;
}

.player-now-playing__show {
  color: rgba(219, 228, 255, 0.78);
  font-size: 0.88rem;
  font-weight: 600;
}

.player-now-playing__code {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  color: #dbe4ff;
  background: rgba(59, 91, 219, 0.22);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.player-now-playing h1 {
  margin-top: 4px;
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.player-now-playing p {
  margin-bottom: 4px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.player-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.player-play-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: auto;
  flex: 0 0 auto;
  align-self: flex-start;
  min-height: 46px;
  padding: 0 24px;
  border: none;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #4868ea 0%, var(--primary) 100%);
  box-shadow: 0 8px 20px rgba(59, 91, 219, 0.24);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.player-play-cta svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.player-play-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(59, 91, 219, 0.3);
}

.player-next-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #edf2ff;
  font-size: 0.88rem;
  font-weight: 600;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.player-next-cta:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.24);
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 8px;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.player-section {
  margin-bottom: 36px;
}

.player-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.player-section__head h2 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.player-section__head span {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.player-section--meta {
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.player-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(219, 228, 255, 0.82);
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.player-nav-btn:hover {
  color: #fff;
}

.player-nav-btn--accent {
  color: #9eb4ff;
}

.player-nav-btn--accent:hover {
  color: #c7d4ff;
}

.player-nav-btn.is-disabled {
  opacity: 0.32;
  pointer-events: none;
}

.player-episode-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.player-episode-row {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 10px 8px;
  border-radius: 10px;
  transition: background-color 0.2s ease;
}

.player-episode-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.player-episode-row.is-current {
  background: rgba(59, 91, 219, 0.1);
}

.player-episode-row__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #1b2233 0%, #10141d 100%);
}

.player-episode-row__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-episode-row__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.player-episode-row__body strong {
  font-size: 0.95rem;
  font-weight: 700;
}

.player-episode-row__body span {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.player-episode-row__badge {
  color: #9eb4ff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Series player: episode sidebar */
.player-series-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(300px, 30vw);
  gap: 16px;
  width: min(1360px, calc(100% - 2 * var(--page-pad)));
  margin: 0 auto;
  padding:
    0
    max(0px, var(--safe-right))
    0
    max(0px, var(--safe-left));
  align-items: start;
}

.player-page--series .player-immersive {
  min-width: 0;
}

.player-episodes-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(16, 20, 31, 0.96);
  max-height: min(56.25vw, 68vh, 720px);
  overflow: hidden;
}

.player-episodes-sidebar__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.player-season-select-wrap {
  position: relative;
}

.player-season-select-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.player-season-select {
  width: 100%;
  height: 40px;
  padding: 0 36px 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.player-season-select:hover,
.player-season-select:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(255, 255, 255, 0.06);
}

.player-episodes-sidebar__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: 2px;
}

.player-episode-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text-soft);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.player-episode-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.player-episode-item.is-current {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
}

.player-episode-item__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.player-episode-item.is-current .player-episode-item__num {
  background: linear-gradient(180deg, #4f7bff 0%, #3b5bdb 100%);
  color: #fff;
}

.player-episode-item__label {
  min-width: 0;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.3;
}

.player-about__desc {
  margin-bottom: 10px;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 72ch;
}

.player-about__cast {
  color: var(--text-muted);
  font-size: 0.84rem;
}

/* legacy player boxes - keep flat */
.player-toolbar,
.player-panel,
.player-about {
  display: none;
}

.player-episode-rail,
.player-episode-chip {
  display: none;
}

.player-stage__badge,
.player-box .live-badge,
.channel-visual__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #4868ea 0%, var(--primary) 100%);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.player-stage__visual,
.channel-visual {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 32px;
  background:
    radial-gradient(circle at top, rgba(59, 91, 219, 0.34), transparent 42%),
    linear-gradient(135deg, rgba(18, 23, 34, 0.98), rgba(9, 12, 18, 1));
}

.channel-visual__name {
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.05em;
}

.player-copy,
.player-info {
  margin-top: 24px;
  padding: 24px;
  border-radius: 22px;
  background: rgba(19, 23, 33, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.player-copy__brand {
  margin-bottom: 10px;
  color: #b5c3ff;
  font-size: 0.9rem;
  font-weight: 700;
}

.player-copy h1,
.player-info h1 {
  margin-bottom: 10px;
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  letter-spacing: -0.03em;
}

.player-copy p,
.player-info p {
  color: var(--text-soft);
}

.player-copy p + p,
.player-info p + p {
  margin-top: 8px;
}

.player-copy__actions,
.player-actions,
.player-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 16px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(219, 228, 255, 0.82);
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.text-link:hover {
  color: #fff;
}

.text-link::after {
  content: "›";
  font-size: 1.1em;
  line-height: 1;
  opacity: 0.7;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.text-link:hover::after {
  transform: translateX(2px);
  opacity: 1;
}

.channels-grid,
.channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.channel-filter,
.filter-btn {
  margin-bottom: 0;
}

.channel-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 20px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(31, 38, 54, 0.96), rgba(22, 27, 39, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.channel-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.28);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.28);
}

.channel-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(59, 91, 219, 0.14);
  border: 1px solid rgba(99, 102, 241, 0.22);
  color: #cfdbff;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.channel-card__title {
  font-size: 1.08rem;
  font-weight: 800;
  color: #f8fbff;
}

.channel-card__meta {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.channel-card--skeleton {
  pointer-events: none;
}

.channel-card__logo--skeleton {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: linear-gradient(110deg, #161a24 8%, #222838 18%, #161a24 33%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.channel-card--skeleton .detail-shell__line {
  display: block;
  height: 10px;
  margin-top: 4px;
}

.channel-card--skeleton .detail-shell__line--short {
  width: 42%;
}

.channel-count--skeleton {
  margin-bottom: 16px;
}

.channel-count__skeleton-line {
  display: block;
  width: 180px;
  height: 14px;
}

.channels-grid--skeleton .channel-card--skeleton {
  min-height: 148px;
}

.page-hero--matches {
  background:
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(15, 17, 23, 0.2), rgba(15, 17, 23, 0.92));
}

.match-toolbar {
  display: grid;
  gap: 18px;
  margin-bottom: 28px;
}

.match-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-size: 0.95rem;
}

.match-search input::placeholder {
  color: var(--text-muted);
}

.match-filters--scroll {
  position: relative;
  min-width: 0;
  margin-bottom: 0;
  padding-bottom: 4px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.match-filters--scroll::before,
.match-filters--scroll::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 10px;
  width: 36px;
  z-index: 1;
  pointer-events: none;
}

.match-filters--scroll::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg) 0%, transparent 100%);
}

.match-filters--scroll::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg) 0%, transparent 100%);
}

.match-filter-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 36px 6px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(129, 140, 248, 0.62) rgba(255, 255, 255, 0.08);
}

.match-filter-track::-webkit-scrollbar {
  height: 6px;
}

.match-filter-track::-webkit-scrollbar-track {
  margin-inline: 36px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.match-filter-track::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.45) 0%, rgba(129, 140, 248, 0.72) 100%);
  border: 1px solid rgba(129, 140, 248, 0.16);
}

.match-filter-track::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.68) 0%, #a5b4fc 100%);
}

.match-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(26, 31, 43, 0.88);
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  scroll-snap-align: start;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.match-filter:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.match-filter.is-active {
  color: #0f1117;
  background: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 10px 24px rgba(255, 255, 255, 0.12);
}

.match-filters,
.channel-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.match-filter,
.channel-filter,
.filter-btn {
  margin-bottom: 0;
}

.match-count,
.channel-count {
  margin: 0 0 18px;
  color: var(--text-muted);
}

.channel-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr);
  gap: 12px;
  width: 100%;
}

.channel-search input,
.channel-group-select select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.channel-group-select {
  position: relative;
  display: block;
  width: 100%;
}

.channel-group-dropdown {
  position: relative;
  width: 100%;
}

.channel-group-dropdown__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 0 12px 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}

.channel-group-dropdown__trigger:hover,
.channel-group-dropdown.is-open .channel-group-dropdown__trigger {
  border-color: rgba(99, 102, 241, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.channel-group-dropdown__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-group-dropdown__trigger::after {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  margin-top: -2px;
  transition: transform 0.2s ease;
}

.channel-group-dropdown.is-open .channel-group-dropdown__trigger::after {
  transform: rotate(225deg);
  margin-top: 2px;
}

.channel-group-dropdown__panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  max-height: min(320px, 52vh);
  overflow-y: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(22, 27, 39, 0.98);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.channel-group-dropdown__panel[hidden] {
  display: none;
}

.channel-group-dropdown__option {
  display: block;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.channel-group-dropdown__option:hover,
.channel-group-dropdown__option:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  outline: none;
}

.channel-group-dropdown__option.is-selected {
  color: #fff;
  background: rgba(91, 124, 255, 0.14);
}

@media (max-width: 768px) {
  .channel-group-dropdown__panel {
    max-height: min(280px, 48vh);
  }

  .channel-group-dropdown__option {
    padding: 10px 12px;
    font-size: 0.84rem;
  }
}

.channel-load-more,
.match-load-more {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

@media (max-width: 720px) {
  .channel-toolbar {
    grid-template-columns: 1fr;
  }
}

.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.match-card {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 20px;
  min-height: 220px;
  border-radius: 18px;
  background:
    linear-gradient(160deg, rgba(22, 101, 52, 0.22), rgba(22, 27, 39, 0.96));
  border: 1px solid rgba(34, 197, 94, 0.18);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.match-card__logo.channel-card__logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  font-size: 0.82rem;
}

.match-card__logo.channel-card__logo--image {
  width: auto;
  max-width: 72px;
  height: 72px;
  padding: 0;
  border-radius: 0;
  object-fit: contain;
  object-position: center;
  background: transparent;
}

.match-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 197, 94, 0.42);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.28);
}

.match-card__live {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.match-card__competition {
  display: inline-flex;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #86efac;
  font-size: 0.78rem;
  font-weight: 600;
}

.match-card__title {
  font-size: 1.05rem;
  line-height: 1.35;
}

.match-card__channel,
.match-card__cta {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.match-card__cta {
  margin-top: auto;
  color: #86efac;
  font-weight: 600;
}

.match-card--compact {
  min-height: 180px;
  padding: 16px;
}

.home-row__track--matches {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 260px);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
}


.content-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.content-grid--browse {
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 24px 18px;
}

.content-grid .content-card {
  min-width: 0;
}

.home-row__track .content-card,
.home-row__track .content-card.content-card--poster {
  flex: 0 0 clamp(210px, 22vw, 280px);
}

.content-card--poster {
  flex: unset;
  gap: 10px;
}

.content-card--poster .content-card__image {
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.content-card--poster .content-card__img {
  object-position: center center;
}

.content-card--poster:hover {
  transform: translateY(-8px) scale(1.04);
}

.content-card--poster .content-card__title {
  font-size: 0.94rem;
  line-height: 1.3;
}

.content-card--poster .content-card__meta {
  font-size: 0.78rem;
}

.content-card--poster .content-card__genres {
  display: none;
}

.browse-toolbar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

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

.page-browse--type .page-body {
  padding-top: calc(var(--header-h) + var(--safe-top) + 18px);
}

.page-browse--type .browse-toolbar {
  flex-direction: row;
  align-items: center;
  gap: 20px;
  padding-bottom: 18px;
  margin-bottom: 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.page-browse--type .browse-count {
  margin: 0;
  flex-shrink: 0;
  color: #edf2ff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-browse--type .browse-genres {
  flex: 1;
}

.page-browse--type .browse-genres__track {
  flex-wrap: nowrap;
  gap: 4px;
  padding: 0 4px;
}

html[data-browse-mode="type"] #pageHero {
  display: none !important;
}

html[data-browse-mode="type"] .page-body {
  padding-top: calc(var(--header-h) + var(--safe-top) + 18px);
}

html[data-browse-mode="type"] .browse-toolbar {
  flex-direction: row;
  align-items: center;
  gap: 20px;
  padding-bottom: 18px;
  margin-bottom: 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-browse-mode="type"] .browse-count {
  display: block;
  margin: 0;
  flex-shrink: 0;
  color: #edf2ff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

html[data-browse-mode="type"] .browse-genres {
  flex: 1;
}

html[data-browse-mode="lists"] .browse-toolbar,
html[data-browse-mode="genre"] .browse-toolbar {
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.page-browse--lists .browse-count,
.page-browse--genre .browse-count {
  display: none;
}

.page-browse--lists .browse-genres__track,
.page-browse--genre .browse-genres__track {
  flex-wrap: nowrap;
  gap: 4px;
}

.empty-state {
  margin-bottom: 28px;
  padding: 26px 22px;
  border-radius: 18px;
  background: rgba(26, 31, 43, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
}

.search-count {
  margin-bottom: 18px;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.site-footer,
#footer {
  margin-top: 26px;
  padding:
    40px
    max(var(--page-pad), calc(var(--page-pad) + var(--safe-right)))
    calc(32px + var(--safe-bottom))
    max(var(--page-pad), calc(var(--page-pad) + var(--safe-left)));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(10, 12, 18, 0.4) 0%, rgba(8, 10, 15, 0.92) 100%);
}

.site-footer__inner,
.footer-inner {
  width: min(1360px, 100%);
  margin: 0 auto;
}

.site-footer__main {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(0, 1fr));
  gap: 32px 28px;
  margin-bottom: 32px;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 12px;
}

.site-footer__logo {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.site-footer__tagline {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
  max-width: 28ch;
}

.site-footer__social {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.site-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(219, 228, 255, 0.82);
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.site-footer__social-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.site-footer__social-link:hover {
  background: rgba(59, 91, 219, 0.16);
  border-color: rgba(59, 91, 219, 0.35);
  color: #fff;
}

.site-footer__col h5,
.site-footer__grid h5,
.footer-cols h5 {
  margin-bottom: 14px;
  color: #ecf2ff;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.site-footer__col a,
.site-footer__grid a,
.footer-cols a {
  display: block;
  color: var(--text-muted);
  font-size: 0.86rem;
  padding: 5px 0;
  transition: color 0.2s ease;
}

.site-footer__col a:hover,
.site-footer__grid a:hover,
.footer-cols a:hover {
  color: #fff;
}

.site-footer__grid,
.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 24px;
}

.site-footer__bottom,
.footer-bot {
  color: var(--text-muted);
  font-size: 0.84rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 20px;
}

.site-footer__disclaimer {
  margin-top: 8px;
  color: rgba(148, 163, 184, 0.72);
  font-size: 0.78rem;
  line-height: 1.5;
  max-width: 72ch;
}

.page-legal .legal-content {
  max-width: 72ch;
}

.page-legal .legal-content h2 {
  margin: 28px 0 12px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #edf2ff;
}

.page-legal .legal-content h2:first-child {
  margin-top: 0;
}

.page-legal .legal-content p,
.page-legal .legal-content li {
  color: var(--text-soft);
  font-size: 0.94rem;
  line-height: 1.7;
}

.page-legal .legal-content ul {
  margin: 10px 0 18px;
  padding-left: 1.2rem;
}

.page-legal .legal-content a {
  color: #9eb4ff;
}

.page-legal .legal-content a:hover {
  color: #c7d4ff;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 600;
}

@media (max-width: 1024px) {
  :root {
    --header-h: 72px;
    --page-pad: 24px;
  }

  .hero {
    min-height: 78vh;
  }

  .hero-slide__content {
    bottom: 96px;
    width: calc(100% - 2 * var(--page-pad));
  }

  .hero-dots {
    left: var(--page-pad);
    right: auto;
    bottom: 56px;
  }

  .home,
  .browse {
    width: calc(100% - 2 * var(--page-pad));
    margin-top: 0;
    padding-top: 28px;
  }

  .content-card {
    flex-basis: clamp(220px, 30vw, 260px);
  }

  .top10-card {
    flex-basis: clamp(168px, 22vw, 200px);
  }

  .detail__inner {
    align-items: stretch;
    gap: 22px;
    padding-top: calc(var(--header-h) + var(--safe-top) + 38px);
    padding-bottom: 40px;
  }

  .detail__content {
    justify-content: flex-end;
  }

  .episodes__grid,
  .episode-list,
  .channels-grid,
  .channel-grid,
  .content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__brand {
    grid-column: 1 / -1;
    padding-right: 0;
  }

  .site-footer__grid,
  .footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 64px;
    --page-pad: 16px;
  }

  .site-nav,
  .main-nav,
  .search-form,
  .free-badge {
    display: none;
  }

  .menu-toggle,
  .menu-btn,
  .mobile-search-link {
    display: inline-flex;
  }

  .site-header__inner,
  .header-inner {
    gap: 12px;
  }

  .hero {
    min-height: 72vh;
    max-height: none;
  }

  .hero-slide__overlay {
    background:
      linear-gradient(0deg, #0f1117 0%, rgba(15, 17, 23, 0.5) 35%, transparent 58%),
      linear-gradient(90deg, rgba(9, 11, 17, 0.9) 0%, rgba(9, 11, 17, 0.45) 100%);
  }

  .hero-slide--portrait .hero-slide__img--poster {
    max-width: min(46vw, 200px);
    max-height: 42vh;
    margin-top: calc(var(--header-h) + var(--safe-top) + 16px);
    margin-right: var(--page-pad);
    margin-bottom: 32px;
  }

  .hero-slide--portrait .hero-slide__overlay {
    background:
      linear-gradient(0deg, #0f1117 0%, rgba(15, 17, 23, 0.82) 42%, rgba(15, 17, 23, 0.28) 68%, transparent 88%),
      linear-gradient(90deg, rgba(9, 11, 17, 0.94) 0%, rgba(9, 11, 17, 0.55) 100%);
  }

  .hero-slide__content {
    bottom: 88px;
    left: var(--page-pad);
    right: var(--page-pad);
    width: auto;
  }

  .hero-slide__content h1 {
    font-size: clamp(1.8rem, 8vw, 2.4rem);
    max-width: 14ch;
  }

  .hero-slide__desc {
    -webkit-line-clamp: 2;
  }

  .hero-slide__actions {
    width: 100%;
  }

  .hero-slide__actions .btn {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
  }

  .hero-dots {
    left: var(--page-pad);
    bottom: 48px;
  }

  .home,
  .browse {
    width: calc(100% - 2 * var(--page-pad));
    margin-top: 0;
    padding-top: 24px;
  }

  .top10-card {
    flex: 0 0 clamp(148px, 42vw, 180px);
  }

  .home-row__nav {
    display: none;
  }

  .home-row--top10 .home-row__track {
    gap: 44px;
    padding-inline: 28px 12px;
    scroll-padding-inline: 12px;
  }

  .home-row--top10 .home-row__scroller::before,
  .home-row--top10 .home-row__scroller::after {
    width: 28px;
  }

  .top10-card__rank {
    font-size: clamp(4.6rem, 22vw, 6rem);
    -webkit-text-stroke-width: 2.4px;
  }

  .top10-card[data-rank="10"] .top10-card__rank,
  .top10-card[data-rank="9"] .top10-card__rank,
  .top10-card[data-rank="8"] .top10-card__rank {
    font-size: clamp(3.6rem, 18vw, 4.8rem);
  }

  .home-row {
    margin-bottom: 28px;
  }

  .home-row__head {
    align-items: flex-end;
  }

  .home-row__track {
    gap: 12px;
    padding-bottom: 12px;
  }

  .content-card {
    flex: 0 0 74vw;
  }

  .page-hero {
    padding-top: calc(var(--header-h) + var(--safe-top) + 28px);
    padding-bottom: 28px;
  }

  .page-body {
    width: calc(100% - 2 * var(--page-pad));
    padding-top: 22px;
  }

  .page-browse--type .browse-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  html[data-browse-mode="type"] .browse-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .page-browse--type .browse-count {
    font-size: 0.94rem;
  }

  html[data-browse-mode="type"] .browse-count {
    font-size: 0.94rem;
  }

  .browse-genres::before,
  .browse-genres::after {
    width: 18px;
  }

  .detail__backdrop {
    height: 540px;
  }

  .detail__inner {
    width: calc(100% - 2 * var(--page-pad));
    min-height: 540px;
    align-items: stretch;
    gap: 18px;
    padding-bottom: 32px;
  }

  .detail__content {
    justify-content: flex-end;
  }

  .detail__poster {
    display: none;
  }

  .detail__content h1 {
    font-size: clamp(2rem, 9vw, 2.6rem);
  }

  .detail__actions .btn {
    flex: 0 1 auto;
    width: auto;
    min-width: 160px;
  }

  .season-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .detail__episodes {
    width: calc(100% - 2 * var(--page-pad));
  }

  .episodes {
    padding: 18px;
  }

  .episodes__grid,
  .episode-list,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .content-grid--browse {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 14px;
  }

  .channels-grid,
  .channel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__main,
  .site-footer__grid,
  .footer-cols {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px 12px;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
    padding-right: 0;
  }

  .site-footer__col h5,
  .site-footer__grid h5,
  .footer-cols h5 {
    margin-bottom: 8px;
    font-size: 0.82rem;
  }

  .site-footer__col a,
  .site-footer__grid a,
  .footer-cols a {
    font-size: 0.8rem;
    padding: 4px 0;
  }

  .episode-card__image,
  .ep-thumb {
    width: 128px;
  }

  .player-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .player-episode-row {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .player-episode-row__badge {
    grid-column: 1 / -1;
    padding-left: 0;
  }

  .player-series-layout {
    grid-template-columns: 1fr;
    width: calc(100% - 2 * var(--page-pad));
    gap: 12px;
  }

  .player-episodes-sidebar {
    max-height: 360px;
  }

  .player-body {
    width: calc(100% - 2 * var(--page-pad));
    padding-top: 22px;
  }

  .player-page {
    padding-bottom: calc(32px + var(--safe-bottom));
  }

  .page-player .player-stage__overlay {
    padding:
      20px
      max(var(--page-pad), calc(var(--page-pad) + var(--safe-right)))
      32px
      max(var(--page-pad), calc(var(--page-pad) + var(--safe-left)));
  }

  .player-copy,
  .player-info {
    padding: 18px;
  }

  .player-copy__actions .btn,
  .player-controls .btn {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .brand,
  .logo {
    font-size: 1.32rem;
  }

  .hero {
    min-height: 84svh;
  }

  .hero-slide__content h1 {
    max-width: 11ch;
  }

  .hero-slide__actions .btn {
    flex-basis: 100%;
  }

  .content-card {
    flex-basis: 82vw;
  }

  .top10-card {
    flex-basis: clamp(140px, 46vw, 168px);
  }

  .player-copy__actions .btn,
  .player-controls .btn {
    flex-basis: 100%;
  }

  .detail__actions .btn {
    flex-basis: auto;
  }
}

/* stream player */
.stream-player {
  width: 100%;
  background: #05070c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  outline: none;
}

.stream-player__screen {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: min(56.25vw, 72vh, 780px);
  margin: 0 auto;
  overflow: hidden;
  background: #000;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

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

.stream-player__video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.stream-player__preroll {
  position: absolute;
  inset: 0;
  z-index: 50;
  overflow: hidden;
  background: #000;
}

.stream-player__preroll--takeover {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
}

.player-immersive.has-preroll-ad {
  background: #000;
}

.player-immersive.has-preroll-ad .stream-player__screen {
  background: #000;
}

.stream-player__preroll-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.stream-player__preroll-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.stream-player__preroll--takeover .stream-player__preroll-video {
  z-index: 1;
}

.stream-player__preroll-buffering {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-width: 160px;
  padding: 1rem 1.2rem;
  border-radius: 14px;
  background: rgba(8, 10, 18, 0.72);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  pointer-events: none;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(6px);
}

.stream-player__preroll-buffering[hidden] {
  display: none !important;
}

.stream-player__preroll-buffering-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-top-color: #fff;
  border-radius: 50%;
  animation: preroll-spin 0.7s linear infinite;
}

@keyframes preroll-spin {
  to {
    transform: rotate(360deg);
  }
}

.stream-player__preroll-tap {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-width: 168px;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  background: rgba(8, 10, 18, 0.82);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(8px);
}

.stream-player__preroll-tap[hidden] {
  display: none !important;
}

.stream-player__preroll-tap-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4868ea 0%, #5b7cff 100%);
  font-size: 1.15rem;
  line-height: 1;
}

.stream-player__preroll-unmute {
  margin-left: auto;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(15, 17, 23, 0.82);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  pointer-events: auto;
}

.stream-player__preroll-unmute[hidden] {
  display: none !important;
}

.stream-player__preroll-chrome {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.stream-player__preroll-top,
.stream-player__preroll-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  pointer-events: none;
}

.stream-player__preroll-top {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.72) 0%, transparent 100%);
  pointer-events: none;
}

.stream-player__preroll-top .stream-player__preroll-unmute {
  pointer-events: auto;
}

.stream-player__preroll-bottom {
  flex-direction: column;
  align-items: stretch;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82) 0%, transparent 100%);
}

.stream-player__preroll-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.72);
  color: #f5c518;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stream-player__preroll-hint {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.8125rem;
}

.stream-player__preroll-progress {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.stream-player__preroll-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #f5c518;
  transition: width 0.15s linear;
}

.stream-player__preroll-skip {
  align-self: flex-end;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  background: rgba(15, 17, 23, 0.88);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.stream-player__preroll-skip:disabled {
  opacity: 0.72;
  cursor: default;
}

.stream-player__preroll-skip:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.42);
}

.stream-player.is-preroll .stream-player__video,
.stream-player.is-preroll [data-player-ui],
.stream-player.is-preroll [data-stream-status],
.stream-player.is-preroll .stream-player__poster {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.stream-player__subs-layer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(96px, 18%, 168px);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  padding: 0 5%;
  pointer-events: none;
}

.stream-player__subs-line {
  display: inline-block;
  max-width: min(90%, 880px);
  padding: 0.32em 0.72em;
  border-radius: 6px;
  color: var(--subs-color, #fff);
  font-size: calc(var(--subs-font-size, 1.15rem) * var(--subs-scale, 1));
  font-weight: var(--subs-font-weight, 600);
  line-height: 1.42;
  letter-spacing: 0.01em;
  text-align: center;
  background: rgba(0, 0, 0, 0.78);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  word-break: break-word;
}

.stream-player[data-subs-bg="box"] .stream-player__subs-line {
  background: rgba(0, 0, 0, 0.78);
  border: none;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.stream-player[data-subs-bg="tinted"] .stream-player__subs-line {
  background: color-mix(in srgb, var(--subs-color, #fff) 16%, rgba(0, 0, 0, 0.72));
  border: 1px solid color-mix(in srgb, var(--subs-color, #fff) 28%, transparent);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}

.stream-player[data-subs-bg="dim"] .stream-player__subs-line {
  background: rgba(0, 0, 0, 0.42);
  border: none;
  box-shadow: none;
}

.stream-player[data-subs-bg="none"] .stream-player__subs-line {
  padding: 0.12em 0.24em;
  background: transparent;
  border: none;
  box-shadow: none;
  text-shadow:
    0 0 4px rgba(0, 0, 0, 1),
    0 1px 3px rgba(0, 0, 0, 1),
    0 2px 10px rgba(0, 0, 0, 0.95);
}

.stream-player__subs-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.stream-player.is-subs-off .stream-player__subs-btn {
  opacity: 0.72;
}

.stream-player__subs-section--toggle {
  padding-bottom: 0.65rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.stream-player__subs-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 248px;
  max-width: min(92vw, 288px);
  max-height: min(72vh, 400px);
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgb(8, 10, 16);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  pointer-events: auto;
}

.stream-player__subs-panel[hidden] {
  display: none !important;
}

.stream-player.subs-menu-open .stream-player__subs-layer {
  opacity: 0;
}

.stream-player__subs-section {
  padding: 8px 2px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.stream-player__subs-section:last-of-type {
  border-bottom: none;
  padding-bottom: 6px;
}

.stream-player__subs-section-title {
  margin: 0 0 8px;
  color: rgba(219, 228, 255, 0.65);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stream-player__subs-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stream-player__subs-options--stack {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.stream-player__subs-chip {
  margin: 0;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.stream-player__subs-chip--wide {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  padding: 9px 12px;
  text-align: left;
}

.stream-player__subs-chip:hover {
  border-color: rgba(91, 124, 255, 0.45);
  background: rgba(72, 104, 234, 0.14);
}

.stream-player__subs-chip.is-active {
  border-color: rgba(91, 124, 255, 0.65);
  background: rgba(72, 104, 234, 0.24);
  color: #dbe4ff;
}

.stream-player__subs-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stream-player__subs-swatch {
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: var(--swatch-color, #fff);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.stream-player__subs-swatch:hover {
  transform: scale(1.05);
}

.stream-player__subs-swatch.is-active {
  border-color: #5b7cff;
  box-shadow: 0 0 0 2px rgba(91, 124, 255, 0.35);
}

.stream-player__subs-preview {
  display: flex;
  justify-content: center;
  margin-top: 4px;
  padding: 10px 4px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.stream-player__subs-preview-label {
  display: inline-block;
  max-width: 100%;
  padding: 0.35em 0.65em;
  border-radius: 6px;
  color: var(--subs-color, #fff);
  font-size: 0.82rem;
  font-weight: var(--subs-font-weight, 600);
  line-height: 1.35;
  text-align: center;
  word-break: break-word;
  background: rgba(0, 0, 0, 0.78);
}

.stream-player[data-subs-bg="box"] .stream-player__subs-preview-label {
  background: rgba(0, 0, 0, 0.78);
}

.stream-player[data-subs-bg="tinted"] .stream-player__subs-preview-label {
  background: color-mix(in srgb, var(--subs-color, #fff) 16%, rgba(0, 0, 0, 0.72));
  border: 1px solid color-mix(in srgb, var(--subs-color, #fff) 28%, transparent);
}

.stream-player[data-subs-bg="dim"] .stream-player__subs-preview-label {
  background: rgba(0, 0, 0, 0.42);
}

.stream-player[data-subs-bg="none"] .stream-player__subs-preview-label {
  padding: 0.12em 0.24em;
  background: transparent;
  text-shadow:
    0 0 4px rgba(0, 0, 0, 1),
    0 1px 3px rgba(0, 0, 0, 1);
}

.stream-player__subs-btn {
  gap: 0.35rem;
}

.stream-player__subs-btn-icon {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stream-player.is-playing:not(.controls-visible):not(.is-paused) .stream-player__subs-layer {
  bottom: clamp(72px, 14%, 128px);
}

@media (max-width: 768px) {
  .stream-player {
    --subs-scale: 0.62;
  }

  .stream-player__subs-layer {
    bottom: clamp(58px, 11%, 96px);
    gap: 0.28rem;
    padding: 0 3.5%;
  }

  .stream-player.is-playing:not(.controls-visible):not(.is-paused) .stream-player__subs-layer {
    bottom: clamp(36px, 8%, 72px);
  }

  .stream-player__subs-line {
    max-width: 94%;
    padding: 0.2em 0.48em;
    border-radius: 5px;
    line-height: 1.32;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  }
}

@media (max-width: 420px) {
  .stream-player {
    --subs-scale: 0.55;
  }
}

/* Native + CSS fullscreen: keep subtitles readable on phone screens */
.stream-player:fullscreen .stream-player__screen,
.stream-player__screen:fullscreen,
.stream-player.is-css-fullscreen .stream-player__screen {
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  border-radius: 0;
}

.stream-player:fullscreen,
.stream-player.is-css-fullscreen {
  background: #000;
}

.stream-player.is-css-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 10050;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  margin: 0;
  border: 0;
  border-radius: 0;
}

.stream-player.is-css-fullscreen .stream-player__screen {
  position: absolute;
  inset: 0;
  margin: 0;
}

.stream-player.is-css-fullscreen .stream-player__video,
.stream-player:fullscreen .stream-player__video,
.stream-player__screen:fullscreen .stream-player__video {
  object-fit: contain;
}

html.has-player-css-fullscreen,
html.has-player-css-fullscreen body {
  overflow: hidden !important;
  touch-action: none;
}

.stream-player:fullscreen .stream-player__subs-layer,
.stream-player__screen:fullscreen .stream-player__subs-layer,
.stream-player.is-css-fullscreen .stream-player__subs-layer,
.stream-player.is-fullscreen .stream-player__subs-layer {
  bottom: max(18px, env(safe-area-inset-bottom, 0px) + 14px);
  padding: 0 4%;
  z-index: 6;
}

.stream-player.is-playing:not(.controls-visible):not(.is-paused):fullscreen .stream-player__subs-layer,
.stream-player.is-playing:not(.controls-visible):not(.is-paused).is-css-fullscreen .stream-player__subs-layer,
.stream-player.is-playing:not(.controls-visible):not(.is-paused).is-fullscreen .stream-player__subs-layer {
  bottom: max(14px, env(safe-area-inset-bottom, 0px) + 10px);
}

.stream-player:fullscreen .stream-player__subs-line,
.stream-player__screen:fullscreen .stream-player__subs-line,
.stream-player.is-css-fullscreen .stream-player__subs-line,
.stream-player.is-fullscreen .stream-player__subs-line {
  max-width: min(92%, 40rem);
  font-size: clamp(
    0.72rem,
    calc(var(--subs-font-size, 1.15rem) * 0.7 + 0.35vmin),
    1.2rem
  );
  padding: 0.22em 0.55em;
}

@media (max-width: 768px) {
  .stream-player:fullscreen .stream-player__subs-line,
  .stream-player__screen:fullscreen .stream-player__subs-line,
  .stream-player.is-css-fullscreen .stream-player__subs-line,
  .stream-player.is-fullscreen .stream-player__subs-line {
    font-size: clamp(
      0.68rem,
      calc(var(--subs-font-size, 1.15rem) * 0.58 + 0.8vw),
      0.98rem
    );
  }
}

/* --- custom HLS player UI --- */
.stream-player__ui {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}

.stream-player__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0) 28%,
    rgba(0, 0, 0, 0) 55%,
    rgba(0, 0, 0, 0.82) 100%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
}

.stream-player.controls-visible .stream-player__shade,
.stream-player.is-paused .stream-player__shade {
  opacity: 1;
}

.stream-player__center-play {
  position: absolute;
  top: 50%;
  left: 50%;
  /* Above the bottom controls bar so short viewports don't steal the tap. */
  z-index: 6;
  transform: translate(-50%, -50%) scale(1);
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #4868ea 0%, #5b7cff 52%, #7b93ff 100%);
  box-shadow:
    0 16px 42px rgba(72, 104, 234, 0.45),
    0 0 0 10px rgba(91, 124, 255, 0.12);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.stream-player__center-play:hover {
  transform: translate(-50%, -50%) scale(1.07);
  box-shadow:
    0 20px 48px rgba(72, 104, 234, 0.55),
    0 0 0 12px rgba(91, 124, 255, 0.16);
}

.stream-player__center-play svg {
  width: 34px;
  height: 34px;
  margin-left: 4px;
  fill: currentColor;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.18));
}

.stream-player.is-playing .stream-player__center-play {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.92);
}

.stream-player.is-paused .stream-player__center-play {
  opacity: 1;
  pointer-events: auto;
}

.stream-player__skip-flash {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 88px;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(-50%) scale(0.88);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.stream-player__skip-flash svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
}

.stream-player__skip-flash span {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.stream-player__skip-flash--back {
  left: clamp(12px, 16%, 120px);
}

.stream-player__skip-flash--forward {
  right: clamp(12px, 16%, 120px);
}

.stream-player__skip-flash.is-visible {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.stream-player__controls {
  position: relative;
  z-index: 4;
  padding: 0 16px 16px;
  /* Let empty control chrome pass taps through to center-play / screen. */
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.stream-player__controls > * {
  pointer-events: auto;
}

.stream-player__controls::before {
  content: "";
  position: absolute;
  inset: -8px -4px -4px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, rgba(8, 10, 18, 0) 0%, rgba(8, 10, 18, 0.72) 38%, rgba(8, 10, 18, 0.92) 100%);
  backdrop-filter: blur(10px);
  pointer-events: none;
}

.stream-player.controls-visible .stream-player__controls,
.stream-player.is-paused .stream-player__controls {
  opacity: 1;
  transform: translateY(0);
}

.stream-player__progress-wrap {
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
}

.stream-player__progress {
  position: relative;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  overflow: visible;
}

.stream-player__progress-buffer,
.stream-player__progress-played {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: inherit;
  pointer-events: none;
}

.stream-player__progress-buffer {
  background: rgba(255, 255, 255, 0.22);
}

.stream-player__progress-played {
  background: linear-gradient(90deg, #4868ea, var(--primary, #5b7cff));
  box-shadow: 0 0 12px rgba(91, 124, 255, 0.45);
}

.stream-player__seek {
  position: absolute;
  inset: -8px 0;
  width: 100%;
  height: calc(100% + 16px);
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.stream-player__progress:hover {
  height: 7px;
  margin-top: -1px;
}

.stream-player__bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stream-player__bar-left,
.stream-player__bar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.stream-player__icon-btn {
  display: inline-grid;
  grid-template: 1fr / 1fr;
  place-items: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.stream-player__icon-btn svg {
  grid-area: 1 / 1;
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.stream-player__icon-btn svg[hidden] {
  display: none !important;
}

.stream-player__play-btn [data-icon-pause],
.stream-player__volume-btn [data-icon-muted] {
  display: none;
}

.stream-player.is-playing .stream-player__play-btn [data-icon-play] {
  display: none;
}

.stream-player.is-playing .stream-player__play-btn [data-icon-pause] {
  display: block;
}

.stream-player.is-muted .stream-player__volume-btn [data-icon-volume] {
  display: none;
}

.stream-player.is-muted .stream-player__volume-btn [data-icon-muted] {
  display: block;
}

.stream-player__icon-btn:hover {
  background: rgba(91, 124, 255, 0.18);
  color: #fff;
}

.stream-player__icon-btn:active {
  transform: scale(0.94);
}

.stream-player__skip-btn {
  position: relative;
}

.stream-player__skip-num {
  position: absolute;
  right: 5px;
  bottom: 4px;
  font-size: 0.52rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  pointer-events: none;
}

.stream-player__timecode {
  margin-left: 4px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.84rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stream-player__time-sep {
  color: rgba(255, 255, 255, 0.45);
}

.stream-player__volume {
  position: relative;
  display: flex;
  align-items: center;
}

/* Invisible bridge so the slider stays open while moving the cursor up from the button */
.stream-player__volume::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  width: 48px;
  height: 126px;
  pointer-events: none;
}

.stream-player__volume:hover::before,
.stream-player__volume:focus-within::before {
  pointer-events: auto;
}

.stream-player__volume-pop {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%) scale(0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 112px;
  padding: 12px 0;
  border-radius: 12px;
  background: rgba(12, 14, 22, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.stream-player__volume:hover .stream-player__volume-pop,
.stream-player__volume:focus-within .stream-player__volume-pop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) scale(1);
}

@media (hover: none) {
  .stream-player__volume-pop {
    display: none;
  }
}

.stream-player__volume-slider {
  width: 88px;
  height: 4px;
  margin: 0;
  transform: rotate(-90deg);
  accent-color: var(--primary, #5b7cff);
  cursor: pointer;
}

.stream-player__pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(91, 124, 255, 0.35);
  border-radius: 999px;
  background: rgba(91, 124, 255, 0.12);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.stream-player__pill-btn:hover {
  background: rgba(91, 124, 255, 0.22);
  border-color: rgba(91, 124, 255, 0.55);
}

.stream-player__pill-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  opacity: 0.92;
}

.stream-player__settings-icon {
  display: none;
}

.stream-player__quality-wrap {
  position: relative;
}

.stream-player__audio-wrap {
  flex-shrink: 0;
}

.stream-player__audio-segment {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.stream-player__audio-segment-btn {
  margin: 0;
  padding: 6px 10px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.stream-player__audio-segment-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.stream-player__audio-segment-btn.is-active {
  background: rgba(72, 104, 234, 0.32);
  color: #dbe4ff;
  box-shadow: inset 0 0 0 1px rgba(91, 124, 255, 0.55);
}

.stream-player__quality-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 20;
  min-width: 140px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(8, 10, 16, 0.97);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.stream-player__quality-option {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.stream-player__quality-option:hover,
.stream-player__quality-option.is-active {
  background: rgba(72, 104, 234, 0.2);
  color: #dbe4ff;
}

.stream-player__quality-option.is-disabled {
  opacity: 0.45;
  cursor: default;
}

.stream-player--video .stream-player__screen {
  background: #000;
}

.stream-player__overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(5, 7, 12, 0.28);
  transition: opacity 0.25s ease;
}

.stream-player__overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.stream-player__big-play {
  width: 72px;
  height: 72px;
  border: none;
  border-radius: 999px;
  color: #0f1117;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.stream-player__big-play svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.stream-player__status {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(5, 7, 12, 0.72);
  text-align: center;
}

.stream-player__status--loading {
  gap: 14px;
  padding: 24px;
  background: rgba(5, 7, 12, 0.9);
}

.stream-player__status--error {
  background: rgba(5, 7, 12, 0.82);
}

.stream-player__status p {
  font-weight: 700;
}

.stream-player__status small {
  color: var(--text-muted);
}

.stream-player__spinner {
  display: block;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  margin: 0;
  border: none;
  border-radius: 999px;
  box-sizing: border-box;
  background: conic-gradient(from -90deg, var(--primary) 0deg 75deg, rgba(255, 255, 255, 0.14) 75deg 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  transform-origin: center center;
  animation: spin 0.9s linear infinite;
}

.stream-player__status--loading .stream-player__spinner {
  width: 52px;
  height: 52px;
}

.stream-player[data-content-id] .stream-player__live,
.stream-player[data-content-id] [data-player-goto-live],
.stream-player[data-content-id] [data-live-delay] {
  display: none !important;
}

.stream-player.has-subtitles [data-subs-wrap] {
  display: inline-flex !important;
}

.stream-player[data-live-match="1"] [data-subs-wrap],
.stream-player[data-live-match="1"] [data-subs-layer] {
  display: none !important;
}

.stream-player__live {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 11px 0 9px;
  border-radius: 8px;
  background: #dc2626;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.stream-player__live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55);
  animation: live-pulse 1.6s ease-out infinite;
  flex-shrink: 0;
}

.stream-player__live.is-delayed {
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #fecaca;
  cursor: pointer;
  box-shadow: none;
}

.stream-player__live.is-delayed::before {
  background: #fca5a5;
  animation: none;
  box-shadow: none;
}

.stream-player__live-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 30px;
  margin-left: 0.35rem;
  padding: 0 0.65rem;
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 999px;
  background: rgba(127, 29, 29, 0.55);
  color: #fecaca;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.stream-player__live-btn.is-at-live {
  background: rgba(220, 38, 38, 0.92);
  border-color: rgba(254, 202, 202, 0.35);
  color: #fff;
  cursor: default;
}

.stream-player__live-btn.is-delayed:hover,
.stream-player__live-btn.is-delayed:focus-visible {
  background: rgba(185, 28, 28, 0.95);
  border-color: rgba(254, 202, 202, 0.55);
  color: #fff;
  transform: translateY(-1px);
}

.stream-player__live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.stream-player__live-btn.is-at-live .stream-player__live-dot {
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.65);
  animation: live-pulse 1.6s ease-out infinite;
}

.stream-player__live-delay {
  margin-left: 0.35rem;
  color: #fca5a5;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.stream-player.is-live-player .stream-player__time-sep,
.stream-player.is-live-player [data-player-duration] {
  display: none;
}

.stream-player.is-live-player .stream-player__timecode {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15rem;
}

.stream-player.is-live-delayed .stream-player__progress-played {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

.stream-player__unmute-hint {
  position: absolute;
  left: 50%;
  bottom: 18%;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  pointer-events: auto;
  transform: translateX(-50%);
  backdrop-filter: blur(8px);
  animation: unmute-hint-pulse 2s ease-in-out infinite;
}

.stream-player__unmute-hint svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

@keyframes unmute-hint-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.18);
  }

  50% {
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
  }
}

/* legacy demo player chrome */
.stream-player__chrome {
  padding: 10px 16px 14px;
  background: linear-gradient(180deg, #0b0e15 0%, #080a10 100%);
}

.stream-player__chrome .stream-player__progress {
  height: 4px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.stream-player__chrome .stream-player__progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #4868ea, var(--primary));
}

.stream-player__chrome .stream-player__controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  opacity: 1;
  transform: none;
}

.stream-player__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}

.stream-player__btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.stream-player__time,
.stream-player__quality {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 600;
}

.stream-player__spacer {
  flex: 1;
}

.stream-player__label {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(42vw, 320px);
}

.stream-player__quality-btn {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.stream-player--hls .stream-player__status {
  z-index: 4;
}

.stream-player__status-text {
  margin: 0;
  max-width: min(90vw, 320px);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.stream-player__status-hint {
  margin: 0;
  max-width: min(90vw, 320px);
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
  font-weight: 500;
  text-align: center;
}

.stream-player--hls.is-preparing .stream-player__video {
  opacity: 0;
  pointer-events: none;
}

.stream-player--hls.is-preparing .stream-player__ui {
  opacity: 0;
  pointer-events: none;
}

.stream-player--hls.is-preparing .stream-player__poster {
  opacity: 1;
}

.stream-player.is-paused:has(.stream-player__poster) .stream-player__video {
  opacity: 0;
}

@media (max-width: 768px) {
  .player-now-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .player-now-bar .player-actions {
    width: 100%;
  }

  .player-now-bar .player-next-cta {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .player-channel-head {
    align-items: flex-start;
  }

  .player-body {
    width: calc(100% - 2 * var(--page-pad));
    padding-top: 18px;
  }

  .page-player .player-immersive .stream-player__screen {
    max-height: min(56.25vw, 58vh, 480px);
  }

  .page-player .player-immersive .stream-player {
    border-bottom: none;
  }
}

@media (max-width: 768px) and (orientation: landscape) {
  .page-player .player-immersive .stream-player__screen {
    max-height: min(calc(100svh - var(--header-h) - var(--safe-top) - 24px), 78vh);
  }

  .page-player .player-body {
    padding-top: 12px;
  }
}

@media (max-width: 640px) {
  .stream-player__timecode {
    font-size: 0.76rem;
  }

  .stream-player__icon-btn {
    width: 40px;
    height: 40px;
  }

  .stream-player__icon-btn svg {
    width: 21px;
    height: 21px;
  }

  .stream-player__center-play {
    width: 68px;
    height: 68px;
  }

  .stream-player__center-play svg {
    width: 30px;
    height: 30px;
  }

  .stream-player__progress {
    height: 7px;
  }

  .stream-player__seek {
    inset: -14px 0;
    height: calc(100% + 28px);
  }

  .stream-player__pill-btn span {
    display: none;
  }

  .stream-player__subs-wrap .stream-player__pill-btn,
  .stream-player__quality-wrap .stream-player__pill-btn {
    width: 40px;
    height: 40px;
    min-height: 0;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    justify-content: center;
  }

  .stream-player__subs-wrap .stream-player__pill-btn:hover,
  .stream-player__quality-wrap .stream-player__pill-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: transparent;
  }

  .stream-player__subs-btn-icon {
    display: block;
    font-size: 1rem;
  }

  .stream-player__settings-icon {
    display: block;
    width: 21px;
    height: 21px;
    opacity: 1;
  }

  .stream-player__controls {
    padding:
      0
      max(10px, env(safe-area-inset-right, 0px))
      max(12px, env(safe-area-inset-bottom, 0px))
      max(10px, env(safe-area-inset-left, 0px));
  }

  .stream-player__bar {
    gap: 8px;
  }

  .stream-player__bar-left {
    gap: 0;
    flex: 1 1 auto;
    min-width: 0;
  }

  .stream-player__bar-right {
    gap: 4px;
    flex-shrink: 0;
  }

  .stream-player__audio-segment-btn {
    padding: 5px 8px;
    font-size: 0.68rem;
  }

  .stream-player__time-sep,
  .stream-player__timecode [data-player-duration] {
    display: none;
  }

  .stream-player__skip-flash {
    min-width: 76px;
    padding: 0.7rem 0.85rem;
  }

  .stream-player__skip-flash svg {
    width: 28px;
    height: 28px;
  }
}

.player-now-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.player-now-bar h1 {
  margin: 6px 0;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}

.player-now-bar p,
.player-now-bar__show {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.player-channel-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.player-channel-head__logo {
  width: 56px;
  height: 56px;
  font-size: 0.72rem;
}

.epg-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.epg-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.epg-item.is-live {
  background: rgba(59, 91, 219, 0.12);
  border: 1px solid rgba(59, 91, 219, 0.22);
}

.epg-item span {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.epg-item em {
  color: #9eb4ff;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 700;
}

.detail__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 14px 0 18px;
}

.detail__fact {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.detail__fact span {
  display: block;
  color: var(--text-muted);
  font-size: 0.76rem;
  margin-bottom: 4px;
}

.detail__fact strong {
  font-size: 0.9rem;
}

.detail__cast-block {
  margin-bottom: 24px;
}

.detail__cast-block h3 {
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.cast-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cast-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cast-chip__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(59, 91, 219, 0.22);
  color: #dbe4ff;
  font-size: 0.78rem;
  font-weight: 800;
}

.cast-chip__name {
  font-size: 0.84rem;
  color: var(--text-soft);
}

.channel-logo-slot {
  display: contents;
}

.channel-card__logo,
.player-channel-head__logo {
  display: none;
}

.channel-card__logo.channel-card__logo--image {
  display: block;
  width: auto;
  max-width: 100%;
  height: 56px;
  object-fit: contain;
  object-position: left center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.player-channel-head__logo.player-channel-head__logo--image {
  display: block;
  width: 168px;
  max-width: 100%;
  height: 40px;
  object-fit: contain;
  object-position: left center;
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.channel-card--compact {
  flex: 0 0 168px;
  min-height: 148px;
  padding: 14px;
  justify-items: center;
  text-align: center;
}

.channel-card--compact .channel-card__badge {
  justify-self: center;
}

.channel-card--compact .channel-card__logo.channel-card__logo--image,
.channel-card--compact .channel-card__logo.channel-card__logo--image-compact {
  display: block;
  width: auto;
  max-width: 72px;
  height: 44px;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-position: center;
}

.player-channel-head__logo.player-channel-head__logo--image {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  object-position: center;
}

.home-row__track--channels {
  gap: 14px;
}

@media (max-width: 768px) {
  .home-row__track--channels {
    gap: 10px;
  }

  .channel-card--compact {
    flex: 0 0 118px;
    min-height: 112px;
    gap: 5px;
    padding: 10px 8px;
    border-radius: 14px;
  }

  .channel-card--compact .channel-card__logo.channel-card__logo--image,
  .channel-card--compact .channel-card__logo.channel-card__logo--image-compact {
    max-width: 56px;
    height: 36px;
  }

  .channel-card--compact .channel-card__badge {
    min-height: 22px;
    padding: 0 7px;
    font-size: 0.62rem;
    letter-spacing: 0.02em;
  }

  .channel-card--compact .channel-card__title {
    font-size: 0.82rem;
    line-height: 1.2;
  }

  .channel-card--compact .channel-card__meta {
    font-size: 0.72rem;
  }
}

.channel-count {
  margin-bottom: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.channel-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.channels-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
}

.channels-grid--square {
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}

@media (min-width: 640px) {
  .channels-grid--square {
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 12px;
  }
}

@media (min-width: 1024px) {
  .channels-grid--square {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .channels-grid--square {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

.channels-grid--square .channel-card {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 12px;
  text-align: center;
}

.channels-grid--square .channel-card:hover {
  transform: translateY(-2px);
}

.channels-grid--square .channel-card__badge,
.channels-grid--square .channel-card__meta {
  display: none;
}

.channels-grid--square .channel-card__logo.channel-card__logo--image {
  display: block;
  width: auto;
  max-width: 96%;
  height: 72px;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
}

.channels-grid--square .channel-card__title {
  width: 100%;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.browse-boost {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.browse-boost__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.browse-boost__head h2 {
  font-size: 1.05rem;
}

.browse-boost__head span {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.search-trending {
  margin-bottom: 24px;
}

.search-trending h2 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.search-trending__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.search-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(59, 91, 219, 0.14);
  border: 1px solid rgba(59, 91, 219, 0.24);
  color: #dbe4ff;
  font-size: 0.86rem;
  font-weight: 600;
}

.search-chip:hover {
  background: rgba(59, 91, 219, 0.22);
  color: #fff;
}

.hero--skeleton,
.home--skeleton {
  position: relative;
  overflow: hidden;
}

.hero--skeleton {
  min-height: 72vh;
  background: linear-gradient(110deg, #12151d 8%, #1a2030 18%, #12151d 33%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.hero--skeleton::after {
  content: none;
}

.home--skeleton {
  min-height: 320px;
}

.noscript-fallback {
  padding: 24px var(--page-pad);
  color: var(--text-soft);
}

.noscript-fallback ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  list-style: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  to { background-position-x: -200%; }
}

.page-player .player-immersive .stream-player__screen {
  max-height: min(56.25vw, 68vh, 720px);
  transition: max-height 0.35s ease;
}

@media (min-width: 900px) {
  .page-player .player-page:not(.is-wide-mode) .player-immersive {
    width: min(1360px, calc(100% - 2 * var(--page-pad)));
    margin-inline: auto;
  }

  .page-player .player-page--series:not(.is-wide-mode) .player-immersive {
    width: 100%;
    margin-inline: 0;
  }
}

.page-player.is-player-wide-mode .player-immersive,
.page-player .player-page.is-wide-mode .player-immersive,
.page-player .player-immersive.is-wide-mode {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  background: #000;
}

.page-player.is-player-wide-mode .stream-player,
.page-player .player-page.is-wide-mode .stream-player,
.page-player .stream-player.is-wide-mode {
  background: #000;
  border-bottom: none;
}

/* Theater mode: fill viewport under the header — must beat default max-height rules. */
.page-player.is-player-wide-mode .player-immersive .stream-player__screen,
.page-player .player-page.is-wide-mode .player-immersive .stream-player__screen,
.page-player .player-immersive.is-wide-mode .stream-player__screen,
.page-player .stream-player.is-wide-mode .stream-player__screen {
  width: 100%;
  max-width: none;
  aspect-ratio: auto !important;
  height: min(86svh, calc(100svh - var(--header-h) - var(--safe-top) - 8px)) !important;
  max-height: none !important;
}

.page-player.is-player-wide-mode .player-immersive .stream-player__video,
.page-player .player-page.is-wide-mode .player-immersive .stream-player__video,
.page-player .stream-player.is-wide-mode .stream-player__video {
  object-fit: contain;
  background: #000;
}

.page-player.is-player-wide-mode .player-body {
  width: min(1360px, calc(100% - 2 * var(--page-pad)));
  margin-inline: auto;
}

.page-player.is-player-wide-mode {
  overflow-x: hidden;
}

.page-player .player-page.is-wide-mode .player-series-layout {
  grid-template-columns: 1fr;
}

.page-player .player-page.is-wide-mode .player-episodes-sidebar {
  display: none;
}

.stream-player__wide-btn [data-icon-wide-on] {
  display: none;
}

.stream-player__wide-btn.is-active [data-icon-wide-off] {
  display: none;
}

.stream-player__wide-btn.is-active [data-icon-wide-on] {
  display: block;
}

.stream-player__wide-btn.is-active {
  color: #dbe4ff;
  background: rgba(91, 124, 255, 0.28);
  box-shadow: inset 0 0 0 1px rgba(147, 176, 255, 0.45);
}

@media (max-width: 768px) {
  .stream-player__wide-btn {
    display: none !important;
  }

  .page-player.is-player-wide-mode .player-immersive,
  .page-player .player-page.is-wide-mode .player-immersive,
  .page-player .player-immersive.is-wide-mode {
    width: 100%;
    margin-inline: 0;
  }

  .page-player.is-player-wide-mode .player-immersive .stream-player__screen,
  .page-player .player-page.is-wide-mode .player-immersive .stream-player__screen,
  .page-player .player-immersive.is-wide-mode .stream-player__screen,
  .page-player .stream-player.is-wide-mode .stream-player__screen {
    height: auto !important;
    max-height: min(56.25vw, 58vh, 480px) !important;
    aspect-ratio: 16 / 9 !important;
  }

  .page-player .player-immersive .stream-player__screen {
    width: 100%;
  }

  .stream-player__controls {
    padding-inline: max(10px, env(safe-area-inset-left, 0px)) max(10px, env(safe-area-inset-right, 0px));
  }

  .stream-player__bar-right {
    gap: 6px;
  }
}

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

@media (max-width: 768px) {
  .skeleton,
  .skeleton-line,
  .hero-slide__poster,
  .card-skeleton,
  .player-shell__line {
    animation: none !important;
  }
}

.site-ad-strip {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 0 16px;
}

.site-ad-strip[hidden],
.site-ad-rail[hidden] {
  display: none !important;
}

.site-ad {
  margin: 12px 0;
  border-radius: 12px;
  overflow: hidden;
}

.site-ad-strip--footer .site-ad {
  margin-bottom: 0;
}

.site-ad img,
.site-ad iframe,
.site-ad ins {
  max-width: 100%;
}

.player-ad-frame {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
  width: min(1680px, calc(100% - 2 * var(--page-pad)));
  margin-inline: auto;
  padding-inline: max(0px, var(--safe-left)) max(0px, var(--safe-right));
}

.player-ad-frame__stage {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 1360px;
}

.player-ad-frame__stage:empty {
  display: none;
}

.player-ad-frame__stage .player-series-layout,
.player-ad-frame__stage .player-immersive {
  width: 100%;
  margin-inline: 0;
}

.player-ad-frame__stage .player-series-layout {
  padding-inline: 0;
}

.site-ad-strip--player-top,
.site-ad-strip--player-bottom {
  width: min(735px, calc(100% - 2 * var(--page-pad)));
  aspect-ratio: 735 / 70;
  height: auto;
  max-height: 70px;
  margin: 8px auto;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.site-ad-strip--player-top.site-ad-slider,
.site-ad-strip--player-bottom.site-ad-slider {
  display: block;
  position: relative;
}

.site-ad-slider__track {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  aspect-ratio: 735 / 70;
  max-height: 70px;
}

.site-ad-slider__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease;
  pointer-events: none;
  margin: 0 !important;
}

.site-ad-slider__slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}

.site-ad-strip--player-top {
  margin-bottom: 8px;
}

.site-ad-strip--player-bottom {
  margin-top: 8px;
  margin-bottom: 0;
}

.player-immersive > .site-ad-strip--player-bottom {
  width: min(735px, 100%);
}

.player-immersive > .site-ad-strip--player-bottom .site-ad {
  margin: 0;
}

.site-ad-strip--player-top .site-ad,
.site-ad-strip--player-bottom .site-ad {
  width: 100%;
  height: 100%;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.site-ad-strip--player-top img,
.site-ad-strip--player-top iframe,
.site-ad-strip--player-top ins,
.site-ad-strip--player-bottom img,
.site-ad-strip--player-bottom iframe,
.site-ad-strip--player-bottom ins {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Full 160×600 skyscraper in document flow so title/text stay below it. */
.site-ad-rail {
  flex: 0 0 160px;
  width: 160px;
  max-width: 300px;
  height: 600px;
  max-height: 600px;
  align-self: flex-start;
  overflow: hidden;
}

.site-ad-rail .site-ad {
  margin: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.site-ad-rail .site-ad img,
.site-ad-rail .site-ad iframe,
.site-ad-rail .site-ad ins {
  width: 160px;
  height: 600px;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: top center;
}

@media (min-width: 900px) {
  .page-player .player-page:not(.is-wide-mode) .player-ad-frame__stage .player-immersive {
    width: 100%;
    margin-inline: 0;
  }
}

.page-player.is-player-wide-mode .site-ad-rail,
.page-player .player-page.is-wide-mode .site-ad-rail,
.page-player.is-player-wide-mode .site-ad-strip--player-top,
.page-player.is-player-wide-mode .site-ad-strip--player-bottom,
.page-player .player-page.is-wide-mode .site-ad-strip--player-top,
.page-player .player-page.is-wide-mode .site-ad-strip--player-bottom {
  display: none !important;
}

.page-player.is-player-wide-mode .player-ad-frame,
.page-player .player-page.is-wide-mode .player-ad-frame {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-inline: 0;
}

.page-player.is-player-wide-mode .player-ad-frame__stage,
.page-player .player-page.is-wide-mode .player-ad-frame__stage {
  max-width: none;
}

@media (max-width: 1099px) {
  .site-ad-rail {
    display: none !important;
  }

  .player-ad-frame {
    width: min(1360px, calc(100% - 2 * var(--page-pad)));
  }
}
