/* ========== Netflix Sans Font ========== */
@font-face {
  font-family: 'Netflix Sans';
  src: url('Netflix Sans-fontiko/NetflixSans-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Netflix Sans';
  src: url('Netflix Sans-fontiko/NetflixSans-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Netflix Sans';
  src: url('Netflix Sans-fontiko/NetflixSans-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Netflix Sans';
  src: url('Netflix Sans-fontiko/NetflixSans-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ========== Reset & Base ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Vertical page scroll uses the viewport; hide thumb without disabling scroll */
html {
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
  background: transparent;
}

body {
  margin: 0;
  background: #141414;
  color: #fff;
  font-family: 'Netflix Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
  background: transparent;
}

video {
  background: #000;
}

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

button {
  border: none;
  cursor: pointer;
  background: none;
  font-family: inherit;
}

/* ========== Profile Picker ========== */
body.profile-picker-open {
  overflow: hidden;
}

.profile-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #141414;
  opacity: 1;
  transition: opacity 0.55s ease;
}

.profile-picker-overlay.exiting {
  opacity: 0;
  pointer-events: none;
}

.profile-picker-shell {
  width: min(1000px, calc(100vw - 96px));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateY(-14px);
}

.profile-picker-title,
.profile-picker-card,
.profile-picker-manage {
  opacity: 0;
  animation: profilePickerFadeIn 0.45s ease forwards;
}

.profile-picker-title {
  color: #fff;
  font-size: 3.5vw;
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 56px;
}
span.pfpselectorgradienttopbar {
  color: #757575;
  font-size: 25px;
  font-weight: 300;
  position: absolute;
  height: 68px;
  transition: color 0.2s ease;
  background: linear-gradient(180deg,rgba(0,0,0,.7) 10%,transparent);
  top: 0px;
  width: -webkit-fill-available;
}
.profile-picker-grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 34px;
  margin-bottom: 98px;
}

.profile-picker-card {
  width: 192px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.profile-picker-card:focus-visible {
  outline: none;
}

.profile-picker-avatar {
  width: 192px;
  height: 192px;
  border-radius: 6px;
  overflow: hidden;
  border: 3px solid transparent;
  background: #1b1b1b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease;
}

.profile-picker-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.profile-picker-name {
  color: #757575;
  font-size: 25px;
  font-weight: 300;
  line-height: 1.2;
  transition: color 0.2s ease;
}

.profile-picker-card:hover .profile-picker-avatar,
.profile-picker-card:focus-visible .profile-picker-avatar {
  border-color: #fff;
}

.profile-picker-card:hover .profile-picker-name,
.profile-picker-card:focus-visible .profile-picker-name {
  color: #fff;
}

.profile-picker-card-add {
  cursor: default;
}

.profile-picker-card-add .profile-picker-avatar {
  border-color: transparent;
  background: transparent;
}

.profile-picker-card-add:hover .profile-picker-avatar,
.profile-picker-card-add:focus-visible .profile-picker-avatar {
  border-color: transparent;
}

.profile-picker-card-add:hover .profile-picker-name,
.profile-picker-card-add:focus-visible .profile-picker-name {
  color: #757575;
}

.profile-picker-add-icon {
  width: 110px;
  height: 107px;
}

.profile-picker-manage {
  width: 269px;
  height: 50px;
  border: 1px solid #757575;
  color: #757575;
  font-size: 23px;
  font-weight: 300;
  letter-spacing: 0.08em;
  line-height: 1;
  background: transparent;
}

@keyframes profilePickerFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .profile-picker-shell {
    width: calc(100vw - 36px);
    transform: none;
  }

  .profile-picker-title {
    font-size: clamp(42px, 11vw, 65px);
    margin-bottom: 36px;
  }

  .profile-picker-grid {
    gap: 14px;
    margin-bottom: 58px;
  }

  .profile-picker-card,
  .profile-picker-avatar {
    width: 108px;
  }

  .profile-picker-avatar {
    height: 108px;
    border-width: 2px;
    border-radius: 4px;
  }

  .profile-picker-name {
    font-size: 17px;
  }

  .profile-picker-add-icon {
    width: 72px;
    height: 70px;
  }

  .profile-picker-manage {
    width: 220px;
    height: 44px;
    font-size: 20px;
  }
}

/* ========== Navbar ========== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 56px;
  height: 68px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 10%, transparent);
  transition: background 0.3s;
}

/* Smooth fade-in for main shell */
.navbar,
.hero-content,
.hero-bottom-right {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

body.page-loaded .navbar,
body.page-loaded .hero-content,
body.page-loaded .hero-bottom-right {
  opacity: 1;
  transform: none;
}

.navbar.scrolled {
  background: #141414;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  font-size: 1.6rem;
  font-weight: 900;
  color: #e50914;
  letter-spacing: 2px;
  margin-right: 16px;
  opacity: 0.75;
}

.nav-link {
  font-size: 0.85rem;
  font-weight: 400;
  color: #e5e5e5;
  transition: color 0.2s;
}

.nav-logo-desktop {
  display: block;
  height: auto;
}
.nav-logo-mobile {
  display: none;
}

.nav-link:hover {
  color: #b3b3b3;
}

.nav-link.active {
  font-weight: 600;
  color: #fff;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-search {
  display: flex;
  align-items: center;
  position: relative;
}

.nav-search-input {
  width: 0;
  opacity: 0;
  margin-left: 0;
  padding: 0;
  height: 32px;
  border: none;
  outline: none;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 0.85rem;
  transition: width 0.25s ease, opacity 0.25s ease, margin-left 0.25s ease, padding 0.25s ease;
}

.nav-search.open .nav-search-input {
  width: 220px;
  opacity: 1;
  margin-left: 8px;
  padding: 0 10px;
}

.nav-search-input::placeholder {
  color: #b3b3b3;
}

/* ========== Search Mode Layout ========== */
.search-results {
  position: fixed;
  top: 68px;
  /* below navbar */
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 32px 56px 60px;
  background: #141414;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.search-results.loading {
  opacity: 0 !important;
}

body.search-mode .search-results.loading,
html.share-search-boot .search-results.loading {
  opacity: 1 !important;
  pointer-events: auto;
}

.search-results-boot-status {
  font-size: 0.95rem;
  color: #808080;
}

/* Smoothly fade out home view when in search mode, without layout jump */
.maincontainer,
.content-area {
  transition: opacity 0.35s ease;
}

body.search-mode .maincontainer,
body.search-mode .content-area {
  opacity: 0;
  pointer-events: none;
}

body.search-mode .search-results {
  opacity: 1;
  pointer-events: auto;
}

.search-results-title {
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: 16px;
  color: #e5e5e5;
}

.search-results-empty {
  font-size: 0.95rem;
  color: #808080;
}

.search-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(296px, 1fr));
  gap: 40px 10px;
  width: 100%;
  padding-bottom: 60px;
}

/* Staggered fade-in for search cards */
.search-results-grid .search-card {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--search-index, 0) * 45ms);
}

.search-results-grid.ready .search-card {
  opacity: 1;
  transform: translateY(0);
}

/* Allow cards to fill grid cells */
.search-results-grid .content-card {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #fff;
}

.nav-icon svg {
  width: 22px;
  height: 22px;
}

.profile-icon {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.profile-icon img {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
}

.profile-caret {
  font-size: 0.6rem;
  color: #fff;
  margin-top: 2px;
}

/* Profile dropdown (desktop) */
.profile-dropdown-wrap {
  position: relative;
}

.profile-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  min-width: 260px;
  background: rgba(20, 20, 20, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.profile-dropdown-wrap.open .profile-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-dropdown-item {
  padding: 12px 16px;
  color: #fff;
  font-size: 0.95rem;
  cursor: default;
}

.profile-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #555;
  border-radius: 24px;
  transition: 0.3s;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
  background: #e50914;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* ========== Source Selector (pill group) ========== */
.profile-source-selector {
  padding: 12px 16px;
}

.source-selector-label {
  font-size: 0.75rem;
  color: #b3b3b3;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.source-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.source-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: #ccc;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
  white-space: nowrap;
}

.source-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
  transform: translateY(-1px);
}

.source-pill-active {
  background: rgba(229, 9, 20, 0.2) !important;
  border-color: #e50914 !important;
  color: #fff !important;
}

.source-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 999px;
  text-transform: uppercase;
}

/* Sports LIVE badge — shown on cards in the Sports > Live row */
.sports-live-badge {
  /* temporary styling change */
  display: none !important;
  /* end temporary styling change */
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(229, 9, 20, 0.7);
  border-radius: 4px;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 7px;
  text-transform: uppercase;
  z-index: 4;
  pointer-events: none;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e50914;
  flex-shrink: 0;
  animation: live-pulse 1.4s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.75); }
}

/* ── Dynamic Sports Channel Cards ──────────────────────────────────────────── */
/* These cards have no TMDB poster; they use a greyscale gradient + channel
   logo image + prominent channel name text. */

