/* ====================================================
   mobile.css — Netflix-style mobile layout
   Loaded ONLY at max-width: 768px via <link media="...">
   Desktop is NEVER affected by this file.
   ==================================================== */

/* ===== General ===== */
html,
body {
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overscroll-behavior: none;
}

body {
  padding-bottom: 90px;
  padding-top: calc(50px + env(safe-area-inset-top, 0px));
  min-height: 100vh;
  min-height: 100dvh;
  background: #312824 !important;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

/* ===== Mobile Startup Experience ===== */
.profile-picker-overlay {
  display: none !important;
}

body.mobile-startup-open {
  overflow: hidden !important;
  background: #000 !important;
}

body.mobile-startup-open.mobile-boot-show-picker {
  background: #3A2C26 !important;
}

body.mobile-boot-exiting {
  background: #000 !important;
}

.mobile-boot-overlay {
  --mobile-boot-bg: #000;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: calc(-1 * env(safe-area-inset-bottom, 0px));
  z-index: 4000;
  display: none !important;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: calc(100vh + env(safe-area-inset-bottom, 0px));
  background: var(--mobile-boot-bg);
  opacity: 1;
  pointer-events: auto;
  overflow: hidden;
  transition: opacity 0.24s ease;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.mobile-boot-overlay::after {
  content: none;
}

.mobile-boot-overlay.active {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
}

.mobile-boot-overlay.dismissing {
  opacity: 0;
  pointer-events: none;
}

.mobile-boot-overlay.show-picker {
  --mobile-boot-bg: #000;
}

.mobile-boot-video-layer,
.mobile-boot-picker-layer {
  position: absolute;
  inset: 0;
  min-height: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-boot-video {
  width: min(78vw, 420px);
  max-height: 58vh;
  max-height: calc(var(--app-vh, 100dvh) * 0.58);
  height: auto;
  object-fit: contain;
  background: #000;
  /* Crop encoded side glow without changing logo scale */
  clip-path: inset(0 2.4% 0 2.4%);
  -webkit-clip-path: inset(0 2.4% 0 2.4%);
}

.mobile-boot-picker-layer {
  opacity: 0;
  background: #000;
  pointer-events: none;
  transition: opacity 0.42s ease;
}

.mobile-boot-picker-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 93%;
  object-fit: cover;
  z-index: 0;
}

.mobile-boot-overlay.show-picker .mobile-boot-video-layer {
  opacity: 0;
  pointer-events: none;
}

.mobile-boot-overlay.show-picker .mobile-boot-picker-layer {
  opacity: 1;
  pointer-events: auto;
}

.mobile-boot-overlay.dismissing .mobile-boot-picker-layer {
  opacity: 0;
  background: #000 !important;
}

.mobile-boot-picker-shell {
  position: relative;
  z-index: 1;
  width: min(92vw, 420px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  margin-top: 56vh;
  margin-top: calc(var(--app-vh, 100dvh) * 0.56);
}

.mobile-boot-picker-title-dummy {
  width: 230px;
  height: 24px;
  border-radius: 999px;
}

.mobile-boot-picker-grid {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.mobile-boot-picker-composite {
  width: 318px;
  height: 213px;
  max-width: min(318px, 92vw);
  margin-top: -15px;
  display: block;
}

.mobile-boot-picker-card {
  width: 98px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.mobile-boot-picker-avatar {
  width: 82px;
  height: 82px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.36);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.mobile-boot-picker-avatar-lady {
  background-image: url('ladypfp.png');
  background-color: transparent;
}

.mobile-boot-picker-avatar-main {
  background-image: url('mainpfp.png');
  background-color: transparent;
}

.mobile-boot-picker-name {
  width: 72px;
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.mobile-boot-picker-manage {
  width: 176px;
  height: 30px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: transparent;
  cursor: pointer;
}

/* ===== Hide scrollbars on mobile (all browsers) ===== */
* {
  -ms-overflow-style: none;  /* IE / Edge */
  scrollbar-width: none;     /* Firefox */
}
*::-webkit-scrollbar {
  display: none;             /* Chrome, Safari, WebKit */
}

/* ===== Navbar → compact mobile header (fixed so it stays visible while scrolling) ===== */
.navbar {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: calc(50px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 16px 0 !important;
  background: rgb(0 0 0 / 0%) !important;
  backdrop-filter: blur(0px) saturate(1.1);
  -webkit-backdrop-filter: blur(0px) saturate(1.1);
  transition: background 0.5s ease, backdrop-filter 0.5s ease, -webkit-backdrop-filter 0.5s ease;
}

.navbar.scrolled {


  background: rgba(30, 30, 30, 0.56) !important;
  backdrop-filter: blur(75px) saturate(1.17) !important;
  -webkit-backdrop-filter: blur(85px) saturate(1.17) !important;
}

.nav-left {
  display: flex !important;
  align-items: center !important;
  gap: 0 !important;
  overflow: visible !important;
}

.nav-left .nav-link {
  font-size: 20px;
  font-weight: 500;
}
.nav-logo-desktop {
  display: none !important;
}
.nav-logo-mobile {
  display: inline !important;
}

.nav-right {
  gap: 14px !important;
}

/* Show mobile search, hide desktop search on mobile */
#mobileNavSearch {
  display: flex !important;
}

#desktopNavSearch {
  display: none !important;
}

/* Hide notifications + profile dropdown on mobile */
.nav-right .nav-icon[aria-label="Notifications"],
.profile-dropdown-wrap {
  display: none !important;
}

/* Mobile search back button — shown only when search is open */
.mobile-search-back {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 10px 6px 0;
  flex-shrink: 0;
  color: white;
}

/* ===== Mobile Search Open State ===== */
.navbar.mobile-search-open {
  gap: 8px;
  position: fixed !important;
}
body.search-mode .navbar.mobile-search-open {
  background: #040202 !important;
}
.navbar.mobile-search-open .nav-left .nav-link {
  display: none !important;
}

.navbar.mobile-search-open .nav-chromecast-toggle {
  display: none !important;
}

.navbar.mobile-search-open .mobile-search-back {
  display: flex !important;
}

.navbar.mobile-search-open .nav-right {
  flex: 1;
}

.navbar.mobile-search-open #mobileNavSearch {
  flex: 1;
  background: #2C2C2C;
  border-radius: 8px;
  height: 36px;
  padding-right: 10px;
  gap: 6px;
}

.navbar.mobile-search-open #mobileNavSearch .nav-search-toggle {
  pointer-events: none;
  flex-shrink: 0;
}

.navbar.mobile-search-open #mobileNavSearch .nav-search-toggle svg {
  width: 20px !important;
  height: 20px !important;
}

.navbar.mobile-search-open #mobileNavSearch .nav-search-input {
  display: block !important;
  flex: 1;
  width: 65vw !important;
  min-width: 0;
  opacity: 1 !important;
  margin-left: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  color: white;
  font-size: 18px;
  font-family: inherit;
  margin-bottom: 2px;
  height: 32px;
  outline: none;
}

/* ===== Category Selector Overlay ===== */
.mobile-category-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgb(0 0 0 / 50%);
  backdrop-filter: blur(100px);
  -webkit-backdrop-filter: blur(100px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-category-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-category-list {
  flex: 1;
  overflow-y: auto;
  padding: calc(env(safe-area-inset-top, 0px) + 56px) 28px 24px;
  -webkit-overflow-scrolling: touch;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.33, 1, 0.68, 1);
}

.mobile-category-overlay.open .mobile-category-list {
  transform: translateY(0);
}

.mobile-category-item {
  display: block;
  width: 100%;
  padding: 15px 0;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.88);
  font-size: 17px;
  font-weight: 400;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 0.15s, background 0.1s;
}

