/* ─── RESET + ROOT ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0A0A0A;
  --bg-elevated: #141414;
  --bg-card:     #1F1F1F;
  --red:         #E50914;
  --red-dark:    #B0060F;
  --gold:        #FFC93C;
  --text:        #FFFFFF;
  --muted:       #B3B3B3;
  --dim:         #808080;
  --chip-bg:     #2A2A2A;
  --chip-active: #E50914;
  --radius:      6px;
  --nav-h:       60px;
  --transition:  .18s ease;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; color: inherit; font: inherit; }
input, button { outline: none; }
input:focus { outline: 2px solid var(--red); outline-offset: 2px; }
a { color: inherit; text-decoration: none; }

.hidden { display: none !important; }
.page { min-height: 100vh; }

/* ─── SPLASH ──────────────────────────────────────────────────────────────── */
#splash {
  position: relative;
  min-height: 100vh;
  background: #A0D4F4 url('wadeondemand.png') center center / contain no-repeat;
}
.splash-logo { display: none; }
.splash-wordmark { display: none; }
.splash-spinner {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px; height: 36px;
  border: 3px solid rgba(0,0,0,.2);
  border-top-color: #0A0A0A;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

/* ─── LOGIN ───────────────────────────────────────────────────────────────── */
#login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
  padding: 20px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-elevated);
  border-radius: 12px;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.login-logo { width: 72px; height: 72px; object-fit: contain; border-radius: 16px; }
.login-wordmark { font-size: 20px; font-weight: 700; color: var(--text); }
.login-heading { font-size: 22px; font-weight: 600; align-self: flex-start; }

.field-wrap { width: 100%; position: relative; }
.field-wrap input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid #333;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  transition: border-color var(--transition);
}
.field-wrap input:focus { border-color: var(--red); }
.pw-wrap input { padding-right: 44px; }
.pw-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 16px; opacity: .7; padding: 4px 6px;
}
.pw-toggle:hover { opacity: 1; }

.login-error {
  width: 100%;
  padding: 10px 14px;
  background: rgba(229,9,20,.15);
  border: 1px solid rgba(229,9,20,.4);
  border-radius: var(--radius);
  color: #ff6b6b;
  font-size: 13px;
}
.login-spinner { margin-top: 4px; }

/* ─── PROFILE SELECT ─────────────────────────────────────────────────────── */
#profileSelect {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
  gap: 40px;
  padding: 40px 20px;
}
.profile-who { font-size: 32px; font-weight: 300; letter-spacing: -0.5px; }
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 24px;
  max-width: 600px;
  width: 100%;
  justify-items: center;
}
.profile-tile {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  cursor: pointer;
}
.profile-tile:hover .avatar { transform: scale(1.06); }
.avatar {
  width: 76px; height: 76px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; color: #fff;
  transition: transform var(--transition);
  flex-shrink: 0;
}
.profile-tile .profile-name {
  font-size: 14px; color: var(--muted); text-align: center;
  max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.profile-tile:hover .profile-name { color: var(--text); }
.mt-lg { margin-top: 8px; }

/* ─── BUTTONS ─────────────────────────────────────────────────────────────── */
.btn-red {
  padding: 10px 24px;
  background: var(--red);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  transition: background var(--transition), transform .12s;
}
.btn-red:hover { background: #f00; }
.btn-red:active { transform: scale(.97); }
.btn-red.full-w { width: 100%; }

.btn-red-sm {
  padding: 8px 16px;
  background: var(--red);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius);
  white-space: nowrap;
}
.btn-red-sm:hover { background: #f00; }

.btn-outline {
  padding: 10px 20px;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  background: rgba(255,255,255,.08);
  transition: background var(--transition), border-color var(--transition);
}
.btn-outline:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.7); }

.btn-outline-sm {
  padding: 7px 14px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: var(--radius);
  font-size: 12px;
  background: rgba(255,255,255,.07);
  transition: background var(--transition);
}
.btn-outline-sm:hover { background: rgba(255,255,255,.14); }
.btn-outline-sm.danger { color: #ff6b6b; border-color: rgba(255,107,107,.4); }
.btn-outline-sm.danger:hover { background: rgba(255,107,107,.12); }

.icon-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 18px;
  transition: background var(--transition);
  flex-shrink: 0;
}
.icon-btn:hover { background: rgba(255,255,255,.1); }