.sports-channel-card {
  position: relative;
  flex: 0 0 auto;
  /* Same width ratio as regular cards but slightly narrower feels good for
     channel logos which are typically wider-than-tall brand marks */
  width: 200px;
  height: 112px; /* 16:9 */
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  /* Reset any inherited card backgrounds */
  background: transparent;
}

@media (max-width: 768px) {
  .sports-channel-card {
    width: 148px;
    height: 83px;
  }
}

.sports-channel-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 28px rgba(0,0,0,0.55);
  z-index: 2;
}

/* Grayscale gradient background */
.sports-ch-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1c1c1e 0%, #2c2c2e 40%, #1a1a1c 100%);
  z-index: 0;
}

/* Subtle inner texture — thin horizontal lines like a broadcast overlay */
.sports-ch-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #171717;
  pointer-events: none;
}

/* Channel logo image — centred, moderate size, slightly desaturated */
.sports-ch-logo {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 43%;
  height: 60%;
  object-fit: contain;
  z-index: 1;
  filter: grayscale(30%) drop-shadow(0 2px 6px rgba(0,0,0,0.7));
  transition: filter 0.2s ease;
}

.sports-channel-card:hover .sports-ch-logo {
  filter: grayscale(0%) drop-shadow(0 2px 8px rgba(0,0,0,0.8));
}

/* Channel name — always visible at bottom */
.sports-ch-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 8px 7px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  letter-spacing: 0.03em;
  line-height: 1.25;
  text-shadow: 0 1px 4px rgba(0,0,0,0.9);
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}

.sports-channel-card:not(.sports-channel-card--no-logo) .sports-ch-name {
  display: none;
}

/* Viewer count */
.sports-ch-viewers {
  position: absolute;
  bottom: 28px;
  right: 7px;
  display: flex;
  align-items: center;
  gap: 3px;
  color: rgba(255,255,255,0.55);
  font-size: 0.6rem;
  font-weight: 600;
  z-index: 3;
  pointer-events: none;
}

.sports-channel-card:not(.sports-channel-card--no-logo) .sports-ch-viewers {
  display: none;
}

/* Offline state — dimmed + badge */
.sports-ch-offline {
  opacity: 0.5;
  cursor: default;
}

.sports-ch-offline:hover {
  transform: none;
  box-shadow: none;
}

.sports-ch-offline .sports-ch-logo {
  filter: grayscale(100%) brightness(0.7);
}

/* Offline badge */
.sports-offline-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  color: rgba(255,255,255,0.5);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 6px;
  text-transform: uppercase;
  z-index: 4;
  pointer-events: none;
}

/* Sports match cards (CDN Live TV /events/sports/) */
.sports-event-card {
  position: relative;
  flex: 0 0 auto;
  width: 240px;
  height: 126px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  background: transparent;
}

@media (max-width: 768px) {
  .sports-event-card {
    width: 168px;
    height: 118px;
  }
}

.sports-event-card:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
  z-index: 2;
}

.sports-event-card .sports-ev-logos {
  position: absolute;
  top: 6px;
  width: 77%;
  left: 8px;
  margin: auto;
  right: 8px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1;
  pointer-events: none;
  height: 100%;
  flex-wrap: wrap;
  align-content: center;
  flex-direction: row;
}

.sports-event-card .sports-ev-logos-single {
  justify-content: center;
  width: 64%;
}

.sports-event-card .sports-ev-team-img {
  max-width: 92%;
  max-height: 47px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.sports-event-card .sports-ev-vs {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  z-index: 2;
  pointer-events: none;
}

.sports-event-card .sports-ev-team {
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.sports-event-card .sports-ev-title-only {
  top: 62px;
}

.sports-event-card .sports-ev-x {
  font-size: 1.55rem;
  font-weight: 400;
  margin: 0px 8px;
  color: rgb(255 255 255);
  letter-spacing: 0.06em;
}

.sports-event-card .sports-ev-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 18px 6px 6px;
  font-size: 0.58rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  line-height: 1.2;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}

.sports-event-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(229, 160, 13, 0.35);
  border: 1px solid rgba(229, 160, 13, 0.55);
  border-radius: 4px;
  color: #f5d07a;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 6px;
  z-index: 4;
  pointer-events: none;
}

/* Upcoming match: dim team marks; logo row captures clicks (see script.js). */
.sports-event-upcoming .sports-ev-logos {
  pointer-events: auto;
  cursor: default;
  opacity: 0.3;
}

.source-badge-fast {
  background: rgba(39, 174, 96, 0.3);
  color: #2ecc71;
  border: 1px solid rgba(39, 174, 96, 0.5);
}

.source-badge-medium {
  background: rgba(230, 126, 34, 0.25);
  color: #e67e22;
  border: 1px solid rgba(230, 126, 34, 0.45);
}

.source-badge-hq {
  background: rgba(155, 89, 182, 0.3);
  color: #bb86fc;
  border: 1px solid rgba(155, 89, 182, 0.5);
}

/* Mobile source selector */
.mobile-source-selector {
  display: block;
  padding-bottom: 16px;
}

.source-pills-mobile {
  gap: 8px;
}

.source-pills-mobile .source-pill {
  font-size: 0.85rem;
  padding: 7px 14px;
}


.maincontainer {
  position: relative;
}

div#featuredContainer {
  position: relative;
  background: #000;
  width: 100%;
  height: 94vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 12vh;
  overflow: hidden;
  cursor: pointer;
}

/* Shared sizing for poster and video — identical rules = identical framing */
.hero-poster,
.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: none;
  z-index: 0;
  aspect-ratio: 16 / 9;
}

/* Cinematic hero variants — cover both still + video identically for seamless crossfade. */
#featuredContainer.featured-f1 .hero-poster,
#featuredContainer.featured-f1 .hero-video,
#featuredContainer.featured-superman-2025 .hero-poster,
#featuredContainer.featured-superman-2025 .hero-video,
#featuredContainer.featured-primate-2026 .hero-poster,
#featuredContainer.featured-primate-2026 .hero-video,
#featuredContainer.featured-marty-supreme-2025 .hero-poster,
#featuredContainer.featured-marty-supreme-2025 .hero-video,
#featuredContainer.featured-anaconda-2025 .hero-poster,
#featuredContainer.featured-anaconda-2025 .hero-video,
#featuredContainer.featured-up-2009 .hero-poster,
#featuredContainer.featured-up-2009 .hero-video,
#featuredContainer.featured-jw-rebirth-2025 .hero-poster,
#featuredContainer.featured-jw-rebirth-2025 .hero-video,
#featuredContainer.featured-dune-part-two-2024 .hero-poster,
#featuredContainer.featured-dune-part-two-2024 .hero-video,
#featuredContainer.featured-send-help-2026 .hero-poster,
#featuredContainer.featured-send-help-2026 .hero-video,
#featuredContainer.featured-good-fortune-2025 .hero-poster,
#featuredContainer.featured-good-fortune-2025 .hero-video,
#featuredContainer.featured-martian-2015 .hero-poster,
#featuredContainer.featured-martian-2015 .hero-video,
#featuredContainer.featured-carry-on-2024 .hero-poster,
#featuredContainer.featured-carry-on-2024 .hero-video,
#featuredContainer.featured-lift-2024 .hero-poster,
#featuredContainer.featured-lift-2024 .hero-video,
#featuredContainer.featured-top-gun-maverick-2022 .hero-poster,
#featuredContainer.featured-top-gun-maverick-2022 .hero-video,
#featuredContainer.featured-inside-out-2-2024 .hero-poster,
#featuredContainer.featured-inside-out-2-2024 .hero-video,
#featuredContainer.featured-the-batman-2022 .hero-poster,
#featuredContainer.featured-the-batman-2022 .hero-video,
#featuredContainer.featured-minions-rise-of-gru-2022 .hero-poster,
#featuredContainer.featured-minions-rise-of-gru-2022 .hero-video,
#featuredContainer.featured-despicable-me-4-2024 .hero-poster,
#featuredContainer.featured-despicable-me-4-2024 .hero-video,
#featuredContainer.featured-kung-fu-panda-4-2024 .hero-poster,
#featuredContainer.featured-kung-fu-panda-4-2024 .hero-video,
#featuredContainer.featured-joker-2019 .hero-poster,
#featuredContainer.featured-joker-2019 .hero-video,
#featuredContainer.featured-empire-strikes-back-1980 .hero-poster,
#featuredContainer.featured-empire-strikes-back-1980 .hero-video,
#featuredContainer.featured-bad-boys-for-life-2020 .hero-poster,
#featuredContainer.featured-bad-boys-for-life-2020 .hero-video,
#featuredContainer.featured-jumanji-next-level-2019 .hero-poster,
#featuredContainer.featured-jumanji-next-level-2019 .hero-video,
#featuredContainer.featured-live-nba-tv .hero-poster,
#featuredContainer.featured-live-nba-tv .hero-video {
  object-fit: cover;
  object-position: center center;
}

/* Slightly zoom IN the F1 trailer only */
.hero-video.video-f1 {
  transform: scale(1);
  transform-origin: center center;
}