.mobile-category-item:active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

/* Sports shortcut at top of category list */
.mobile-category-sports {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 6px;
  padding-bottom: 18px;
}

.mobile-cat-sports-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e50914;
  flex-shrink: 0;
  animation: live-pulse 1.4s ease-in-out infinite;
}

.mobile-category-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: white;
  border: none;
  cursor: pointer;
  margin: 12px auto max(32px, env(safe-area-inset-bottom));
  flex-shrink: 0;
}

/* Active category pill */
.filter-pill.category-pill {
  width: auto !important;
  min-width: 75px;
  padding: 0 14px !important;
  background: rgb(255 255 255 / 30%) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  gap: 6px;
}

.filter-pill.category-pill .pill-x {
  font-size: 13px;
  opacity: 0.75;
  margin-left: 2px;
  line-height: 1;
}

/* ===== Filter Pills — 75w × 36h ===== */
.mobile-filters {
  display: flex !important;
  gap: 8px;
  padding: 8px 16px 12px;
  padding-top: 0px !important;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: relative;
  z-index: 5;
}

.mobile-filters::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  flex-shrink: 0;
  width: 75px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 30%);
  background: transparent;
  color: #E1D5D1;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  font-family: inherit;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 1;
}

.filter-pill.active {
  background: rgb(255 255 255 / 30%);
  border-color: rgba(255, 255, 255, 0.5);
}