/* ─── NAVBAR ──────────────────────────────────────────────────────────────── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--nav-h);
  background: linear-gradient(to bottom, rgba(10,10,10,.95) 0%, rgba(10,10,10,.7) 100%);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  gap: 12px;
}
.nav-left { display: flex; align-items: center; gap: 12px; overflow: hidden; }
.nav-brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-logo-img { width: 32px; height: 32px; object-fit: contain; border-radius: 6px; }
.nav-brand-text {
  font-size: 15px; font-weight: 700; color: var(--text); white-space: nowrap;
  letter-spacing: -0.3px;
}
.hamburger-icon {
  display: block; width: 20px; height: 14px;
  background: linear-gradient(
    to bottom,
    currentColor 0%, currentColor 2px,
    transparent 2px, transparent 6px,
    currentColor 6px, currentColor 8px,
    transparent 8px, transparent 12px,
    currentColor 12px, currentColor 14px
  );
}

.nav-chips { display: flex; align-items: center; gap: 4px; overflow: hidden; }
.nav-chip {
  padding: 6px 14px;
  font-size: 14px; font-weight: 500;
  color: var(--muted);
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
}
.nav-chip:hover { color: var(--text); }
.nav-chip.active {
  color: var(--text); font-weight: 600;
  background: rgba(255,255,255,.1);
}

.nav-right { display: flex; align-items: center; flex-shrink: 0; }

/* ─── SEARCH BAR ──────────────────────────────────────────────────────────── */
#searchBar {
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 49;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
#searchInput {
  flex: 1;
  padding: 9px 14px;
  background: var(--bg-card);
  border: 1px solid #333;
  border-radius: 20px;
  color: var(--text);
  font-size: 14px;
}
#searchInput:focus { border-color: var(--red); }

/* ─── DRAWER ──────────────────────────────────────────────────────────────── */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(2px);
}
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 61;
  width: 280px;
  background: var(--bg-elevated);
  border-right: 1px solid rgba(255,255,255,.08);
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform .25s ease;
}
.drawer.open { transform: translateX(0); }
.drawer-head { padding: 60px 20px 16px; }
.drawer-profile-name { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.drawer-link-sm {
  font-size: 13px; color: var(--red); font-weight: 500;
  transition: opacity var(--transition);
}
.drawer-link-sm:hover { opacity: .8; }
.drawer-divider { height: 1px; background: rgba(255,255,255,.08); margin: 8px 0; }
.drawer-nav { padding: 8px 0 40px; }
.drawer-section-label {
  display: block; padding: 12px 20px 4px;
  font-size: 11px; font-weight: 600; letter-spacing: .08em;
  color: var(--dim); text-transform: uppercase;
}
.drawer-link {
  display: block; width: 100%;
  padding: 11px 20px;
  text-align: left; font-size: 14px;
  color: var(--muted);
  transition: color var(--transition), background var(--transition);
}
.drawer-link:hover { color: var(--text); background: rgba(255,255,255,.05); }

/* ─── CONTENT AREA ────────────────────────────────────────────────────────── */
#content {
  padding-top: var(--nav-h);
  min-height: 100vh;
}
.view-panel { min-height: calc(100vh - var(--nav-h)); }

