:root {
  color-scheme: dark;
  --background: #07070a;
  --panel: #111116;
  --panel-strong: #181820;
  --text: #f7f7fb;
  --muted: #a7a7b3;
  --muted-strong: #d9d9e2;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #e50914;
  --accent-dark: #a70710;
  --focus: #f5f5f5;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 18% -12%, rgba(229, 9, 20, 0.22), transparent 34%),
    radial-gradient(circle at 78% 12%, rgba(76, 29, 149, 0.16), transparent 28%),
    linear-gradient(180deg, #050507 0%, var(--background) 42%, #050507 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis-weight: none;
  margin: 0;
  min-height: 100vh;
  text-rendering: geometricPrecision;
}

body.modal-open {
  overflow: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

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

.topbar {
  align-items: center;
  backdrop-filter: blur(16px) saturate(1.12);
  background: linear-gradient(180deg, rgba(5, 5, 7, 0.18), rgba(5, 5, 7, 0));
  border-bottom: 0;
  display: flex;
  justify-content: space-between;
  left: 0;
  padding: 18px clamp(18px, 5vw, 64px);
  position: fixed;
  right: 0;
  top: 0;
  z-index: 20;
}

.topbar::before {
  background:
    linear-gradient(180deg, rgba(3, 3, 5, 0.58), rgba(3, 3, 5, 0.2) 54%, rgba(3, 3, 5, 0)),
    radial-gradient(ellipse at 28% 0%, rgba(3, 3, 5, 0.34), transparent 58%),
    radial-gradient(ellipse at 76% 0%, rgba(3, 3, 5, 0.24), transparent 54%);
  content: "";
  inset: 0 0 -24px;
  pointer-events: none;
  position: absolute;
  z-index: -1;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 3px;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-mark {
  background: linear-gradient(135deg, #ff2631, var(--accent-dark));
  border-radius: 6px;
  box-shadow: 0 14px 30px rgba(229, 9, 20, 0.28);
  display: inline-grid;
  height: 34px;
  place-items: center;
  width: 34px;
}

.nav {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  font-weight: 850;
  gap: 22px;
}

.nav a:hover,
.nav a:focus-visible,
.admin-open-button:hover,
.admin-open-button:focus-visible {
  color: var(--text);
}

.admin-open-button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  padding: 8px 12px;
}

.hero {
  min-height: 76vh;
  overflow: hidden;
  padding: 156px clamp(18px, 5vw, 64px) 116px;
  position: relative;
}

.hero::after {
  background:
    radial-gradient(ellipse at 0% 48%, rgba(7, 7, 10, 0.92), rgba(7, 7, 10, 0.54) 34%, rgba(7, 7, 10, 0.18) 64%, transparent 78%),
    linear-gradient(180deg, rgba(7, 7, 10, 0.06) 0%, rgba(7, 7, 10, 0.16) 36%, rgba(7, 7, 10, 0.48) 76%, var(--background) 100%);
  bottom: 0;
  content: "";
  height: 100%;
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
}

.hero-backdrop {
  background-position: center;
  background-size: cover;
  inset: 0;
  opacity: 1;
  position: absolute;
  transform: scale(1.02);
  transition:
    background-image 260ms ease,
    opacity 220ms ease;
}

.hero-trailer {
  border: 0;
  height: 120%;
  inset: 50% auto auto 50%;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transform: translate(-50%, -50%) scale(1.08);
  transition: opacity 260ms ease;
  width: 120%;
}

.hero-trailer.is-visible {
  opacity: 1;
}

.hero:has(.hero-trailer.is-visible) .hero-backdrop {
  opacity: 0;
}

.hero-sound-button {
  align-items: center;
  backdrop-filter: blur(14px);
  background: rgba(8, 8, 12, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  bottom: 112px;
  color: var(--text);
  display: none;
  font-size: 13px;
  font-weight: 900;
  min-height: 40px;
  padding: 0 14px;
  position: absolute;
  right: clamp(18px, 5vw, 64px);
  z-index: 3;
}

.hero-sound-button.is-visible {
  display: inline-flex;
}

.hero-sound-button:hover,
.hero-sound-button:focus-visible {
  background: rgba(255, 255, 255, 0.16);
}

.hero-copy {
  max-width: 680px;
  position: relative;
  z-index: 1;
}

.eyebrow {
  color: #ffb3b8;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  margin: 0 0 14px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(44px, 7vw, 92px);
  line-height: 0.92;
  margin-bottom: 18px;
  max-width: 820px;
}

h2 {
  font-size: clamp(17px, 1.35vw, 22px);
  letter-spacing: 0;
  line-height: 1.18;
  margin-bottom: 0;
}

.hero-meta,
.hero-text,
#playerMeta,
#playerDescription {
  color: var(--muted);
  line-height: 1.55;
}

.hero-meta {
  font-weight: 900;
  margin-bottom: 14px;
}

.hero-text {
  font-size: clamp(16px, 1.45vw, 20px);
  font-weight: 720;
  max-width: 620px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-button,
.ghost-button {
  border-radius: 6px;
  display: inline-grid;
  font-weight: 950;
  min-height: 48px;
  padding: 0 22px;
  place-items: center;
}

.primary-button {
  background: var(--accent);
  box-shadow: 0 20px 42px rgba(229, 9, 20, 0.26);
}

.primary-button:hover,
.primary-button:focus-visible {
  background: #ff1722;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.16);
}

.ghost-button:hover,
.ghost-button:focus-visible {
  background: rgba(255, 255, 255, 0.24);
}

.top-five-section,
.categories,
.player-section,
.favorites-section {
  padding: 0 clamp(18px, 5vw, 64px);
  position: relative;
}

.top-five-section {
  background: linear-gradient(180deg, rgba(7, 7, 10, 0), rgba(7, 7, 10, 0.72) 28%, var(--background) 100%);
  margin-top: -104px;
  padding-top: 34px;
  z-index: 2;
}

.section-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.slider-controls {
  display: flex;
  gap: 8px;
}

.icon-button {
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid var(--line);
  border-radius: 999px;
  display: grid;
  font-size: 26px;
  height: 36px;
  line-height: 1;
  place-items: center;
  width: 36px;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: rgba(255, 255, 255, 0.2);
}

.top-five-rail,
.title-rail {
  display: grid;
  gap: 12px;
  grid-auto-flow: column;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 4px 0 24px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.top-five-rail::-webkit-scrollbar,
.title-rail::-webkit-scrollbar {
  display: none;
}

.top-five-rail {
  grid-auto-columns: minmax(310px, 28vw);
}

.title-rail.vertical-rail {
  grid-auto-columns: minmax(176px, 13.6vw);
}

.title-rail.horizontal-rail {
  grid-auto-columns: minmax(300px, 24vw);
}

.title-rail.square-rail {
  grid-auto-columns: minmax(190px, 15vw);
}

.top-card,
.title-card {
  background-color: var(--panel);
  background-position: center;
  background-size: cover;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  min-width: 0;
  overflow: hidden;
  position: relative;
  scroll-snap-align: start;
  text-align: left;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-position 260ms ease,
    background-size 260ms ease,
    filter 160ms ease;
  transform: translateZ(0);
  will-change: filter, background-position, background-size;
}

.top-card:hover,
.top-card:focus-visible,
.title-card:hover,
.title-card:focus-visible {
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.44);
  filter: brightness(1.08) contrast(1.04);
}

.top-card.no-video-preview:hover,
.top-card.no-video-preview:focus-visible,
.title-card.no-video-preview:hover,
.title-card.no-video-preview:focus-visible {
  animation: poster-preview 3.4s ease-in-out infinite alternate;
}

.video-preview {
  background: rgba(0, 0, 0, 0.78);
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transition: opacity 180ms ease;
  transform: translateZ(0);
  z-index: 0;
}

.video-preview iframe {
  border: 0;
  height: 120%;
  left: 50%;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) scale(1.08);
  width: 120%;
}

.is-previewing .video-preview {
  opacity: 1;
}

.top-card {
  align-items: end;
  aspect-ratio: 16 / 9;
  display: flex;
  padding: 18px;
}

.top-card::before,
.title-card::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%);
  content: "";
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transition: opacity 160ms ease;
}

.top-card:hover::before,
.top-card:focus-visible::before,
.title-card:hover::before,
.title-card:focus-visible::before {
  opacity: 1;
}

.rank {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(76px, 8vw, 132px);
  font-weight: 950;
  left: 12px;
  line-height: 0.78;
  position: absolute;
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.72);
  top: 16px;
}