.filter-pill svg {
  height: 12px;
  width: 12px;
  margin-top: 3px;
  margin-left: 3px;
}

/* ===== Hide Desktop Hero ===== */
.maincontainer {
  display: none !important;
}

/* ===== Mobile Featured Section ===== */
.mobile-featured-section {
  display: block !important;
  position: relative;
  padding: 0 22px 32px;    /* 22px sides → 346px card on 390px phone */
  overflow: hidden;
  margin-top: 15px;
}

/* Fade the bottom of the section into pure black */
.mobile-featured-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(transparent, #000);
  z-index: 3;
  pointer-events: none;
}

/* ===== Ambient Color Bleed =====
   A blurred+darkened+saturated version of the poster is rendered
   behind the card, creating a per-title color wash without CORS. */
.mobile-featured-ambient {
  display: block !important;
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center top;
  filter: blur(60px) brightness(0.32) saturate(2.5);
  z-index: 0;
  pointer-events: none;
  transition: background-image 0.6s ease, opacity 0.15s ease;
}

body.search-mode .mobile-featured-ambient {
  opacity: 0 !important;
}
div#mobileFeaturedCard {
  border: 1.0px solid #ffffff38;
}

nav#mainNavbar {
  /* background handled by .navbar / .navbar.scrolled rules */
}
/* ===== Mobile Featured Card — 345w × 487h ratio ===== */
.mobile-featured-card {
  position: relative;
  width: 100%;               /* fills the padded section → ~346px */
  aspect-ratio: 345 / 487;  /* matches Netflix exactly */
  border-radius: 12px;
  overflow: hidden;
  background: #111;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;               /* above ambient */
  border: 1px solid #ffffff0f;
  cursor: pointer;
}

.mobile-featured-card.loaded {
  opacity: 1;
}

.mobile-featured-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Smooth cinematic gradient — many stops simulate a natural ease curve */
/* Bottom fade on the card — handles logo/genres/button readability */
.mobile-featured-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 65%;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 1.00)  0%,
    rgba(0, 0, 0, 0.95)  8%,
    rgba(0, 0, 0, 0.85) 18%,
    rgba(0, 0, 0, 0.65) 32%,
    rgba(0, 0, 0, 0.35) 50%,
    rgba(0, 0, 0, 0.08) 70%,
    transparent         85%
  );
  pointer-events: none;
  z-index: 1;
}

.mobile-featured-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 2; /* above ::after gradient */
}

.mobile-featured-logo {
  max-width: 82%;
  max-height: 90px;
  object-fit: contain;
  margin-bottom: 15px;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.9));
}

/* NBA TV / live sports featured only — id is unique; other .mobile-featured-logo rules stay at 90px */
#mobileFeaturedCard[data-featured='live-sports'] #mobileFeaturedLogo {
  display: block;
  max-height: 60px;
}

.mobile-featured-genres {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 12px;
  letter-spacing: 0.03em;
}

/* ===== Play / My List Buttons — 150w × 40h ===== */
.mobile-featured-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.mobile-btn-play,
.mobile-btn-list {
  flex: 1;
  max-width: 150px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  border: none;
  border-radius: 4px;
  font-size: 1.03rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}

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

.mobile-btn-play:active { opacity: 0.82; }

.mobile-btn-list {
  background: rgba(60, 60, 60, 0.8);
  color: #fff;
}

.mobile-btn-list:active { opacity: 0.82; }

.mobile-btn-play svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.mobile-btn-list svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ===== Content Area ===== */
.content-area {
  margin-top: 0 !important;
  padding-top: 4px !important;
  padding-bottom: 16px !important;
  background: #000 !important;
  overscroll-behavior-y: contain;
}