/* ─── HERO CAROUSEL ───────────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 70vh;
  min-height: 400px;
  max-height: 700px;
  overflow: hidden;
  background: #111;
}
.hero-slides { position: relative; width: 100%; height: 100%; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center top;
  opacity: 0; transition: opacity .6s ease;
}
.hero-slide.active { opacity: 1; }
.hero-slide::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    to right,
    rgba(10,10,10,.95) 0%,
    rgba(10,10,10,.7) 40%,
    rgba(10,10,10,.1) 100%
  ),
  linear-gradient(
    to top,
    rgba(10,10,10,.9) 0%,
    transparent 40%
  );
}
.hero-content {
  position: absolute; bottom: 80px; left: 5%; right: 50%;
  z-index: 2;
}
.hero-title {
  font-size: clamp(22px, 4vw, 44px);
  font-weight: 700; line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
  margin-bottom: 10px;
}
.hero-overview {
  font-size: 14px; color: var(--muted); line-height: 1.5;
  max-width: 420px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 20px;
  text-shadow: 0 1px 4px rgba(0,0,0,.8);
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-dots {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 3;
}
.hero-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.35); cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.hero-dot.active { background: #fff; transform: scale(1.2); }

/* ─── SECTIONS ────────────────────────────────────────────────────────────── */
.sections-container { padding: 0 0 60px; }
.section-row { margin-top: 32px; }
.section-row-header {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 0 16px 10px;
}
.section-row-title { font-size: 18px; font-weight: 600; white-space: nowrap; }
.section-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 5px 12px;
  background: var(--chip-bg);
  border-radius: 14px;
  font-size: 12px; font-weight: 500; color: var(--muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.chip:hover { color: var(--text); background: #3a3a3a; }
.chip.active { background: var(--chip-active); color: #fff; }

/* horizontal scrolling row */
.h-scroll {
  overflow-x: auto;
  padding: 4px 16px 12px;
  -ms-overflow-style: none; scrollbar-width: none;
}
.h-scroll::-webkit-scrollbar { display: none; }
.h-scroll-inner { display: flex; gap: 10px; }

/* ─── POSTER CARD ─────────────────────────────────────────────────────────── */
.poster-card {
  position: relative;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.poster-card:hover { transform: scale(1.05); box-shadow: 0 8px 24px rgba(0,0,0,.6); z-index: 2; }
.poster-card img {
  width: 100%; height: 100%; object-fit: cover;
  background: var(--bg-card);
  display: block;
}
.poster-card .poster-title-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px 8px 6px;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  font-size: 11px; font-weight: 500; color: var(--muted);
  text-align: center;
}
/* Grid card: portrait 2:3 */
.poster-card.grid-card { width: 140px; height: 210px; }
/* Horizontal card: wider portrait */
.poster-card.h-card { width: 130px; height: 195px; }

/* progress bar on continue-watching cards */
.progress-bar-wrap {
  position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: rgba(255,255,255,.2);
}
.progress-bar-fill { height: 100%; background: var(--red); }

/* ─── POSTER GRID ─────────────────────────────────────────────────────────── */
.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  padding: 16px;
}
.poster-grid .poster-card { width: 100%; height: 0; padding-bottom: 150%; position: relative; }
.poster-grid .poster-card img { position: absolute; inset: 0; width: 100%; height: 100%; }
.poster-grid .poster-card .poster-title-overlay { position: absolute; }

/* ─── FILTER CHIPS (category view) ───────────────────────────────────────── */
.filter-chips {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 16px 16px 0;
  position: sticky; top: var(--nav-h); z-index: 10;
  background: var(--bg);
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}

/* ─── PROVIDERS SECTION ───────────────────────────────────────────────────── */
.providers-block { margin-top: 24px; }
.providers-toggle-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 0 16px 10px;
}
.providers-title { font-size: 18px; font-weight: 600; margin-right: 4px; }
.providers-subtitle { font-size: 13px; color: var(--muted); padding: 0 16px 8px; }
.provider-logos {
  overflow-x: auto; padding: 4px 16px 12px;
  -ms-overflow-style: none; scrollbar-width: none;
}
.provider-logos::-webkit-scrollbar { display: none; }
.provider-logos-inner { display: flex; gap: 10px; }
.provider-logo-card {
  flex-shrink: 0; width: 64px; height: 64px; border-radius: 14px;
  overflow: hidden; cursor: pointer;
  border: 2px solid transparent;
  background: var(--bg-card);
  transition: border-color var(--transition), transform var(--transition);
}
.provider-logo-card:hover { transform: scale(1.08); }
.provider-logo-card.selected { border-color: var(--red); }
.provider-logo-card img { width: 100%; height: 100%; object-fit: cover; }
.provider-logo-card .provider-initial {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; padding: 4px;
}
.providers-titles-heading { font-size: 15px; font-weight: 600; padding: 12px 16px 6px; }

/* ─── GENRES VIEW ─────────────────────────────────────────────────────────── */
.genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  padding: 24px 16px;
}
.genre-tile {
  height: 80px; border-radius: 10px;
  background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition);
  border: 1px solid rgba(255,255,255,.07);
}
.genre-tile:hover { transform: scale(1.03); background: #2a2a2a; }
.genre-results-header {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 16px 0;
}
.genre-results-title { font-size: 20px; font-weight: 600; }

/* ─── EMPTY + SPINNER ─────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; color: var(--dim);
  padding: 60px 20px; font-size: 15px;
}
.page-spinner {
  display: flex; align-items: center; justify-content: center;
  padding: 60px 20px;
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(255,255,255,.15);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.spinner.mt-md { margin-top: 16px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── MODAL BASE ──────────────────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 80;
  background: var(--bg);
  overflow: hidden;
}

/* ─── DETAIL MODAL ────────────────────────────────────────────────────────── */
.detail-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center top;
  opacity: .35;
}
.detail-bg-grad {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(10,10,10,.5) 0%, rgba(10,10,10,.95) 40%, var(--bg) 70%);
}
#detailClose {
  position: fixed; top: 16px; right: 16px; z-index: 5;
  width: 36px; height: 36px;
  background: rgba(0,0,0,.6); border-radius: 50%;
  font-size: 16px; color: var(--text);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
  transition: background var(--transition);
}
#detailClose:hover { background: rgba(0,0,0,.85); }