.top-card-copy,
.card-copy {
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.12));
  display: grid;
  gap: 4px;
  position: relative;
  z-index: 1;
}

.top-card-copy strong,
.card-copy strong {
  font-size: 16px;
  font-weight: 950;
  line-height: 1.1;
}

.top-card-copy small,
.card-copy small {
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 850;
}

.category-row {
  padding-top: 18px;
}

.favorites-section {
  padding-bottom: 34px;
  padding-top: 26px;
}

.favorites-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.favorites-grid .title-card {
  scroll-snap-align: unset;
  width: 100%;
}

.favorites-grid .horizontal-card {
  aspect-ratio: 2 / 3;
}

.empty-state {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  gap: 6px;
  padding: 22px;
}

.empty-state strong {
  color: var(--text);
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.46);
  display: grid;
  font-size: 11px;
  gap: 7px;
  line-height: 1.6;
  margin: 8px clamp(18px, 5vw, 64px) 0;
  max-width: 920px;
  padding: 22px 0 44px;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.66);
  font-weight: 800;
  margin-left: 8px;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: white;
}

.title-card {
  aspect-ratio: 2 / 3;
  display: flex;
  align-items: end;
  padding: 12px;
}

.title-card.horizontal-card {
  aspect-ratio: 16 / 9;
}