.content-row {
  padding: 0 0 0 14px !important;
  margin-bottom: 13px !important;
  min-height: 180px;
}

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

.row-title {
  font-size: 18px !important;
  font-weight: 500 !important;
  margin-bottom: 8px !important;
  color: #e5e5e5 !important;
}

.row-posters {
  gap: 6px !important;
}

/* ===== Portrait Content Cards — 110w × 159h ===== */
.poster,
.content-card {
  width: 110px !important;
  height: 159px !important;
  aspect-ratio: unset !important;
  border-radius: 5px !important;
}

/* Sports channel cards stay landscape (16:9) — override the portrait override above */
.sports-channel-card {
  width: 110px !important;
  height: 139px !important;
  border-radius: 8px !important;
}

/* Match cards (CDN Live TV sports events) — slightly taller for team names */
.sports-event-card {
  width: 168px !important;
  height: 118px !important;
  margin: 0px 1.5px;
  border-radius: 8px !important;
}

/* Suppress poster-img / backdrop rules that apply to regular cards */
.sports-channel-card .poster-img,
.sports-channel-card .backdrop,
.sports-event-card .poster-img,
.sports-event-card .backdrop {
  display: none !important;
}

/* Sports page: add breathing room above first row since there's no featured card */
[id^="row-sports-"]:first-child {
  padding-top: 8px !important;
}

.content-card .backdrop {
  display: none !important;
}

.content-card .poster-img {
  display: block !important;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 0.2s ease;
}

.content-card:hover .poster-img {
  transform: scale(1.04);
}

.content-card .gradient-overlay {
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.82) 0%,
    rgba(0, 0, 0, 0.3) 32%,
    transparent 52%
  ) !important;
}

/* Logos centered at bottom of portrait cards */
.content-card .logo {
  bottom: 7px !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  max-width: 78% !important;
  max-height: 28% !important;
}

.content-card .content-info {
  bottom: 5px;
  left: 5px;
  right: 5px;
}

.content-card .content-title {
  font-size: 0.58rem !important;
}

.content-card .content-meta {
  font-size: 0.5rem !important;
}

/* ===== Continue Watching Row Cards (mobile-only custom footer controls) ===== */
#row-continue-watching .row-posters {
  gap: 8px !important;
}

#row-continue-watching .continue-card-shell {
  flex: 0 0 auto;
  width: 110px;
  border-radius: 5px;
  overflow: hidden;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

#row-continue-watching .continue-card-shell .content-card {
  width: 100% !important;
  height: 139px !important;
  border-radius: 5px 5px 0 0 !important;
  overflow: hidden;
}

#row-continue-watching .continue-card-shell .content-card .gradient-overlay {
  inset: auto 0 0 0 !important;
  height: 32px !important;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.85) 100%
  ) !important;
}

#row-continue-watching .continue-card-shell .content-card .logo {
  bottom: 10px !important;
  max-width: 72% !important;
  max-height: 24% !important;
}

#row-continue-watching .continue-mobile-play {
  display: flex;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  z-index: 3;
  pointer-events: none;
}

#row-continue-watching .continue-mobile-play svg {
  width: 48px;
  height: 48px;
}

#row-continue-watching .continue-progress-track {
  display: none !important;
}

#row-continue-watching .continue-mobile-footer {
  display: flex;
  flex-direction: column;
  background: #161616;
  padding: 0 0 2px;
}

#row-continue-watching .continue-mobile-progress {
  height: 4px;
  margin: 5px 6px 8px;
  border-radius: 999px;
  background: #737373;
  overflow: hidden;
}

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

#row-continue-watching .continue-mobile-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 6px;
  pointer-events: auto;
}

#row-continue-watching .continue-mobile-action-btn {
  width: 44px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  padding: 0;
  opacity: 0.95;
  cursor: pointer;
  pointer-events: auto;
}

#row-continue-watching .continue-mobile-action-btn svg {
  width: 26px;
  height: 26px;
  fill: none;
  display: block;
}

#row-continue-watching .continue-mobile-divider {
  width: 1px;
  height: 18px;
  background: #3d3d3d;
}

/* ===== Search Results (portrait grid) ===== */
.search-results {
  top: 0 !important;
  padding-top: calc(50px + env(safe-area-inset-top, 0px) + 10px) !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
  padding-bottom: 100px !important;
  background: #040202 !important;
  overscroll-behavior-y: contain;
}