.detail-scroll {
  position: relative; z-index: 2;
  height: 100vh; overflow-y: auto;
  padding: 60px 16px 80px;
  -ms-overflow-style: none; scrollbar-width: none;
}
.detail-scroll::-webkit-scrollbar { display: none; }

.detail-layout {
  display: flex; gap: 28px; align-items: flex-start;
  max-width: 900px; margin: 0 auto;
}
.detail-poster-col { flex-shrink: 0; }
.detail-poster { width: 160px; border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,.7); }
.detail-info-col { flex: 1; min-width: 0; }
.detail-title { font-size: clamp(20px, 3.5vw, 36px); font-weight: 700; line-height: 1.15; margin-bottom: 10px; }

.detail-meta-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted); margin-bottom: 10px;
}
.type-badge {
  padding: 2px 8px; background: rgba(255,255,255,.12); border-radius: 4px;
  font-size: 11px; font-weight: 600; letter-spacing: .05em; color: var(--text);
}
.rating-star { color: var(--gold); font-weight: 600; }

.genre-chips-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.genre-chip {
  padding: 4px 10px;
  background: rgba(255,255,255,.1); border-radius: 12px;
  font-size: 12px; color: var(--muted);
}

.ext-ratings {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px;
}
.rating-badge {
  padding: 4px 10px;
  background: rgba(255,255,255,.07);
  border-radius: var(--radius);
  font-size: 12px; font-weight: 700;
}

.detail-overview {
  font-size: 14px; line-height: 1.65; color: var(--muted);
  margin-bottom: 20px; max-width: 680px;
}
.detail-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }

.detail-section { margin-top: 24px; }
.section-label { font-size: 16px; font-weight: 600; margin-bottom: 12px; }

/* ─── CAST ROW ────────────────────────────────────────────────────────────── */
.cast-row {
  display: flex; gap: 12px;
  overflow-x: auto; padding-bottom: 8px;
  -ms-overflow-style: none; scrollbar-width: none;
}
.cast-row::-webkit-scrollbar { display: none; }
.cast-card {
  flex-shrink: 0; width: 80px; text-align: center;
  cursor: pointer;
}
.cast-card:hover .cast-photo { transform: scale(1.05); }
.cast-photo {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  background: var(--bg-card); margin: 0 auto 6px;
  transition: transform var(--transition);
}
.cast-name { font-size: 11px; font-weight: 600; line-height: 1.3; }
.cast-character { font-size: 10px; color: var(--dim); }