.title-card.square-card {
  aspect-ratio: 1 / 1;
}

.poster-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  left: 10px;
  opacity: 0;
  position: absolute;
  right: 10px;
  top: 10px;
  transform: translateY(-4px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
  z-index: 2;
}

.title-card:hover .poster-actions,
.title-card:focus-visible .poster-actions {
  opacity: 1;
  transform: translateY(0);
}

.play-chip,
.add-series {
  align-items: center;
  backdrop-filter: blur(12px);
  background: rgba(10, 10, 14, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  display: inline-grid;
  font-size: 12px;
  font-weight: 950;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.play-chip {
  background: rgba(229, 9, 20, 0.92);
  box-shadow: 0 12px 26px rgba(229, 9, 20, 0.28);
}

.top-card > .play-chip {
  opacity: 0;
  position: absolute;
  right: 16px;
  top: 16px;
  transform: translateY(-4px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
  z-index: 2;
}

.top-card:hover > .play-chip,
.top-card:focus-visible > .play-chip {
  opacity: 1;
  transform: translateY(0);
}

.add-series {
  margin-left: auto;
}

.add-series:hover,
.add-series:focus-visible,
.add-series.is-added {
  background: rgba(255, 255, 255, 0.92);
  color: #08080b;
}

.content-pill {
  background: rgba(229, 9, 20, 0.88);
  border-radius: 999px;
  bottom: 58px;
  color: white;
  font-size: 11px;
  font-weight: 900;
  left: 12px;
  padding: 5px 8px;
  position: absolute;
  z-index: 1;
}

.player-shell {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.025)),
    rgba(17, 17, 22, 0.82);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.45fr);
  padding: clamp(14px, 2vw, 22px);
}

.player-modal {
  align-items: center;
  display: none;
  inset: 0;
  justify-content: center;
  padding: clamp(14px, 3vw, 34px);
  position: fixed;
  z-index: 60;
}

.player-modal.is-open {
  display: flex;
}

.modal-backdrop {
  background:
    radial-gradient(circle at 50% 0%, rgba(229, 9, 20, 0.18), transparent 42%),
    rgba(0, 0, 0, 0.78);
  inset: 0;
  position: absolute;
}

.modal-panel {
  background:
    linear-gradient(180deg, rgba(25, 25, 32, 0.96), rgba(8, 8, 12, 0.98)),
    #08080c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow: 0 36px 120px rgba(0, 0, 0, 0.68);
  max-height: min(92vh, 980px);
  max-width: 1180px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: clamp(12px, 1.5vw, 18px);
  position: relative;
  width: min(1180px, 96vw);
}