/* Keep the search background opaque while results load so the ambient
   home-screen bleed never peeks through. Only the inner content fades. */
body.search-mode .search-results.loading {
  opacity: 1 !important;
}
body.search-mode .search-results.loading > * {
  opacity: 0;
  transition: opacity 0.25s ease;
}
body.search-mode .search-results > * {
  opacity: 1;
  transition: opacity 0.25s ease;
}

.search-results-title {
  font-size: 18px !important;
  font-weight: 100 !important;
  margin-bottom: 12px;
  color: white;
}

.search-results-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px !important;
  flex-wrap: unset !important;
}

.search-results-grid .content-card {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 120 / 170 !important;
  border-radius: 5px !important;
}

/* ===== Modal Similar Grid → portrait ===== */
.modal-similar-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px !important;
  flex-wrap: unset !important;
  flex-direction: unset !important;
}

.modal-similar-grid .content-card {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 110 / 159 !important;
}

/* ===== Episodes list — mobile layout ===== */
.modal-episodes {
  gap: 0 !important;
  padding: 0 10px !important;
}

.modal-episode-card {
  display: grid !important;
  grid-template-columns: minmax(122px, 34%) minmax(0, 1fr) !important;
  grid-template-areas:
    "thumb topline"
    "desc desc" !important;
  column-gap: 4px !important;
  row-gap: 8px !important;
  align-items: flex-start !important;
  padding: 12px 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.modal-episode-card:first-child {
  padding-top: 6px !important;
}

.modal-episode-thumb {
  grid-area: thumb !important;
  width: 100% !important;
  flex-shrink: 0 !important;
  margin-bottom: 0 !important;
}

.modal-episode-thumb img {
  border-radius: 4px !important;
}

.modal-episode-play {
  display: none !important;
}

.modal-episode-topline {
  grid-area: topline !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 1px !important;
  min-width: 0 !important;
  margin-left: 10px !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
  align-self: center !important;
}

.modal-episode-content {
  display: contents !important;
}

.modal-episode-number {
  display: none !important;
}

.modal-episode-number::after {
  content: none !important;
}

.modal-episode-title {
  font-size: 0.95rem !important;
  font-weight: 400 !important;
  line-height: 1.16 !important;
  margin: 0 !important;
  margin-right: 0 !important;
  white-space: normal !important;
  color: #fff !important;
  min-width: 0 !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-episode-runtime {
  display: block !important;
  margin-top: 1px !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
  text-indent: 0 !important;
  align-self: flex-start !important;
  font-size: 0.82rem !important;
  line-height: 1.1 !important;
  font-weight: 400 !important;
  color: rgb(170 170 170) !important;
}

.modal-episode-desc {
  grid-area: desc !important;
  margin: 0 !important;
  padding-top: 0 !important;
  color: rgb(255 255 255 / 72%) !important;
  -webkit-line-clamp: 2 !important;
  font-size: 15px !important;
  line-height: 1.4 !important;
  font-weight: 300 !important;
}

/* ===== Bottom Tab Bar ===== */
.mobile-tab-bar {
  display: flex !important;
  position: fixed !important;
  inset: auto 0 0 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 200;
  width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box;

  background: rgb(30 30 30 / 56%) !important;
  backdrop-filter: blur(75px) saturate(1.17) !important;
  -webkit-backdrop-filter: blur(75px) saturate(1.17) !important;

  padding: 7px 0 8px;
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 8px);
  justify-content: space-around;
  align-items: flex-end;
  padding-left: 30px;
  padding-right: 10px;
  transform: translateZ(0);
  will-change: transform;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.58rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  padding: 2px 16px;
  transition: color 0.2s;
}

.tab-item.active {
  color: #fff;
}

/* .tab-item svg sizes are set inline per icon */

/* ===== Hide scroll arrows on mobile ===== */
.row-wrapper:hover .row-arrow {
  display: none !important;
}


/* ===== Mobile Profile Overlay ===== */
.mobile-profile-overlay {
  display: block !important;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.mobile-profile-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-profile-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #141414;
  border-radius: 16px 16px 0 0;
  padding: 24px 20px max(24px, env(safe-area-inset-bottom));
  max-height: 70vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.33, 1, 0.68, 1);
}

.mobile-profile-overlay.open .mobile-profile-panel {
  transform: translateY(0);
}