/* Video starts invisible, fades in over poster */
.hero-video {
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.hero-video.playing {
  opacity: 1;
}

/* Gradient overlay â€” on top of both poster and video */
.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(360deg, #141414 0%, rgba(20, 20, 20, 0.85) 15%, transparent 40%);
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-left: 56px;
  max-width: 600px;
}

.hero-title {
  font-size: 4.5rem;
  font-weight: 800;
  letter-spacing: 0.35em;
  text-shadow: 2px 4px 12px rgba(0, 0, 0, 0.6);
  margin-bottom: 24px;
  line-height: 1;
}

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

.btn-play {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 28px 8px 20px;
  background: #fff;
  color: #000;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 4px;
  transition: background 0.2s;
}

.btn-play:hover {
  background: rgba(255, 255, 255, 0.75);
}

.btn-play svg {
  width: 28px;
  height: 28px;
}

.btn-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 28px 8px 20px;
  background: rgba(109, 109, 110, 0.7);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 4px;
  transition: background 0.2s;
}

.btn-info:hover {
  background: rgba(109, 109, 110, 0.4);
}

.btn-info svg {
  width: 24px;
  height: 24px;
}

/* Hero bottom-right controls */
.hero-bottom-right {
  position: absolute;
  right: 56px;
  bottom: 12vh;
  display: flex;
  align-items: center;
  gap: 0;
  z-index: 2;
}

.btn-mute {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  color: #fff;
  transition: border-color 0.2s;
}

.btn-mute:hover {
  border-color: #fff;
}

.btn-mute svg {
  width: 20px;
  height: 20px;
}

.maturity-rating {
  display: flex;
  align-items: center;
  padding: 4px 14px 4px 12px;
  margin-left: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
  background: rgba(51, 51, 51, 0.6);
  border-left: 3px solid rgba(255, 255, 255, 0.4);
  letter-spacing: 0.04em;
}

/* ========== Content Area / Rows ========== */
.content-area {
  position: relative;
  z-index: 3;
  margin-top: -80px;
  padding-bottom: 60px;
}

.content-row {
  padding: 0 56px;
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  min-height: 250px;
}

.content-row.row-loaded {
  opacity: 1;
  transform: none;
}

.row-title {
  font-size: 1.3rem;
  font-weight: 300;
  margin-bottom: 12px;
  color: #e5e5e5;
}

.row-header-flex {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 5px;
}

.row-header-flex .row-title {
  margin-bottom: 0;
}

.row-wrapper {
  position: relative;
}

.row-posters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 0;
}

.row-posters::-webkit-scrollbar {
  display: none;
  width: 0 !important;
  height: 0 !important;
  background: transparent;
}

.poster {
  flex: 0 0 auto;
  width: 296px;
  height: 167px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}

.poster:hover {
  z-index: 2;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.poster:hover img {
  transform: scale(1.08);
}

/* ========== Content Cards (Logo + Backdrop) ========== */
.content-card {
  position: relative;
  flex: 0 0 auto;
  width: 296px;
  height: 167px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  background: #2a2a2a;
  transition: box-shadow 0.2s ease;
}

.content-card:hover {
  z-index: 2;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.content-card .backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.content-card:hover .backdrop {
  transform: scale(1.08);
}

.content-card .gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 40%, transparent 70%);
  pointer-events: none;
}

.content-card .logo {
  position: absolute;
  max-width: 50%;
  max-height: 40%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

/* Logo position variants */
.content-card.logo-bottom-left .logo {
  bottom: 8px;
  left: 8px;
}

.content-card.logo-bottom-right .logo {
  bottom: 8px;
  right: 8px;
}

.content-card.logo-bottom-center .logo {
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
}



.content-card .content-info {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
}

.content-card .content-info.hidden {
  display: none;
}

.content-card .content-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.content-card .content-meta {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 2px;
}

.content-card.loading-images .backdrop {
  opacity: 0.5;
}

.content-card.loading-images .logo {
  display: none;
}

.continue-progress-track {
  display: none;
}

.continue-mobile-footer,
.continue-mobile-play {
  display: none;
}

@media (min-width: 769px) {
  #row-continue-watching .continue-card-shell {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
  }

  #row-continue-watching .continue-progress-track {
    display: block;
    height: 3px;
    margin: 8px 24px 0;
    background: rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    overflow: hidden;
    pointer-events: none;
  }

  #row-continue-watching .continue-progress-fill {
    height: 100%;
    background: #e50914;
    border-radius: inherit;
  }
}

/* Row scroll arrows */
.row-arrow {
  display: none;
  position: absolute;
  top: 0;
  bottom: 0;
  width: 56px;
  z-index: 5;
  font-size: 2.8rem;
  color: #fff;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}

.row-arrow-left {
  left: -56px;
  background: linear-gradient(90deg, rgba(20, 20, 20, 0.8), transparent);
}

.row-arrow-right {
  right: -56px;
  background: linear-gradient(270deg, rgba(20, 20, 20, 0.8), transparent);
}

.row-wrapper:hover .row-arrow {
  display: flex;
  opacity: 1;
}

.hero-logo img {
  width: unset;
  margin: 3vw 0vw;
}

#featuredContainer.featured-live-nba-tv .hero-logo img {
  width: unset !important;
  margin-bottom: 20px;
}

/* Dune: Part Two — wordmark is very wide + low; size up when this hero is active. */
#featuredContainer.featured-dune-part-two-2024 .hero-logo img {
  width: min(440px, 34vw);
  height: auto;
  margin: 2.5vw 0 1.25vw;
}

/* ========== Content Detail Modal ========== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 2vh;
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

/* Backdrop: constant rgba(0,0,0,0.7), never transitions */
.modal-overlay::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: -1;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.content-modal {
  width: 948px;
  max-width: 95vw;
  background: #181818;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  --modal-enter-x: 0px;
  --modal-enter-y: 20px;
  --modal-enter-scale: 0.98;
  --modal-origin-x: 50%;
  --modal-origin-y: 50%;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition: opacity 0.38s ease, transform 0.56s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: var(--modal-origin-x) var(--modal-origin-y);
  will-change: transform, opacity;
  margin-bottom: 2vh;
  /* Isolate modal content so card hovers don't cause overlay opacity flash */
  isolation: isolate;
  /* Contain paint so transition doesn't affect backdrop */
  contain: layout paint;
}

.modal-overlay.modal-animating-from-card .content-modal {
  opacity: 0.96;
  transform: translate3d(var(--modal-enter-x), var(--modal-enter-y), 0) scale(var(--modal-enter-scale));
}

.modal-overlay.active.modal-ready .content-modal {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-overlay.active.modal-ready.modal-animating-from-card .content-modal {
  transform: translate3d(0, 0, 0) scale(1);
}

.modal-overlay.modal-shared-transitioning .content-modal,
.modal-overlay.modal-shared-closing .content-modal {
  opacity: 0 !important;
  transform: translateY(0) scale(1) !important;
}

.modal-overlay.modal-shared-closing .content-modal {
  transition: opacity 0.12s ease !important;
}

.modal-overlay.modal-no-exit-anim {
  transition: opacity 0.18s ease, visibility 0s linear 0.18s !important;
}

.modal-overlay.modal-no-exit-anim::before {
  transition: opacity 0.18s ease !important;
}

.modal-overlay.modal-no-exit-anim .content-modal {
  opacity: 0 !important;
  transform: translateY(0) scale(1) !important;
  transition: none !important;
}

.modal-overlay.modal-no-exit-anim .modal-backdrop {
  opacity: 0 !important;
  transition: opacity 0.14s ease !important;
}

.modal-shared-source-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
}

.modal-shared-ghost {
  position: fixed;
  z-index: 1002;
  pointer-events: none;
  overflow: hidden;
  top: 0;
  left: 0;
  background: #111;
  transform-origin: top left;
  will-change: transform, opacity, border-radius;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  opacity: 1;
  backface-visibility: hidden;
}

.modal-shared-ghost.is-closing {
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.42);
}

.modal-shared-ghost-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px) saturate(1.08);
  transform: scale(1.02);
}

.modal-shared-ghost-logo {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 10%;
  max-width: 84%;
  max-height: 32%;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.65));
}

.modal-header-buttons {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

.modal-btn-chromecast,
.modal-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.modal-btn-chromecast:hover,
.modal-close:hover {
  opacity: 0.85;
}

.modal-btn-chromecast svg,
.modal-close svg {
  display: block;
}

/* Modal Hero */
.modal-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.modal-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.22s ease;
}

.modal-hero-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, #181818 0%, transparent 100%);
}

.modal-hero-content {
  position: absolute;
  bottom: 24px;
  left: 40px;
  right: 40px;
}

.modal-logo {
  max-width: 300px;
  max-height: 120px;
  margin-bottom: 25px;
  display: block;
}

.modal-title-text {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: none;
}

.modal-logo[src=""]+.modal-title-text,
.modal-logo:not([src])+.modal-title-text {
  display: block;
}

.modal-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.modal-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.1s ease;
}

.modal-btn-play {
  background: #fff;
  color: #000;
}

.modal-btn-play:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: scale(1.02);
}

.modal-btn-play svg {
}