.close-button {
  background: rgba(0, 0, 0, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: white;
  display: grid;
  font-size: 28px;
  height: 42px;
  line-height: 1;
  place-items: center;
  position: absolute;
  right: 22px;
  top: 22px;
  width: 42px;
  z-index: 5;
}

.close-button:hover,
.close-button:focus-visible {
  background: rgba(255, 255, 255, 0.18);
}

.player-screen {
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  overflow: hidden;
  position: relative;
}

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

.player-idle {
  align-items: center;
  background:
    radial-gradient(circle at center, rgba(229, 9, 20, 0.22), transparent 34%),
    #050507;
  display: grid;
  inset: 0;
  justify-items: center;
  padding: 24px;
  position: absolute;
  text-align: center;
}

.player-idle.is-hidden {
  display: none;
}

.play-glyph {
  background: var(--accent);
  border-radius: 999px;
  display: grid;
  font-size: 26px;
  height: 74px;
  place-items: center;
  width: 74px;
}

.player-details {
  align-self: center;
}

.player-details h2 {
  font-size: clamp(24px, 3vw, 42px);
  margin-bottom: 10px;
}

#playerDescription {
  margin-bottom: 14px;
}

.player-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.share-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-size: 12px;
  font-weight: 950;
  gap: 7px;
  min-height: 36px;
  padding: 0 13px;
}

.share-button span {
  font-size: 16px;
  line-height: 1;
}

.share-button:hover,
.share-button:focus-visible {
  background: rgba(229, 9, 20, 0.92);
  border-color: rgba(229, 9, 20, 0.92);
}

.share-status {
  color: rgba(255, 255, 255, 0.56);
  font-size: 11px;
  font-weight: 800;
}

.crew-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.crew-group {
  display: grid;
  gap: 6px;
}

.crew-group span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crew-list {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  white-space: nowrap;
}

.crew-list::-webkit-scrollbar {
  display: none;
}

.crew-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  flex: 0 0 auto;
  padding: 8px 11px;
}

.crew-chip:hover,
.crew-chip:focus-visible {
  background: rgba(229, 9, 20, 0.92);
  border-color: rgba(229, 9, 20, 0.92);
}

.crew-empty {
  color: var(--muted);
  font-size: 13px;
}

.modal-lists {
  display: grid;
  gap: 22px;
  min-width: 0;
  padding: 22px 2px 4px;
}

.modal-lists section {
  min-width: 0;
}

.section-heading.compact {
  margin-bottom: 10px;
}

.section-heading.compact h2 {
  color: var(--muted-strong);
  font-size: 15px;
}

.episode-rail,
.related-rail {
  display: grid;
  gap: 10px;
  grid-auto-flow: column;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  scrollbar-width: none;
  width: 100%;
}

.episode-rail::-webkit-scrollbar,
.related-rail::-webkit-scrollbar {
  display: none;
}

.episode-rail {
  grid-auto-columns: clamp(230px, 30vw, 330px);
}

.related-rail {
  grid-auto-columns: minmax(150px, 17%);
}

.episode-card,
.related-card {
  background-color: var(--panel-strong);
  background-position: center;
  background-size: cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  min-width: 0;
  overflow: hidden;
  text-align: left;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
  transform: translateZ(0);
  will-change: filter, background-position, background-size;
}

.episode-card:hover,
.episode-card:focus-visible,
.related-card:hover,
.related-card:focus-visible {
  animation: poster-preview 2.8s ease-in-out infinite alternate;
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
  filter: brightness(1.08) contrast(1.04);
}

.episode-card {
  align-items: end;
  aspect-ratio: 16 / 8.5;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 14px;
}

.episode-number {
  color: rgba(255, 255, 255, 0.58);
  font-size: 42px;
  font-weight: 950;
  line-height: 0.85;
}

.episode-card strong,
.episode-card small,
.related-card strong,
.related-card small {
  display: block;
}

.episode-card strong,
.related-card strong {
  font-size: 14px;
  font-weight: 950;
  line-height: 1.15;
}

.episode-card small,
.related-card small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.3;
  margin-top: 4px;
}