.mobile-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.mobile-profile-header h2 {
  font-size: 1.25rem;
  font-weight: 500;
  color: #fff;
  margin: 0;
}

.mobile-profile-close {
  background: none;
  border: none;
  color: #fff;
  padding: 8px;
  cursor: pointer;
}

.mobile-profile-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  color: #fff;
  font-size: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-profile-setting:last-child {
  border-bottom: none;
}

.mobile-profile-action {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
}

.mobile-profile-action:active {
  background: rgba(255, 255, 255, 0.15);
}

/* ===== Search mode ===== */
body.search-mode {
  background: #040202 !important;
}
body.search-mode .mobile-filters,
body.search-mode .mobile-featured-section {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
body.search-mode .mobile-tab-bar {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: #040202 !important;
}

/* ===== Modal & Video: Top Safe Area (iPhone notch/status bar) ===== */
/* JS adds .modal-mobile-hard-hidden on close (iOS PWA) — belt-and-suspenders with inline styles */
#contentModal.modal-mobile-hard-hidden {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: none !important;
}

#contentModal.modal-mobile-hard-hidden > .content-modal {
  transition: none !important;
  transform: translateY(110%) !important;
  opacity: 0 !important;
}

/* Keep the notch/status bar area black; content starts below it */
.modal-overlay {
  padding-top: env(safe-area-inset-top, 0px) !important;
  background: #000 !important;
  opacity: 0 !important;
  visibility: hidden;
  transition: opacity 0.24s ease, visibility 0s linear 0.24s !important;
}

.modal-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
  transition: opacity 0.24s ease, visibility 0s linear 0s !important;
}

/* Slide the modal sheet up from the bottom as one piece */
.content-modal {
  transform: translateY(100%) !important;
  opacity: 1 !important;
  transition: transform 0.58s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.modal-overlay.active .content-modal {
  transform: translateY(calc(0px + var(--modal-sheet-drag-y, 0px))) !important;
}

.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-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-overlay.modal-animating-from-card .content-modal {
  transform: translate3d(var(--modal-enter-x, 0px), var(--modal-enter-y, 0px), 0) scale(var(--modal-enter-scale, 0.9)) !important;
  transform-origin: var(--modal-origin-x, 50%) var(--modal-origin-y, 50%) !important;
}

.modal-overlay.active.modal-ready.modal-animating-from-card .content-modal {
  transform: translate3d(0, calc(0px + var(--modal-sheet-drag-y, 0px)), 0) scale(1) !important;
}

/* Backdrop fades in smoothly when loaded — no pop */
.modal-backdrop {
  opacity: 0;
  transition: opacity 0.22s ease !important;
}

.modal-backdrop.backdrop-loaded {
  opacity: 1 !important;
}

/* Explicit black bar behind status bar when modal is open (PWA) */
.modal-overlay.active::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: env(safe-area-inset-top, 0px);
  background: #000;
  z-index: 1001;
}

body.modal-open {
  background: #000 !important;
}

body.modal-closing {
  background: #000 !important;
}

.content-modal .modal-header-buttons {
  top: 10px;
}

/* Drag-to-dismiss affordance (mobile sheet) */
.modal-drag-handle {
  display: none;
}

@media (max-width: 768px), (max-height: 600px) {
  .content-modal {
    position: relative;
  }

  /* Close/cast must sit above the full-width drag strip (handle is z-index 40) so taps reach the buttons. */
  .content-modal .modal-header-buttons {
    z-index: 50 !important;
  }

  .modal-drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 4px;
    left: 0;
    right: 0;
    z-index: 40 !important;
    height: 36px;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    cursor: grab;
  }

  .modal-drag-handle-pill {
    width: 40px;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.4);
  }

  /* Prefer our pointer handlers for vertical dismiss on hero/backdrop (not inner scroll areas). */
  .modal-hero {
    touch-action: none;
  }

  .modal-overlay.active.modal-sheet-dragging .content-modal {
    transition: none !important;
  }
}

.modal-description-wrapper {
  font-size: 14px;
}

.modal-description-short,
.modal-description-full {
  font-size: 14px;
}

.video-player-overlay {
  background: #000 !important;
  overscroll-behavior: contain;
}