.modal-btn-icon {
  width: 53px;
  height: 53px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: rgba(42, 42, 42, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.modal-btn-icon:hover {
  border-color: #fff;
  background: rgba(42, 42, 42, 0.9);
}

.modal-btn-icon svg {
  width: 24px;
  height: 24px;
}

/* Mobile-only hero content (hidden on desktop) */
.modal-hero-content-mobile {
  display: none;
}

/* Modal Info */
.modal-info {
  display: flex;
  gap: 32px;
  padding: 24px 40px;
  padding-top: 5px;
}

.modal-info-main {
  flex: 2;
}

.modal-info-side {
  flex: 1;
}

.modal-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.modal-match {
  color: #46d369;
  font-weight: 700;
}

.modal-year {
  color: #fff;
}

.modal-rating-badge {
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 1px 6px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
}

.modal-duration {
  color: #fff;
}

.modal-quality {
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 1px 6px;
  font-size: 0.7rem;
  border-radius: 3px;
  color: rgba(255, 255, 255, 0.8);
}

.modal-description-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-description-short {
  color: #fff;
  line-height: 1.5;
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.modal-description-full {
  color: #fff;
  line-height: 1.5;
  font-size: 0.95rem;
  display: none;
}

.modal-description-read-more {
  background: none;
  border: none;
  color: #fff;
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  display: none;
  width: fit-content;
}

.modal-description-read-more:hover {
  color: #fff;
}

.modal-description-wrapper.desc-expanded .modal-description-short {
  display: none;
}

.modal-description-wrapper.desc-expanded .modal-description-full {
  display: '';
}

.modal-description-wrapper.desc-expanded .modal-description-read-more {
  display: '';
}

.modal-cast,
.modal-genres {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 8px;
}

.modal-label {
  color: rgba(255, 255, 255, 0.5);
}

/* Modal Bottom Section */
.modal-bottom {
  padding: 24px 3vw;
  padding-top: 5px !important;
}

.modal-similar-loading-surface {
  min-height: 220px;
  background: #121212;
  border-radius: 8px;
  padding: 14px;
}

.modal-similar-loading-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.modal-similar-loading-card {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: linear-gradient(90deg, #1f1f1f 0%, #2a2a2a 45%, #1f1f1f 100%);
  background-size: 200% 100%;
  animation: modalSkeletonPulse 1.1s linear infinite;
}

@keyframes modalSkeletonPulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.modal-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-section-title {
  font-size: 1.4rem;
  font-weight: 300;
  color: #fff;
  margin-top: 10px;
}

.modal-season-select select {
  background: #242424;
  color: #fff;
  border: 1px solid #ffffff0d;
  padding: 8px 32px 8px 16px;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.modal-season-select select:hover {
  border-color: rgba(255, 255, 255, 0.5);
}

/* More Like This Grid */
.modal-similar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Reuse content-card in modal but make it fluid */
.modal-similar-grid .content-card {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

/* Desktop: disable hover effects on modal cards to prevent overlay opacity flash */
@media (min-width: 769px) {
  .modal-bottom-mobile-svg {
    display: none !important;
  }
  .modal-similar-grid .content-card:hover {
    z-index: 1;
    box-shadow: none;
  }
  .modal-similar-grid .content-card:hover .backdrop {
    transform: none;
  }
}

/* Episode List */
.modal-episodes {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.modal-episode-card {
  display: grid;
  grid-template-columns: 56px 160px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s ease;
}

.modal-episode-card:first-child {
  border-top: none;
}

.modal-episode-card:hover {
  background: rgba(255, 255, 255, 0.11);
}

.modal-episode-number {
  font-size: 1.65rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
}

.modal-episode-thumb {
  width: 160px;
  flex-shrink: 0;
  position: relative;
}

.modal-episode-thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
}

.modal-episode-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-episode-card:hover .modal-episode-play {
  opacity: 1;
}

.modal-episode-play svg {
  width: 16px;
  height: 16px;
  fill: #fff;
  margin-left: 2px;
}

.modal-episode-content {
  min-width: 0;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding-right: 1.2vw !important; 
}

.modal-episode-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.modal-episode-title {
  font-size: 1rem;
  font-weight: 300;
  color: #fff;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-episode-runtime {
  display: block;
  color: rgba(255, 255, 255, 0.5);
  font-size: 17px;
  white-space: nowrap;
  margin-top: 0;
  margin-left: 8px;
}

.modal-episode-runtime:empty {
  display: none;
}

.modal-episode-desc {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 769px) {
  .modal-episodes {
    gap: 0;
    background: transparent;
    border-radius: 0;
    overflow: visible;
  }

  .modal-episode-card {
    background: transparent;
    border-radius: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }

  .modal-episode-card:first-child {
    border-top: none;
  }

  .modal-episode-card:hover {
    background: rgba(255, 255, 255, 0.11);
  }
}

/* ========== Fullscreen Video Player ========== */
.video-player-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.video-player-overlay.active {
  opacity: 1;
  visibility: visible;
}

.video-player-shell {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 0;
  overflow: hidden;
}

.video-player {
  width: 100%;
  height: 100%;
  background: #000;
}

#videoPlayer {
  background: #000;
}

/* Brand intro: a second <video> stacked on top of #videoPlayer at the
   same DOMRect, so the intro looks like part of the playback rather than
   a separate overlay. Player chrome (z=5) sits above the intro just like
   it does over content, so hovering during the intro reveals the same
   controls naturally. */
.brand-intro-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  z-index: 2;
  pointer-events: none;
  display: none;
  opacity: 0;
  transition: opacity 220ms ease;
}

.video-player-overlay.intro-playing .brand-intro-video {
  display: block;
  opacity: 1;
}

/* During intro: suppress the loading spinner — the intro IS the load
   indicator — and hide content-only chrome (skip-intro pill, transient
   message). Standard chrome (back / title / volume / fullscreen) stays
   so the user can still escape the player. */
.video-player-overlay.intro-playing .video-player-message,
.video-player-overlay.intro-playing #skipSegmentBtn {
  display: none !important;
}

.video-player-overlay.intro-playing.loading::before,
.video-player-overlay.intro-playing.loading::after {
  display: none !important;
  opacity: 0 !important;
}

/* Pseudo-fullscreen (mobile browser fallback when native API unavailable) */
.video-player-overlay.player-pseudo-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100dvh !important;
  z-index: 2147483646 !important;
  margin: 0 !important;
  background: #000 !important;
}

html.player-fs-lock,
html.player-fs-lock body {
  overflow: hidden !important;
  width: 100% !important;
  height: 100% !important;
}

html.player-fs-lock body {
  position: fixed;
  inset: 0;
}

/* Hide legacy close */
.video-player-close {
  display: none !important;
}

/* Desktop controls hidden by default (shown via desktop media query) */
.d-player-controls {
  display: none;
}

/* ========== Desktop Video Player ========== */
@media (min-width: 769px) and (min-height: 601px) {
  /* Hide mobile controls on desktop */
  .m-player-controls {
    display: none !important;
  }

  .video-player-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .video-player-shell {
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    position: relative;
  }

  .video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    pointer-events: none;
  }

  .d-player-controls {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: auto;
    opacity: 1;
    transition: opacity 0.3s ease;
  }

  .d-player-controls.hidden {
    opacity: 0;
    pointer-events: auto;
    cursor: none;
  }

  .d-player-controls::before,
  .d-player-controls::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    pointer-events: none;
    z-index: -1;
    transition: opacity 0.3s ease;
  }

  .d-player-controls::before {
    top: 0;
    height: 160px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%);
  }

  .d-player-controls::after {
    bottom: 0;
    height: 200px;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
  }

  .d-player-controls.hidden::before,
  .d-player-controls.hidden::after {
    opacity: 0;
  }

  /* Top bar */
  .d-player-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 28px 0;
  }

  .d-player-back-btn,
  .d-player-flag-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 8px;
    opacity: 0.9;
    transition: opacity 0.2s;
  }

  .d-player-back-btn:hover,
  .d-player-flag-btn:hover {
    opacity: 1;
  }

  .d-player-back-btn svg {
    width: 35px;
    height: 30px;
  }

  .d-player-flag-btn svg {
    width: 44px;
    height: 44px;
  }

  /* Bottom section */
  .d-player-bottom {
    padding: 0 28px 20px;
  }

  /* Progress row */
  .d-player-progress-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
  }

  .d-player-progress {
    position: relative;
    flex: 1;
    height: 5px;
    background: rgba(128,128,128,0.7);
    border-radius: 0;
    cursor: pointer;
  }

  .d-progress-buffered {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #C6C6C6;
    width: 0%;
    pointer-events: none;
  }

  .d-progress-played {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #E50914;
    width: 0%;
    pointer-events: none;
    z-index: 1;
  }

  .d-progress-handle {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #E50914;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 2;
    box-shadow: 0 0 4px rgba(0,0,0,0.5);
  }

  .d-player-progress:hover {
    height: 7px;
  }

  .d-player-progress:hover .d-progress-handle {
    width: 18px;
    height: 18px;
  }

  .d-player-progress.scrubbing .d-progress-handle {
    width: 18px;
    height: 18px;
  }

  .d-player-time {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    min-width: 60px;
    text-align: right;
  }

  /* Controls row */
  .d-player-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .d-player-left,
  .d-player-right {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .d-player-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
  }

  .d-player-title {
    color: #fff;
    font-size: 16px;
    font-weight: 300;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.02em;
  }

  .d-player-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 6px;
    opacity: 0.9;
    transition: opacity 0.2s, transform 0.15s;
  }

  .d-player-btn:hover {
    opacity: 1;
    transform: scale(1.1);
  }

  /* Icon sizing */
  #dPlayerPlayPause svg {
    width: 30px;
  }

  #dPlayerBack10 svg,
  #dPlayerFwd10 svg {
    width: 40px;
  }

  .d-player-volume-btn svg {
    width: 50px;
    height: 50px;
  }

  #dPlayerNextEp svg {
    width: 42px;
    height: 42px;
  }

  #dPlayerEpisodes svg {
    width: 42px;
    height: 42px;
  }

  #dPlayerCaptions svg {
    width: 42px;
    height: 42px;
  }

  #dPlayerSpeed svg {
    width: 36px;
    height: 31px;
  }

  #dPlayerFullscreen svg {
    width: 42px;
    height: 42px;
  }

  /* Episode picker hover (desktop): static shell from template, no behavior yet */
  .d-episode-picker-anchor {
    position: relative;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
  }

  .d-episode-picker-hover-popover {
    position: absolute;
    right: 0;
    bottom: calc(100% + 6px);
    width: min(760px, 92vw);
    /* Definite height so nested flex + % heights don’t collapse (was hiding episode column) */
    height: min(560px, 56vh);
    min-height: 280px;
    max-height: min(680px, 62vh);
    z-index: 30;
    background: #262626;
    border-radius: 3px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.75);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    padding-bottom: 14px;
    margin-bottom: -14px;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;
    color: #fff;
    -webkit-font-smoothing: antialiased;
    /* Template computed: font-size 21px, line-height 25.2px */
    --d-ep-fs: clamp(14px, 1.1vw, 21px);
    --d-ep-synopsis: clamp(13px, 1.1vw, 21px);
    /* Episode row: short bar on the right, same line as title */
    --d-ep-progress-w: clamp(56px, 11%, 88px);
    font-size: var(--d-ep-fs);
  }

  /* Season-only view (after back): compact width */
  .d-episode-picker-hover-popover.d-ep-narrow {
    width: min(320px, 88vw);
  }

  /* Crop picker view: fit content natively, wider than season, much less tall */
  .d-episode-picker-hover-popover.d-crop-narrow {
    width: auto;
    min-width: 380px;
    height: auto;
    min-height: auto;
    max-height: none;
  }

  .d-episode-picker-anchor:hover .d-episode-picker-hover-popover,
  .d-episode-picker-hover-popover:hover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* After Back, popover can shrink away from cursor; keep open until pointer leaves anchor */
  .d-episode-picker-anchor.d-ep-hover-lock .d-episode-picker-hover-popover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .d-player-controls.hidden .d-episode-picker-hover-popover {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .d-episode-picker-hover-popover .watch-video--selector-pane-container {
    height: 100%;
    max-height: inherit;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  /* Template wraps both panes in an anonymous div; row flex must be on that wrapper */
  .d-episode-picker-hover-popover [data-uia="selector-episode"] {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    min-width: 0;
  }

  .d-episode-picker-hover-popover [data-uia="selector-episode"] > div {
    display: flex;
    flex-direction: row;
    flex: 1;
    align-items: stretch;
    min-height: 0;
    min-width: 0;
  }

  /* Default UX: episodes only; season list + back row hidden until wired */
  .d-episode-picker-hover-popover [data-uia="season-pane"] {
    display: none !important;
  }

  .d-episode-picker-hover-popover [data-uia="episode-pane-back"] {
    display: none !important;
  }

  /* When you wire season navigation, add class d-ep-show-seasons on [data-uia="season-pane"] */
  .d-episode-picker-hover-popover [data-uia="season-pane"].d-ep-show-seasons {
    display: flex !important;
    flex: 0 0 34%;
    max-width: 280px;
    min-width: 200px;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    min-height: 0;
  }

  /* Single-column season picker: fill narrow popover */
  .d-episode-picker-hover-popover.d-ep-narrow [data-uia="season-pane"].d-ep-show-seasons {
    flex: 1 1 auto;
    max-width: none;
    min-width: 0;
    width: 100%;
    border-right: none;
  }

  .d-episode-picker-hover-popover.d-crop-narrow [data-uia="season-pane"].d-ep-show-seasons {
    min-width: -webkit-fill-available;
  }

  .d-episode-picker-hover-popover [data-uia="season-pane-title"] {
    margin: 0;
    padding: 20px 30px 12px;
    font-size: var(--d-ep-fs);
    font-weight: 500;
    line-height: 1.2;
    color: #fff;
  }

  .d-episode-picker-hover-popover [data-uia="season-pane"] [role="listbox"] {
    flex: 1;
    overflow-y: auto;
    padding: 0 0 12px;
    min-height: 0;
  }

  /* Season rows: match episode list (leading column + title; no progress) */
  .d-episode-picker-hover-popover [data-uia="season-pane"] [role="option"] {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0;
    padding: 30px;
    margin: 0;
    box-sizing: content-box;
    cursor: pointer;
    font-size: var(--d-ep-fs);
    font-weight: 400;
    line-height: 1.2;
    color: #fff;
    outline: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .d-episode-picker-hover-popover [data-uia="season-pane"] [role="option"]:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  .d-episode-picker-hover-popover [data-uia="season-pane"] [role="option"][aria-selected="true"] {
    cursor: default;
    background: rgba(0, 0, 0, 0.5);
    font-weight: 400;
    color: #fff;
  }

  .d-episode-picker-hover-popover [data-uia="season-pane"] [role="option"][aria-selected="true"]:hover {
    background: rgba(0, 0, 0, 0.5);
  }

  /* Check column: same horizontal rhythm as episode-pane-item-number */
  .d-episode-picker-hover-popover [data-uia="season-pane"] [role="option"] > div:first-child {
    flex-shrink: 0;
    padding-left: 16px;
    padding-right: 23px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    min-height: 1em;
  }

  .d-episode-picker-hover-popover [data-uia="season-pane"] [role="option"] > span {
    flex: 1 1 0%;
    min-width: 0;
    padding: 0;
    margin-right: 8px;
    font-size: var(--d-ep-fs);
    font-weight: 500;
    line-height: 1.2;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .d-episode-picker-hover-popover [data-show-on-hover="true"] {
    margin-left: auto;
    opacity: 0;
    display: flex;
    color: #fff;
  }

  .d-episode-picker-hover-popover [data-uia="season-pane"] [role="option"]:hover [data-show-on-hover="true"] {
    opacity: 1;
  }

  .d-episode-picker-hover-popover [data-uia="episode-pane"] {
    flex: 1;
    min-width: 0;
    min-height: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  .d-episode-picker-hover-popover [data-uia="episode-pane"] [role="listbox"] {
    flex: 1;
    overflow-y: auto;
    padding: 0 0 12px;
    min-height: 0;
  }

  /* ─── Season header nav row ─── */
  /* Template: display:flex, height:30px, padding:20px all sides, align-items:center, cursor:pointer */
  .d-episode-picker-hover-popover [data-uia="episode-pane-back"] {
    display: flex !important;   /* override the !important hide */
    align-items: center;
    height: 30px;
    padding: 20px;
    box-sizing: content-box;    /* height:30 + pad:20top+20btm = 70px total, matching template */
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    gap: 0;
    flex-shrink: 0;
  }

  /* Arrow icon container inside episode-pane-back */
  .d-episode-picker-hover-popover [data-uia="episode-pane-back"] > div:first-child {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 10px;
  }

  /* h3 = season label e.g. "Season 10" */
  .d-episode-picker-hover-popover [data-uia="episode-pane-back"] h3,
  .d-episode-picker-hover-popover [data-uia="selector-episode-header"] {
    margin: 0;
    padding: 0;
    font-size: var(--d-ep-fs);
    font-weight: 500;
    line-height: 1.2;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }


  /* ───────────────────────────────────────────────────────────
     EPISODE PANE INNER: episode-pane (flex column, fills popover)
     Template: display:flex, flex-direction:column, position:absolute fill
  ─────────────────────────────────────────────────────────── */
  .d-episode-picker-hover-popover [data-uia="episode-pane"] {
    display: flex;
    flex-direction: column;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
  }

  /* listbox = scrollable episode list */
  .d-episode-picker-hover-popover [data-uia="episode-pane"] [role="listbox"] {
    flex: 1;
    display: block;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
  }
  .d-episode-picker-hover-popover [data-uia="episode-pane"] [role="listbox"]::-webkit-scrollbar {
    width: 4px;
  }
  .d-episode-picker-hover-popover [data-uia="episode-pane"] [role="listbox"]::-webkit-scrollbar-track {
    background: transparent;
  }
  .d-episode-picker-hover-popover [data-uia="episode-pane"] [role="listbox"]::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
  }

  /* ─────────────────────────────────────────────────────────
     SEASON HEADER NAV ROW (episode-pane-back)
     Template: display:flex, height:30px, padding:20px all sides,
               align-items:center, cursor:pointer
               Total height = 30 + 20 + 20 = 70px
  ───────────────────────────────────────────────────────── */
  .d-episode-picker-hover-popover [data-uia="episode-pane-back"] {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    flex-shrink: 0;
    height: 30px;
    padding: 20px;
    box-sizing: content-box;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    color: #fff;
    font-size: var(--d-ep-fs);
    font-weight: 400;
    line-height: 1.2;
  }
  .d-episode-picker-hover-popover [data-uia="episode-pane-back"] > div:first-child {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 8px;
    color: #fff;
  }
  .d-episode-picker-hover-popover [data-uia="episode-pane-back"] h3,
  .d-episode-picker-hover-popover [data-uia="selector-episode-header"] {
    margin: 0;
    padding: 0;
    font-size: var(--d-ep-fs);
    font-weight: 500;
    line-height: 1.2;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* ─────────────────────────────────────────────────────────
     INACTIVE EPISODE ROW
     Template: display:block (NOT flex), box-sizing:content-box
     padding: 30px all sides (the 30px is on the inner top-row div,
     so the option/row itself has NO padding — the child div has it)
  ───────────────────────────────────────────────────────── */
  .d-episode-picker-hover-popover [data-uia="episode-pane-item"] {
    display: block;
    padding: 0;                   /* Padding lives on the CHILD div, not here */
    box-sizing: content-box;
    outline: none;
    color: #fff;
    font-size: var(--d-ep-fs);
    font-weight: 400;
    line-height: 1.2;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .d-episode-picker-hover-popover [data-uia="episode-pane-item"]:hover {
    background: rgba(255, 255, 255, 0.06);
  }
  .d-episode-picker-hover-popover [data-uia="episode-pane-item"][aria-selected="true"] {
    cursor: default;
    background: rgba(0, 0, 0, 0.5);
  }
  .d-episode-picker-hover-popover [data-uia="episode-pane-item"][aria-selected="true"]:hover {
    background: rgba(0, 0, 0, 0.5);
  }

  /* ─────────────────────────────────────────────────────────
     TOP ROW: number + truncated title + compact progress on one line
     (progress right-aligned; fixed width avoids full-width <progress> wrapping)
  ───────────────────────────────────────────────────────── */
  .d-episode-picker-hover-popover [data-uia="episode-pane-item"] > div:first-child {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    padding: 30px;                /* Template computed: 30px all sides */
    box-sizing: content-box;
    font-size: var(--d-ep-fs);
    font-weight: 400;
    line-height: 1.2;
    color: #fff;
    gap: 0;
    min-width: 0;
  }

  /* NUMBER span: padding-left:16px right:23px, font-weight:500 */
  .d-episode-picker-hover-popover [data-uia="episode-pane-item-number"] {
    flex-shrink: 0;
    padding-left: 16px;
    padding-right: 23px;
    font-size: var(--d-ep-fs);
    font-weight: 500;
    line-height: 1.2;
    color: #fff;
    white-space: nowrap;
  }

  /* TITLE span: fills middle, truncate with ellipsis */
  .d-episode-picker-hover-popover [data-uia="episode-pane-item"] > div:first-child > span:not([data-uia]) {
    display: block;
    flex: 1 1 0%;
    min-width: 0;
    font-size: var(--d-ep-fs);
    font-weight: 500;
    line-height: 1.2;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* PROGRESS BAR: short fixed width, right side of row (same line as title) */
  .d-episode-picker-hover-popover [data-uia="episode-pane-item"] progress {
    display: block;
    flex: 0 0 var(--d-ep-progress-w);
    width: var(--d-ep-progress-w);
    max-width: var(--d-ep-progress-w);
    height: 2px;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: auto;
    margin-right: 0;
    border: none;
    border-radius: 0;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(128, 128, 128, 0.5);
    accent-color: #e50914;
    box-sizing: border-box;
  }
  .d-episode-picker-hover-popover [data-uia="episode-pane-item"] progress::-webkit-progress-bar {
    background: rgba(128, 128, 128, 0.5);
    border-radius: 0;
  }
  .d-episode-picker-hover-popover [data-uia="episode-pane-item"] progress::-webkit-progress-value {
    background: #e50914;
    border-radius: 0;
  }
  .d-episode-picker-hover-popover [data-uia="episode-pane-item"] progress::-moz-progress-bar {
    background: #e50914;
  }

  /* ─────────────────────────────────────────────────────────
     ACTIVE EPISODE: display:flex (row) + padding:12px
     Template: display:flex, flex-direction:row (wraps), padding:12px all,
               flex-wrap:wrap so preview-open wraps to next line
  ───────────────────────────────────────────────────────── */
  .d-episode-picker-hover-popover [data-uia="episode-pane-item"][data-active="true"] {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;              /* preview-open wraps onto its own row */
    align-items: flex-start;
    padding: 12px;
    box-sizing: border-box;
  }
  /* The top-row div inside active episode needs adjusted padding */
  .d-episode-picker-hover-popover [data-uia="episode-pane-item"][data-active="true"] > div:first-child {
    padding: 0;                   /* Active row: parent already has 12px padding */
    flex: 0 0 100%;               /* Take full row width */
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    min-width: 0;
  }
  /* Number and title become flex children in active mode */
  .d-episode-picker-hover-popover [data-uia="episode-pane-item"][data-active="true"] [data-uia="episode-pane-item-number"] {
    display: inline-block;
    flex-shrink: 0;
  }
  .d-episode-picker-hover-popover [data-uia="episode-pane-item"][data-active="true"] > div:first-child > span:not([data-uia]) {
    display: inline-block;
    flex: 1 1 0%;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* Progress in active row: same line as title, right-aligned */
  .d-episode-picker-hover-popover [data-uia="episode-pane-item"][data-active="true"] progress {
    flex: 0 0 var(--d-ep-progress-w);
    width: var(--d-ep-progress-w);
    max-width: var(--d-ep-progress-w);
    margin-left: auto;
    margin-top: 0;
  }

  /* ─────────────────────────────────────────────────────────
     PREVIEW SECTIONS
  ───────────────────────────────────────────────────────── */
  /* preview-closed: always hidden */
  .d-episode-picker-hover-popover [data-uia="episode-pane-item-preview-closed"] {
    display: none !important;
  }

  /* preview-open: the thumbnail+synopsis row (active ep only)
     Template: display:flex, flex-direction:row, height:140px, margin-top:17px
     In our active row it's a second flex row (flex:0 0 100%) */
  .d-episode-picker-hover-popover [data-uia="episode-pane-item-preview-open"] {
    display: flex !important;
    flex-direction: row;
    align-items: flex-start;
    flex: 0 0 100%;               /* Own row in the flex-wrap parent */
    height: 140px;
    margin-top: 17px;
    gap: 0;
    overflow: hidden;
  }

  /* Thumbnail: left side */
  .d-episode-picker-hover-popover [data-uia="episode-pane-item-preview-open"] > div:first-child {
    flex: 0 0 auto;
    width: clamp(160px, 36%, 249px);
    height: 140px;
    margin-right: 30px;
    background-color: #141414;
    background-image: linear-gradient(135deg, #2a2a2a 0%, #111 100%);
    background-size: cover;
    background-position: center;
    border-radius: 2px;
    overflow: hidden;
    display: block;
    flex-shrink: 0;
  }

  /* Synopsis: right side — template: 21px, line-height 25.2px, color #fff */
  .d-episode-picker-hover-popover [data-uia="episode-pane-item-preview-open"] > span:last-child {
    flex: 1 1 0%;
    min-width: 0;
    font-size: var(--d-ep-synopsis);
    font-weight: 400;
    line-height: 1.2;
    color: #fff;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    align-self: flex-start;
    margin: 0;
    padding: 0;
  }

  /* Hide play buttons (inside preview-closed which is hidden, and preview-open) */
  .d-episode-picker-hover-popover [data-uia="episode-pane-item-preview-open"] .play-button,
  .d-episode-picker-hover-popover .play-button {
    display: none;
  }
}

.video-player-message {
  position: absolute;
  inset: auto 24px 24px 24px;
  color: #fff;
  font-size: 0.95rem;
  background: rgba(0, 0, 0, 0.55);
  padding: 10px 14px;
  border-radius: 6px;
  display: none;
  z-index: 2;
  pointer-events: none;
}

.video-player-overlay.show-message .video-player-message {
  display: inline-flex;
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Prevent body scroll when video player is open */
body.video-open {
  overflow: hidden;
}

/* Mobile-only elements — hidden by default, shown by mobile.css */
.poster-img,
.mobile-featured-section,
.mobile-tab-bar,
.mobile-filters,
.mobile-featured-ambient,
#mobileNavSearch,
.mobile-search-back,
.mobile-category-overlay,
.mobile-profile-overlay,
.mobile-boot-overlay {
  display: none;
}

/* Critical mobile-first startup gate to prevent home flash before JS runs */
@media (max-width: 768px), (max-height: 600px) {
  .profile-picker-overlay {
    display: none !important;
  }

  .mobile-boot-overlay {
    display: flex !important;
    position: fixed;
    inset: 0;
    z-index: 4000;
    background: #000;
    opacity: 1;
    pointer-events: auto;
  }
}

/* ========== Responsive (Tablet + Mobile) ========== */
@media (max-width: 1024px) {
  .navbar {
    padding: 0 32px;
    height: 60px;
  }

  .nav-left {
    gap: 14px;
  }

  .logo {
    font-size: 1.3rem;
    letter-spacing: 1.5px;
  }

  .nav-link {
    font-size: 0.75rem;
  }

  .nav-right {
    gap: 12px;
  }

  .nav-icon {
    width: 32px;
    height: 32px;
  }

  .nav-icon svg {
    width: 20px;
    height: 20px;
  }

  .nav-search.open .nav-search-input {
    width: 160px;
    height: 28px;
    font-size: 0.75rem;
  }

  .profile-icon img {
    width: 28px;
    height: 28px;
  }

  .profile-caret {
    font-size: 0.55rem;
  }

  .search-results {
    top: 60px;
    padding: 24px 32px 48px;
  }

  .search-results-title {
    font-size: 1.2rem;
  }

  .search-results-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 28px 10px;
  }

  div#featuredContainer {
    height: 80vh;
    padding-bottom: 8vh;
  }

  .hero-content {
    padding-left: 32px;
    max-width: 520px;
  }

  .hero-title {
    font-size: 3.2rem;
    letter-spacing: 0.28em;
    margin-bottom: 18px;
  }

  .hero-buttons {
    gap: 10px;
  }

  .btn-play,
  .btn-info {
    font-size: 0.95rem;
    padding: 6px 22px 6px 16px;
  }

  .btn-play svg {
    width: 24px;
    height: 24px;
  }

  .btn-info svg {
    width: 20px;
    height: 20px;
  }

  .hero-bottom-right {
    right: 32px;
    bottom: 8vh;
  }

  .btn-mute {
    width: 34px;
    height: 34px;
  }

  .btn-mute svg {
    width: 18px;
    height: 18px;
  }

  .maturity-rating {
    font-size: 0.85rem;
    padding: 4px 12px 4px 10px;
  }

  .content-area {
    margin-top: -60px;
    padding-bottom: 48px;
  }

  .content-row {
    padding: 0 32px;
    margin-bottom: 22px;
  }

  .row-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
  }

  .poster,
  .content-card {
    width: 240px;
    height: 135px;
  }

  .content-card .content-title {
    font-size: 0.75rem;
  }

  .content-card .content-meta {
    font-size: 0.65rem;
  }

  .row-arrow {
    width: 48px;
    font-size: 2.4rem;
  }

  .row-arrow-left {
    left: -48px;
  }

  .row-arrow-right {
    right: -48px;
  }

  .content-modal {
    width: 90vw;
  }

  .modal-hero-content {
    left: 28px;
    right: 28px;
    bottom: 18px;
  }

  .modal-logo {
    max-width: 220px;
    max-height: 90px;
  }

  .modal-actions {
    gap: 8px;
  }

  .modal-btn {
    padding: 8px 18px;
    font-size: 0.9rem;
  }

  .modal-btn-icon {
    width: 36px;
    height: 36px;
  }

  .modal-info {
    padding: 20px 28px;
    gap: 24px;
  }

  .modal-description-wrapper {
    font-size: 0.9rem;
  }

  .modal-description-short,
  .modal-description-full {
    font-size: 0.9rem;
  }

  .modal-bottom {
    padding: 20px 28px 32px;
  }

  .modal-section-title {
    font-size: 1.2rem;
  }

  .modal-similar-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-episode-card {
    grid-template-columns: 48px 140px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
  }

  .modal-episode-thumb {
    width: 140px;
  }

  .modal-episode-content {
    min-height: 79px;
  }

  .modal-episode-number {
    font-size: 1rem;
  }

  .modal-episode-title {
    font-size: 0.9rem;
  }

  .modal-episode-desc {
    font-size: 0.78rem;
  }

  .video-player-close {
    width: 32px;
    height: 32px;
    font-size: 22px;
  }
}

@media (max-width: 768px), (max-height: 600px) {
  .navbar {
    padding: 0 18px;
    height: 54px;
  }

  .nav-left {
    gap: 10px;
    flex: 1 1 auto;
    display: none;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-left svg {
    width: max-content;
    margin: 0px 1vw;
  }

  .nav-left::-webkit-scrollbar {
    display: none;
  }

  .logo {
    font-size: 1.1rem;
    letter-spacing: 1.2px;
    margin-right: 10px;
  }

  .nav-link {
    font-size: 0.7rem;
  }

  .nav-link[data-page="new"] {
    display: none;
  }

  .nav-right {
    gap: 8px;
  }

  .nav-icon {
    width: 32px;
    height: 32px;
    margin: 0px 10px;
    margin-right: 0px;
  }

  .nav-icon svg {
    width: 32px;
    height: 32px;
  }

  .nav-search.open .nav-search-input {
    width: 277px;
    height: 31px;
    font-size: 1.05rem;
  }

  .profile-icon img {
    width: 26px;
    height: 26px;
  }

  .profile-caret {
    font-size: 0.5rem;
  }

  .search-results {
    top: 54px;
    padding: 0px 5px 40px;
    padding-left: 11px;
  }

  .search-results-title {
    font-size: 1.05rem;
    font-weight: 100;
  }

  .search-results-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px 8px;
    display: flex;
    flex-wrap: wrap;
  }

  div#featuredContainer {
    height: 72vh;
    padding-bottom: 6vh;
  }

  .hero-content {
    padding-left: 18px;
    max-width: 90vw;
  }

  .hero-logo img {
    width: 35vw;
  }

  .hero-title {
    font-size: 2.4rem;
    letter-spacing: 0.22em;
    margin-bottom: 14px;
  }

  .hero-buttons {
    gap: 8px;
    flex-wrap: wrap;
  }

  .btn-play,
  .btn-info {
    font-size: 0.85rem;
    padding: 6px 16px 6px 12px;
  }

  .btn-play svg {
    width: 20px;
    height: 20px;
  }

  .btn-info svg {
    width: 18px;
    height: 18px;
  }

  .hero-bottom-right {
    right: 18px;
    bottom: 6vh;
  }

  .btn-mute {
    width: 30px;
    height: 30px;
  }

  .btn-mute svg {
    width: 16px;
    height: 16px;
  }

  .maturity-rating {
    font-size: 0.75rem;
    padding: 3px 10px 3px 8px;
  }

  .content-area {
    margin-top: -40px;
    padding-bottom: 40px;
  }

  .content-row {
    padding: 0 18px;
    margin-bottom: 18px;
  }

  .content-row.row-loaded {
    padding-right: 0px;
  }

  .row-title {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .row-posters {
    gap: 5px;
  }

  .poster,
  .content-card {
    width: 200px;
    height: 112px;
  }

  .content-card .content-title {
    font-size: 0.7rem;
  }

  .content-card .content-meta {
    font-size: 0.6rem;
  }

  .content-modal {
    width: max-content;
    border-radius: 0px;
    margin-bottom: 0px;
  }

  .modal-header-buttons {
    top: 12px;
    right: 12px;
  }

  .modal-hero-content {
    left: 18px;
    right: 18px;
    bottom: 14px;
  }

  .modal-logo {
    max-width: 266px;
    max-height: 70px;
  }

  .modal-title-text {
    font-size: 1.5rem;
  }

  .modal-actions {
    gap: 6px;
    flex-wrap: wrap;
  }

  .modal-btn {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  .modal-btn-icon {
    width: 32px;
    height: 32px;
  }

  .modal-info {
    flex-direction: column;
    gap: 12px;
    padding: 16px 18px;
  }

  .modal-description-wrapper {
    font-size: 0.85rem;
  }

  .modal-description-short,
  .modal-description-full {
    font-size: 0.85rem;
  }

  .modal-cast,
  .modal-genres {
    font-size: 0.78rem;
  }

  .modal-bottom {
    padding: 5px 12px;
  }

  .modal-section-title {
    font-size: 1.1rem;
    font-weight: lighter;
  }

  .modal-similar-grid {
    grid-template-columns: 1fr;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 10px 10px;
  }

  .modal-episode-card {
    grid-template-columns: 34px 120px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 0;
  }

  .modal-episode-thumb {
    width: 120px;
  }

  .modal-episode-number {
    font-size: 0.95rem;
  }

  .modal-episode-title {
    font-size: 0.85rem;

    font-weight: 100;
  }

  .modal-episode-runtime {
    font-size: 0.75rem;
  }

  .modal-episode-desc {
    font-size: 0.75rem;
  }

  .video-player-close {
    width: 30px;
    height: 30px;
    font-size: 20px;
  }

  .video-player-message {
    font-size: 0.85rem;
  }
  .search-results-grid .content-card {
    width: 48%;
    border-radius: 7px;
  }
  .modal-similar-grid .content-card {
    width: 47%;
  }
  
  .modal-overlay {
      justify-content: unset;
      padding-top: 0px;
  }
  .content-modal {
    max-width: 100vw;
}
.modal-hero {
    aspect-ratio: unset;
    height: 26.3vh;
}
.modal-btn-chromecast,
.modal-close {
  background: none !important;
  border: none !important;
  padding: 0 !important;
}
.modal-episodes {
    padding: 0px 13px;
    padding-left: 0px;
    gap: 15px;
}
.modal-episode-card {
    border-radius: 0px;
    background: none;
    border-bottom: 1px solid rgb(47, 47, 47);
}
.modal-section-header {
    padding: 0px 16px;
    padding-left: 2vw;
}
#seasonSelector {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    background-color: color(srgb 0.1286 0.1286 0.1286);
    color: color(srgb 0.5533 0.5534 0.5534);
    border: none;
    outline: none;

    padding-right: 30px; /* space for custom arrow */
}
#seasonSelector {
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23888888' height='10' viewBox='0 0 20 20' width='10' xmlns='http://www.w3.org/2000/svg'><path d='M5 7l5 5 5-5'/></svg>");
    background-repeat: no-repeat;
    background-position: right 5px center;
    background-size: 25px;
}
.hero-logo img {
  width: 65vw;
  margin: 3vh 0px;
}

.content-area {
  padding-top: 2vh;
}
.btn-play {
  font-size: 1rem;
  padding: 8px 20px;

}
.btn-play svg {
  width: 23px;
  height: 23px;
  display: flex;
  margin-right: -5px;

}
.nav-left {
  display: block !important;
}
.content-area {
  background: rgb(9, 10, 10);

}
.hero-gradient {
  background: linear-gradient(360deg, rgb(9, 9, 9), rgb(9, 9, 9) 18.07%, transparent);

}
.row-title {font-weight: 100;}
}

.tabbed-primary-navigation li {
  -webkit-text-size-adjust: 100%;
  color: #fff;
  --base-line-height: 1.2;
  line-height: var(--base-line-height);
  -webkit-font-smoothing: antialiased;
  cursor: default;
  user-select: none;
  --base-font-size: 0.75vw;
  font-family: Netflix Sans,Helvetica Neue,Segoe UI,Roboto,Ubuntu,sans-serif;
  font-size: 14px;
  list-style-type: none;
  margin-left: 20px;
}

a.current.active {
  color: white;
}

.navigation-tab a {
  color: #e5e5e5;
}

/* ===== Skip Intro / Recap (Desktop) ===== */
.skip-segment-btn {
  position: absolute;
  bottom: 110px;
  right: 28px;
  z-index: 29;
  box-sizing: border-box;
  width: 105px;
  height: 40px;
  margin: 0;
  padding: 0 6px;
  border: none;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  background: #fff;
  color: #000;
  font-family: 'Netflix Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  transition: background 0.15s, transform 0.12s;
}

.skip-segment-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skip-segment-btn:hover {
  background: #f2f2f2;
}

.skip-segment-btn:active {
  transform: scale(0.98);
}

.skip-segment-btn[hidden] {
  display: none !important;
}

@media (max-width: 768px), (max-height: 600px) {
  .skip-segment-btn {
    display: none !important;
  }
}

/* ===== Autoplay Next Episode Card (Desktop Only) ===== */
.autoplay-card {
  position: absolute;
  bottom: 110px;
  right: 28px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 30;
}

.autoplay-card.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.autoplay-btn {
  width: 175px;
  height: 40px;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}

.autoplay-dark,
.autoplay-light {
  position: absolute;
  top: 0;
  left: 0;
  width: 175px;
  height: 100%;
  overflow: hidden;
}

.autoplay-dark span,
.autoplay-light span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 175px;
  height: 40px;
  gap: 6px;
  font-family: 'Netflix Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 300;
  white-space: nowrap;
}

.autoplay-dark {
  background: #a1a1a1;
  color: white;
  z-index: 1;
}

.autoplay-light {
  background: white;
  color: black;
  z-index: 2;
  width: 0%;
}

.autoplay-credits-btn {
  width: 175px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #575757;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  font-family: 'Netflix Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 300;
  white-space: nowrap;
  transition: background 0.15s;
}

.autoplay-credits-btn:hover {
  background: #686868;
}

@media (max-width: 768px), (max-height: 600px) {
  .autoplay-card {
    display: none !important;
  }
}
[role="listbox"]::-webkit-scrollbar {
  display: none;
}

[role="listbox"] {
  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;   /* old Edge */
}


/* TEMP STYLE CHANGE - CLEANER */
.sports-event-badge {
  display: none;
}

.sports-ev-meta {
  display: none;
}

.sports-ev-vs {
  display: none !important;
}
/* TEMP STYLE CHANGE - END*/
/* Play All Card (My List rows) */
.play-all-card {
  cursor: pointer;
  overflow: hidden;
}

/* ========== Tablet / iPad sizing (touch devices 769px–1400px only) ==========
   This block ONLY affects tablets (touch screens in this width range). It does
   NOT affect:
     • phones (max-width: 768px / mobile.css path)
     • desktop / laptop (no touch → pointer: fine, skipped)
     • small desktop windows resized down (no touch → skipped)
   Bumps are ~20% on the four surfaces grandma uses most: search
   results, the modal/episode list, the home rows, and the desktop player
   controls. Layout-affecting properties (paddings, grid columns, flex sizing)
   are left almost entirely alone to avoid breaking proportions.
*/
@media (min-width: 769px) and (max-width: 1400px) and (pointer: coarse) {
  /* ── Search results ──────────────────────────────────────────────── */
  .search-results {
    padding: 38px 68px 72px;
  }

  .search-results-title {
    font-size: 1.68rem;
  }

  .search-results-empty {
    font-size: 1.14rem;
  }

  .search-results-grid {
    grid-template-columns: repeat(auto-fill, minmax(355px, 1fr));
    gap: 48px 12px;
  }

  /* ── Modal: hero + info ──────────────────────────────────────────── */
  .modal-logo {
    max-width: 360px;
    max-height: 144px;
  }

  .modal-title-text {
    font-size: 2.4rem;
  }

  .modal-btn {
    font-size: 1.2rem;
    padding: 12px 29px;
  }

  .modal-btn-icon {
    width: 64px;
    height: 64px;
  }

  .modal-btn-icon svg {
    width: 29px;
    height: 29px;
  }

  .modal-meta {
    font-size: 1.2rem;
  }

  .modal-rating-badge {
    font-size: 0.9rem;
  }

  .modal-description-wrapper {
    font-size: 1.14rem;
  }

  .modal-description-short,
  .modal-description-full {
    font-size: 1.14rem;
    line-height: 1.65;
  }

  .modal-cast,
  .modal-genres {
    font-size: 1.02rem;
  }

  .modal-section-title {
    font-size: 1.68rem;
  }

  .modal-season-select select {
    font-size: 1.2rem;
  }

  /* ── Modal: episode list (TV shows) ─────────────────────────────── */
  .modal-episode-card {
    grid-template-columns: 67px 192px minmax(0, 1fr);
    gap: 19px;
    padding: 19px 0;
  }

  .modal-episode-number {
    font-size: 1.98rem;
  }

  .modal-episode-thumb {
    width: 192px;
  }

  .modal-episode-play {
    width: 48px;
    height: 48px;
  }

  .modal-episode-play svg {
    width: 19px;
    height: 19px;
  }

  .modal-episode-content {
    min-height: 108px;
    gap: 10px;
  }

  .modal-episode-title {
    font-size: 1.2rem;
  }

  .modal-episode-runtime {
    font-size: 20px;
  }

  .modal-episode-desc {
    font-size: 1.02rem;
    line-height: 1.6;
  }

  /* ── Modal: desktop-style episode picker rows (player hover) ─────── */
  .d-episode-picker-hover-popover {
    --d-ep-fs: clamp(17px, 1.32vw, 25px);
  }

  /* ── Home content cards ──────────────────────────────────────────── */
  .content-card .content-title {
    font-size: 1.02rem;
  }

  .content-card .content-meta {
    font-size: 0.84rem;
  }

  /* ── Desktop video player (used by iPad too — fires under same min-width) ── */
  .d-player-back-btn svg {
    width: 42px;
    height: 36px;
  }

  .d-player-flag-btn svg {
    width: 53px;
    height: 53px;
  }

  .d-player-time {
    font-size: 17px;
    min-width: 72px;
  }

  .d-player-progress {
    height: 6px;
  }

  .d-progress-handle {
    width: 17px;
    height: 17px;
  }

  .d-player-progress:hover {
    height: 8px;
  }

  .d-player-progress:hover .d-progress-handle,
  .d-player-progress.scrubbing .d-progress-handle {
    width: 22px;
    height: 22px;
  }
}