.related-card {
  align-items: end;
  aspect-ratio: 2 / 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
}

.person-modal {
  align-items: center;
  display: none;
  inset: 0;
  justify-content: center;
  padding: clamp(14px, 3vw, 34px);
  position: fixed;
  z-index: 80;
}

.person-modal.is-open {
  display: flex;
}

.person-backdrop {
  background:
    radial-gradient(circle at 22% 10%, rgba(229, 9, 20, 0.2), transparent 34%),
    rgba(0, 0, 0, 0.72);
  inset: 0;
  position: absolute;
}

.person-panel {
  background:
    linear-gradient(180deg, rgba(26, 26, 33, 0.98), rgba(8, 8, 12, 0.99)),
    #09090d;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  box-shadow: 0 36px 120px rgba(0, 0, 0, 0.72);
  max-height: 90vh;
  max-width: 960px;
  overflow: auto;
  padding: clamp(18px, 2.5vw, 30px);
  position: relative;
  width: min(960px, 94vw);
}

.person-profile {
  align-items: center;
  display: grid;
  gap: 22px;
  grid-template-columns: auto minmax(0, 1fr);
  padding-right: 54px;
}

.person-profile img {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  height: clamp(104px, 14vw, 150px);
  object-fit: cover;
  width: clamp(104px, 14vw, 150px);
}

.person-profile h2 {
  font-size: clamp(30px, 4vw, 58px);
  line-height: 0.95;
  margin-bottom: 12px;
}

.person-profile p:last-child {
  color: var(--muted-strong);
  max-width: 680px;
}

.person-filmography {
  margin-top: 28px;
}