/* Immersive fallback when native Fullscreen API fails (common on iOS Safari). */
.video-player-overlay.player-pseudo-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100dvh !important;
  min-height: -webkit-fill-available !important;
  z-index: 2147483646 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #000 !important;
  overscroll-behavior: none !important;
}

.video-player-overlay.player-pseudo-fullscreen .video-player-shell {
  width: 100% !important;
  height: 100% !important;
  min-height: 100dvh !important;
  min-height: -webkit-fill-available !important;
}

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

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

/* Hide desktop close button on mobile — custom controls have their own */
.video-player-close {
  display: none !important;
}

.video-player-shell {
  padding-top: 0;
  box-sizing: border-box;
  touch-action: pan-x pan-y;
  overscroll-behavior: contain;
}

/* Video fills screen; pinch-to-zoom scales it */
.video-player {
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  object-fit: contain;
  background: #000;
  transition: object-fit 0.2s ease;
  /* Critical: let touches pass through to our overlay on iOS */
  pointer-events: none !important;
}

.video-player.zoomed {
  object-fit: cover;
}

/* ===== Custom Mobile Player Controls ===== */
.m-player-controls {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex !important;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: auto !important;
  touch-action: pan-x pan-y;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.m-player-controls.hidden {
  opacity: 0;
  pointer-events: auto !important; /* Stay tappable when hidden so tap-to-show works in landscape */
}

/* Gradient overlays for readability */
.m-player-controls::before,
.m-player-controls::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: -1;
}

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

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

/* ----- Top bar ----- */
.m-player-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 16px 0;
}

.m-player-cast,
.m-player-close-btn {
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.m-player-cast svg,
.m-player-close-btn svg {
  opacity: 0.9;
}

.m-player-title {
  flex: 1;
  text-align: center;
  color: #fff;
  font-size: 16px;
  font-weight: 300;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 8px;
}

/* ----- Center controls ----- */
.m-player-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
}

.m-player-seek-btn {
  width: 52px;
  height: 52px;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  opacity: 0.85;
}

.m-player-seek-btn svg {
  width: 40px;
  height: 40px;
}

.m-player-play-btn {
  width: 72px;
  height: 72px;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.m-player-play-btn svg {
  width: 44px;
  height: 50px;
}

.m-icon-pause {
  width: 30px !important;
  height: 42px !important;
}

/* ----- Bottom bar ----- */
.m-player-bottom {
  padding: 0 16px calc(env(safe-area-inset-bottom, 0px) + 10px);
}

/* Progress bar */
.m-player-progress {
  position: relative;
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.25);
  border-radius: 2px;
  cursor: pointer;
  touch-action: none;
}

.m-progress-played {
  height: 100%;
  background: #e50914;
  border-radius: 2px;
  width: 0%;
  pointer-events: none;
}

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

/* Enlarge hit area while scrubbing */
.m-player-progress.scrubbing {
  height: 6px;
}

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

.m-player-time {
  display: flex;
  justify-content: flex-end;
  padding: 6px 0 4px;
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Bottom buttons row */
.m-player-bottom-btns {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 12px;
  padding-top: 2px;
}

/* Fullscreen in mobile browser only — hidden when installed as Home Screen PWA */
.m-player-bottom-fullscreen-btn {
  min-width: 44px;
  justify-content: center;
  padding: 6px 10px;
}

.m-player-bottom-fullscreen-btn svg {
  width: 26px;
  height: 26px;
}

html.pwa-standalone .m-player-bottom-fullscreen-btn {
  display: none !important;
}

.m-player-bottom-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: 6px 8px;
}

.m-player-bottom-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* Audio & Subtitles panel */
.m-player-audio-subtitles-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  border-radius: 16px 16px 0 0;
  max-height: 50vh;
  transform: translateY(100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s ease, opacity 0.2s ease, visibility 0.2s ease;
  z-index: 10;
  pointer-events: none;
}