/* ─── EPISODE LIST ────────────────────────────────────────────────────────── */
.season-chips-row {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px;
}
.season-chip {
  padding: 6px 14px;
  background: var(--chip-bg); border-radius: 14px;
  font-size: 12px; font-weight: 600; color: var(--muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.season-chip.active { background: var(--chip-active); color: #fff; }

.episode-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.episode-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: var(--bg-card); border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
}
.episode-item:hover { background: #292929; }
.ep-num { font-size: 13px; font-weight: 700; color: var(--dim); min-width: 28px; }
.ep-thumb {
  width: 100px; height: 56px; object-fit: cover;
  border-radius: 4px; background: #1a1a1a; flex-shrink: 0;
}
.ep-info { flex: 1; min-width: 0; }
.ep-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-overview { font-size: 11px; color: var(--muted); margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ─── RECOMMENDATIONS ROW ─────────────────────────────────────────────────── */
.h-scroll-row {
  display: flex; gap: 10px;
  overflow-x: auto; padding-bottom: 8px;
  -ms-overflow-style: none; scrollbar-width: none;
}
.h-scroll-row::-webkit-scrollbar { display: none; }

/* ─── PLAYER MODAL ────────────────────────────────────────────────────────── */
.player-modal {
  background: #000;
  display: flex; align-items: center; justify-content: center;
}
.player-back-fixed {
  position: absolute; top: 14px; right: 14px; z-index: 20;
  background: rgba(0,0,0,.7); color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  padding: 7px 16px; border-radius: 6px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  pointer-events: auto;
  transition: background var(--transition);
}
.player-back-fixed:hover { background: rgba(0,0,0,.95); }
.player-frame {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: none;
}
.player-status {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; background: rgba(0,0,0,.85);
  text-align: center; padding: 20px;
}
.player-status-title { font-size: 18px; font-weight: 600; }
.player-status-msg { color: var(--muted); }
.player-status.hidden { display: none; }

.player-controls {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column;
  pointer-events: none; /* container never blocks clicks — only buttons do */
}

.player-top, .player-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  pointer-events: none; /* gradient bars pass clicks through */
}
.player-top { background: linear-gradient(to bottom, rgba(0,0,0,.75) 0%, transparent 100%); }
.player-bottom {
  margin-top: auto;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, transparent 100%);
  justify-content: flex-end;
}
.player-top-right { display: flex; gap: 8px; pointer-events: none; }
.player-center {
  flex: 1;
  display: flex; align-items: flex-end; justify-content: flex-start;
  padding: 0 16px 16px;
  pointer-events: none;
}
/* Re-enable events only on the actual buttons */
.player-ctrl-btn, .skip-intro-btn { pointer-events: auto; }
.player-ctrl-btn {
  padding: 8px 16px;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius);
  font-size: 13px; font-weight: 500; color: var(--text);
  transition: background var(--transition);
}
.player-ctrl-btn:hover { background: rgba(0,0,0,.85); }
.player-ctrl-btn.next-ep { color: #fff; background: rgba(229,9,20,.75); border-color: var(--red); }

.skip-intro-btn {
  padding: 10px 20px;
  background: rgba(0,0,0,.8); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.25); border-radius: 4px;
  font-size: 14px; font-weight: 600; color: var(--text);
}
.skip-intro-btn:hover { background: rgba(255,255,255,.12); }

.autoplay-card {
  position: absolute; bottom: 80px; right: 24px; z-index: 6;
  background: rgba(10,10,10,.92); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.15); border-radius: 10px;
  padding: 18px 22px;
  min-width: 220px; text-align: center;
}
.autoplay-countdown { font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.autoplay-actions { display: flex; gap: 10px; justify-content: center; }

.trailer-close-btn {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  width: 36px; height: 36px;
  background: rgba(0,0,0,.6); border-radius: 50%;
  font-size: 16px; color: var(--text);
  display: flex; align-items: center; justify-content: center;
}

/* ─── PANEL MODALS (My Lists, Settings) ───────────────────────────────────── */
.modal-panel-wrap {
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-panel {
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  background: var(--bg-elevated);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.1);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.modal-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.modal-panel-head h2 { font-size: 18px; font-weight: 600; }
.modal-close {
  width: 32px; height: 32px;
  background: rgba(255,255,255,.1); border-radius: 50%;
  font-size: 14px; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.modal-close:hover { background: rgba(255,255,255,.2); color: var(--text); }

/* My Lists */
.list-profile-tabs {
  display: flex; gap: 4px; flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.profile-tab {
  padding: 6px 14px;
  background: var(--chip-bg); border-radius: 14px;
  font-size: 12px; font-weight: 500; color: var(--muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.profile-tab.active { background: var(--chip-active); color: #fff; }
.my-lists-grid { overflow-y: auto; max-height: 60vh; -ms-overflow-style: none; scrollbar-width: none; }
.my-lists-grid::-webkit-scrollbar { display: none; }

/* Settings */
.settings-body { padding: 8px 0 20px; overflow-y: auto; }
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.settings-label { font-size: 14px; }
.settings-divider { height: 8px; background: rgba(255,255,255,.03); margin: 8px 0; }

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute; inset: 0;
  background: #444; border-radius: 12px;
  cursor: pointer;
  transition: background var(--transition);
}
.toggle-track::after {
  content: ''; position: absolute;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px;
  transition: transform .2s ease;
}
.toggle-switch input:checked + .toggle-track { background: var(--red); }
.toggle-switch input:checked + .toggle-track::after { transform: translateX(20px); }

/* ─── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .nav-brand-text { display: none; }
  .nav-chips { gap: 0; }
  .nav-chip { padding: 6px 10px; font-size: 13px; }
  .hero { height: 56vh; min-height: 300px; }
  .hero-content { bottom: 60px; right: 8%; }
  .hero-title { font-size: 20px; }
  .hero-overview { display: none; }
  .detail-layout { flex-direction: column; }
  .detail-poster { width: 120px; }
  .poster-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; padding: 10px; }
}

@media (min-width: 900px) {
  .poster-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .detail-poster { width: 200px; }
  .episode-list { max-height: 400px; overflow-y: auto; -ms-overflow-style: none; scrollbar-width: none; }
  .episode-list::-webkit-scrollbar { display: none; }
}