.person-filmography-rail {
  display: grid;
  gap: 12px;
  grid-auto-columns: minmax(160px, 18%);
  grid-auto-flow: column;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.person-filmography-rail::-webkit-scrollbar {
  display: none;
}

.person-filmography-rail .related-card {
  min-width: 0;
}

@keyframes poster-preview {
  0% {
    background-position: center center;
    background-size: 100%;
  }

  45% {
    background-position: 42% 48%;
    background-size: 112%;
  }

  100% {
    background-position: 58% 54%;
    background-size: 118%;
  }
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .nav {
    gap: 14px;
    overflow-x: auto;
    width: 100%;
  }

  .hero {
    min-height: 72vh;
    padding-top: 150px;
  }

  .top-five-rail {
    grid-auto-columns: minmax(270px, 82vw);
  }

  .title-rail {
    grid-auto-columns: minmax(152px, 44vw);
  }

  .player-shell {
    grid-template-columns: 1fr;
  }

  .modal-panel {
    max-height: 94vh;
    width: 96vw;
  }

  .episode-rail {
    grid-auto-columns: minmax(230px, 76vw);
  }

  .related-rail {
    grid-auto-columns: minmax(138px, 38vw);
  }

  .person-profile {
    align-items: start;
    grid-template-columns: 1fr;
    padding-right: 46px;
  }

  .person-filmography-rail {
    grid-auto-columns: minmax(146px, 42vw);
  }
}

@media (max-width: 520px) {
  .brand {
    font-size: 21px;
  }

  .hero {
    min-height: 68vh;
    padding-bottom: 38px;
  }

  .hero-actions .primary-button,
  .hero-actions .ghost-button {
    width: 100%;
  }

  .section-heading {
    align-items: flex-start;
    gap: 14px;
  }

  .title-rail {
    grid-auto-columns: minmax(140px, 58vw);
  }

  .player-modal {
    padding: 8px;
  }

  .modal-panel {
    border-radius: 8px;
    width: 100%;
  }

  .close-button {
    right: 16px;
    top: 16px;
  }
}

.player-screen video.is-hidden {
  display: none;
}

.player-screen iframe {
  border: 0;
  display: none;
  height: 100%;
  width: 100%;
}

.player-screen iframe.is-visible {
  display: block;
}

.admin-panel {
  align-items: center;
  display: none;
  inset: 0;
  justify-content: center;
  padding: clamp(12px, 3vw, 32px);
  position: fixed;
  z-index: 70;
}

.admin-panel.is-open {
  display: flex;
}

.admin-backdrop {
  background:
    radial-gradient(circle at 18% 0%, rgba(229, 9, 20, 0.2), transparent 32%),
    rgba(0, 0, 0, 0.8);
  inset: 0;
  position: absolute;
}

.admin-shell {
  background:
    linear-gradient(180deg, rgba(24, 24, 31, 0.98), rgba(9, 9, 13, 0.99)),
    #09090d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow: 0 36px 130px rgba(0, 0, 0, 0.72);
  max-height: 92vh;
  max-width: 1240px;
  overflow: auto;
  padding: clamp(16px, 2vw, 24px);
  position: relative;
  width: min(1240px, 96vw);
}

.admin-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.admin-header h2 {
  font-size: clamp(24px, 3vw, 42px);
}

.admin-layout {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(300px, 0.42fr) minmax(0, 0.58fr);
}

.admin-stats-panel {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.admin-stat-card {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 14px;
}

.admin-stat-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.admin-stat-card strong {
  font-size: 28px;
  font-weight: 950;
}

.admin-form,
.admin-list-panel,
.cost-note {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.admin-form {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.admin-form label {
  color: var(--muted-strong);
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 7px;
}

.field-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin: -2px 0 0;
}

.admin-form input,
.admin-form select,
.admin-form textarea,
.admin-toolbar input {
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  outline: none;
  padding: 11px 12px;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus,
.admin-toolbar input:focus {
  border-color: rgba(229, 9, 20, 0.72);
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.16);
}

.admin-form textarea {
  resize: vertical;
}

.admin-form-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-actions,
.admin-toolbar,
.row-actions {
  display: flex;
  gap: 10px;
}

.admin-actions {
  flex-wrap: wrap;
}

.ghost-button.danger,
.row-actions .danger {
  color: #ff8b92;
}

.admin-list-panel {
  min-width: 0;
  padding: 14px;
}

.admin-toolbar {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.admin-toolbar input {
  min-width: 180px;
  width: min(340px, 70%);
}

.admin-toolbar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-content-list {
  display: grid;
  gap: 10px;
  max-height: 590px;
  overflow: auto;
  padding-right: 4px;
}

.category-manager {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 16px;
  padding-top: 14px;
}

.category-settings-list {
  display: grid;
  gap: 8px;
}

.view-stats-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.view-stat-row {
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px;
}

.view-stat-row span {
  font-size: 13px;
  font-weight: 850;
}

.view-stat-row strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 950;
}

.category-setting-row {
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(150px, 1fr) 86px 140px;
  padding: 10px;
}

.category-setting-row label {
  color: var(--muted);
  display: grid;
  font-size: 11px;
  font-weight: 800;
  gap: 5px;
}

.category-setting-row input,
.category-setting-row select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  padding: 8px 9px;
}

.admin-content-row {
  align-items: center;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  padding: 9px;
}

.admin-content-row img {
  aspect-ratio: 4 / 5;
  border-radius: 6px;
  object-fit: cover;
  width: 58px;
}

.admin-content-row strong,
.admin-content-row small {
  display: block;
}

.admin-content-row strong {
  font-size: 14px;
}

.admin-content-row small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  margin-top: 4px;
}

.row-actions button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 10px;
}

.row-actions button:hover,
.row-actions button:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}

.cost-note {
  color: var(--muted);
  line-height: 1.55;
  margin-top: 16px;
  padding: 14px 16px;
}

.cost-note strong {
  color: var(--text);
}

@media (max-width: 820px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-stats-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .admin-shell {
    width: 100%;
  }

  .admin-form-grid,
  .admin-content-row,
  .category-setting-row {
    grid-template-columns: 1fr;
  }

  .admin-content-row img {
    aspect-ratio: 16 / 9;
    width: 100%;
  }

  .admin-toolbar,
  .admin-actions,
  .row-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-toolbar input {
    width: 100%;
  }

  .admin-stats-panel {
    grid-template-columns: 1fr;
  }
}

.favorites-grid .title-card,
.favorites-grid .title-card.horizontal-card,
.favorites-grid .title-card.square-card,
.favorites-grid .title-card.vertical-card {
  aspect-ratio: 2 / 3;
}