.m-player-audio-subtitles-panel.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.m-audio-subtitles-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.m-audio-subtitles-header span {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.m-audio-subtitles-close {
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 20px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.m-audio-subtitles-content {
  padding: 16px 20px 24px;
  max-height: 40vh;
  overflow-y: auto;
}

.m-audio-subtitles-section {
  margin-bottom: 20px;
}

.m-audio-subtitles-section:last-child {
  margin-bottom: 0;
}

.m-audio-subtitles-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.m-audio-subtitles-option {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin-bottom: 6px;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border: 2px solid transparent;
  transition: background 0.2s, border-color 0.2s;
}

.m-audio-subtitles-option:last-child {
  margin-bottom: 0;
}

.m-audio-subtitles-option:hover,
.m-audio-subtitles-option:active {
  background: rgba(255, 255, 255, 0.15);
}

.m-audio-subtitles-option.selected {
  border-color: #e50914;
  background: rgba(229, 9, 20, 0.2);
}

.m-audio-subtitles-option .check {
  margin-left: auto;
  color: #e50914;
  font-weight: 700;
}

.m-audio-subtitles-empty {
  padding: 12px 14px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
}

/* ===== Modal — Mobile Layout Overrides ===== */
body.page-loaded.modal-open {
}

.modal-hero .modal-hero-content {
  display: none !important;
}

.modal-hero-content-mobile {
  display: block !important;
}

.modal-hero-gradient {
  display: none;
}

img.modal-logo.modal-logo-mobile {
  display: none !important;
}

.modal-actions.modal-actions-mobile {
  position: relative;
  gap: 10px;
  display: flex;
  flex-direction: column;
}

img.modal-backdrop {
  position: relative;
}

.modal-hero {
  position: relative;
  border-radius: 20px 20px 0px 0px;
}

.modal-hero-content.modal-hero-content-mobile {
  position: relative;
  left: unset;
  right: unset;
  top: -0.85vh;
}

.modal-meta span {
  font-weight: 100;
}

button.modal-btn.modal-btn-play {
  width: -webkit-fill-available;
  position: relative;
  margin-top: 1px;
  display: flex;
  flex-direction: row;
  font-size: 16px;
  flex-wrap: wrap;
  justify-content: center;
  font-weight: 600;
}

button.modal-btn.modal-btn-download {
  background: rgb(255 255 255 / 15%);
  width: -webkit-fill-available;
  height: 40px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
}

span.modal-cast-list {
}

p.modal-cast {
  color: rgb(255 255 255 / 30%) !important;
}

span.modal-label {
  color: rgb(255 255 255 / 30%) !important;
}

span.modal-genre-list {
  color: rgb(255 255 255 / 30%) !important;
}

h1.modal-title-text.modal-title-mobile {
  display: block !important;
  font-size: 19px;
  font-weight: 600;
  margin: 0;
  margin-bottom: 7px;
}

.modal-info {
  padding-top: 11px;      
  padding-left: 13px;
  padding-right: 13px;
  padding-bottom: 7px;
}

select#seasonSelector {
  appearance: none !important;
  -webkit-appearance: none !important;
  background-color: transparent !important;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.5 3.75L6 8.25L10.5 3.75' stroke='%239A9A9A' stroke-width='1.125'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right center !important;
  background-size: 12px 12px !important;
  padding-left: 0 !important;
  padding-right: 20px !important;
  font-size: 16px !important;
  font-weight: normal !important;
}

#seasonSelector {
  font-size: 17px !important;
  color: #9a9a9a;
}

.content-modal {
  background: rgb(0 0 0 / 70%);
  backdrop-filter: blur(78px) saturate(120%);
  -webkit-backdrop-filter: blur(78px) saturate(120%);
}

div#contentModal {
  background: none !important;
  border-radius: 15px 15px 0px 0px;
}

.modal-section-header {
  margin-bottom: 0 !important;
}

.modal-section-title {
  margin-left: -15px !important;
  margin-bottom: 15px;
}

.modal-bottom svg {
  margin-bottom: 15px;
  margin-top: -5px;
}

.modal-bottom,
#modalBottomContent {
  background: #10101000;
}

.modal-overlay.modal-movie-loading-bottom #modalBottomContent {
  min-height: 170px;
}

.modal-similar-loading-surface {
  min-height: 150px;
  border-radius: 0;
  padding: 0;
  background: #101010;
}

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

.modal-similar-loading-card {
  aspect-ratio: 110 / 159;
  border-radius: 5px;
}
.modal-section-title {display:none;}
.tabbed-primary-navigation {display: none !important;}

.sports-event-card .sports-ev-team-img {
  max-height: 40px;
}
.sports-ch-logo {
  width: 60%;
}
.content-card.sports-channel-card {
  margin: 0px 1.5px;
}
