/* ============================================================
   Orion Entertainment — Netflix-inspired, dark-blue palette
   ============================================================ */

:root {
  --bg: #040815;
  --bg-2: #0b1227;
  --bg-3: #131a33;
  --surface: #121a33;
  --surface-2: #1a2345;
  --border: rgba(255, 255, 255, 0.07);
  --border-2: rgba(255, 255, 255, 0.14);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --dim: rgba(255, 255, 255, 0.48);
  --accent: #4a6bd8;
  --accent-2: #2a3d90;
  --grad: linear-gradient(135deg, #4a6bd8, #2a3d90);
  --nav-h: 68px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Netflix Sans", "NetflixSans", "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  letter-spacing: -0.005em;
  font-size: 15px;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
img { display: block; max-width: 100%; }

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  transition: background 0.3s ease;
  background: linear-gradient(180deg, rgba(10,14,26,0.9) 0%, rgba(10,14,26,0) 100%);
}
.nav.scrolled {
  background: rgba(10, 14, 26, 0.92);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; gap: 1.75rem;
  height: 100%;
  padding: 0 3rem;
  max-width: 1800px;
  margin: 0 auto;
}
.logo {
  display: flex; align-items: center; gap: 0.5rem;
  margin-right: 0.5rem;
  transition: opacity 0.15s;
}
.logo:hover { opacity: 0.85; }
.logo-mark {
  filter: drop-shadow(0 1px 4px rgba(50, 80, 200, 0.4));
}
.logo {
  gap: 0.35rem;
  position: relative;
  transition: transform 0.2s;
}
.logo:hover { transform: translateY(-1px); }
.logo-text {
  font-family: "Inter", -apple-system, sans-serif;
  font-weight: 900;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
  line-height: 1;
  background: linear-gradient(180deg,
    #6a8cff 0%,
    #3d5cc8 28%,
    #1e2d74 62%,
    #0d1547 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter:
    drop-shadow(0 1px 0 rgba(10, 18, 55, 0.9))
    drop-shadow(0 2px 4px rgba(30, 45, 116, 0.55))
    drop-shadow(0 0 14px rgba(95, 130, 220, 0.25));
  text-shadow: 0 1px 0 rgba(255,255,255,0.05);
  padding-right: 0.05em;
}
.logo-tv {
  font-family: "Inter", -apple-system, sans-serif;
  font-weight: 900;
  font-size: 1.65rem;
  letter-spacing: -0.015em;
  line-height: 1;
  color: #ffffff;
  background: linear-gradient(180deg, #ffffff 0%, #e4e9ff 50%, #c6d2ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter:
    drop-shadow(0 1px 0 rgba(0, 0, 0, 0.35))
    drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45))
    drop-shadow(0 0 12px rgba(255, 255, 255, 0.15));
}
.primary-nav { display: flex; gap: 1.25rem; flex: 1; }
.primary-nav a {
  color: #e5e5e5;
  font-size: 0.875rem;
  font-weight: 400;
  transition: color 0.3s ease;
  white-space: nowrap;
}
.primary-nav a:hover { color: rgba(255,255,255,0.7); }
.primary-nav a.active { color: #fff; font-weight: 500; }

.nav-right { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; }
.search {
  display: flex; align-items: center;
  position: relative;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  transition: border-color 0.2s, background 0.2s;
  overflow: hidden;
}
.search:focus-within {
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.7);
}
.search-btn {
  display: flex; align-items: center; justify-content: center;
  padding: 0.45rem 0.55rem 0.45rem 0.65rem;
  color: #e5e5e5; background: transparent; border: 0; cursor: pointer;
  transition: color 0.2s;
}
.search-btn:hover { color: #fff; }
.search input {
  width: 200px;
  padding: 0.5rem 0.75rem 0.5rem 0.35rem;
  background: transparent;
  border: 0;
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
}
.search input::placeholder { color: rgba(255, 255, 255, 0.45); }
.profile-chip {
  display: flex; align-items: center;
}
.cast-btn {
  width: 34px; height: 34px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e5e5e5;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.cast-btn:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.3); color: #fff; }

.avatar-mini {
  width: 32px; height: 32px; border-radius: 6px;
  background: linear-gradient(135deg, #4a6bd8 0%, #2a3d90 100%);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.88rem; color: white;
  border: 1px solid rgba(255,255,255,0.12);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}
.avatar-mini svg { width: 18px; height: 18px; fill: rgba(255,255,255,0.9); }
.profile-chip:hover .avatar-mini { transform: scale(1.05); box-shadow: 0 0 0 2px rgba(122, 152, 255, 0.35); }

/* ============================================================
   Main & layout
   ============================================================ */
main {
  min-height: calc(100vh - var(--nav-h));
  padding-bottom: 4rem;
}
.loading, .empty {
  padding: 6rem 2rem;
  text-align: center;
  color: var(--muted);
}
.empty h2 { color: #fff; margin-bottom: 0.5rem; font-size: 1.4rem; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  max-height: 85vh;
  min-height: 500px;
  overflow: hidden;
  margin-bottom: -6rem;
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.hero-gradient {
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(10,14,26,0.85) 0%, rgba(10,14,26,0.5) 40%, transparent 70%),
    linear-gradient(to top, var(--bg) 0%, rgba(10,14,26,0.3) 40%, transparent 80%);
  pointer-events: none;
}
.hero-content {
  position: absolute; bottom: 10rem; left: 3rem; right: 3rem;
  max-width: 560px;
  z-index: 2;
}
.hero-title {
  font-family: "Netflix Sans", "Inter", sans-serif;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 1rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.hero-logo {
  max-width: 400px;
  max-height: 180px;
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.5));
}
.hero-overview {
  color: #f5f5f5;
  font-size: 1.05rem;
  line-height: 1.4;
  margin-bottom: 1.5rem;
  max-width: 480px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.hero-actions {
  display: flex; gap: 0.75rem; flex-wrap: wrap;
}
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.75rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  white-space: nowrap;
}
.btn-play {
  background: #fff; color: #000;
}
.btn-play:hover { background: rgba(255,255,255,0.75); }
.btn-info {
  background: rgba(109, 109, 110, 0.7); color: #fff;
}
.btn-info:hover { background: rgba(109, 109, 110, 0.4); }
.btn svg { width: 22px; height: 22px; }

/* ============================================================
   Row (horizontal slider)
   ============================================================ */
.rows-wrap { position: relative; z-index: 5; padding-top: 1rem; isolation: isolate; }
.row {
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}
.row:has(.row-card:hover) { z-index: 40; }
.row-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  padding: 0 3rem;
  letter-spacing: -0.005em;
  color: #e5e5e5;
}
.row-scroller {
  position: relative;
  overflow-x: clip;
  overflow-y: visible;
  padding: 4rem 0 13rem;
  margin: -4rem 0 -13rem;
}
.row-track {
  display: flex;
  gap: 4px;
  padding: 0 3rem;
  transition: transform 0.7s cubic-bezier(0.5, 0, 0.1, 1);
  will-change: transform;
}

/* Arrows */
.row-arrow {
  position: absolute;
  top: 4rem; bottom: 13rem;
  width: 3rem;
  background: rgba(10, 14, 26, 0.5);
  color: white;
  z-index: 30;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
}
.row-arrow:hover { background: rgba(10, 14, 26, 0.85); }
.row-arrow svg { width: 28px; height: 28px; transition: transform 0.2s; }
.row-arrow:hover svg { transform: scale(1.3); }
.row-arrow.left { left: 0; }
.row-arrow.right { right: 0; }
.row:hover .row-arrow:not([disabled]) { opacity: 1; }
.row-arrow[disabled] { display: none; }

/* ============================================================
   Cards (Netflix-style with hover preview)
   ============================================================ */
.row-card {
  flex: 0 0 280px;
  max-width: 280px;
  position: relative;
  border-radius: 4px;
  cursor: pointer;
  background: var(--bg-2);
  transition: transform 0.3s ease 0s, box-shadow 0.3s ease 0s;
  transform-origin: center center;
}
.row-fade-right {
  position: absolute;
  top: 4rem; bottom: 13rem;
  right: 0; width: 5rem;
  background: linear-gradient(to left, rgba(10, 14, 26, 0.92), rgba(10, 14, 26, 0) 100%);
  pointer-events: none;
  z-index: 8;
  transition: opacity 0.25s;
}
.card-img-wrap {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a2a6e, #0e1740);
}
.row-card .card-bg {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.card-title-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2rem 0.9rem 0.7rem;
  background: linear-gradient(to top, rgba(6,9,20,0.92) 0%, rgba(6,9,20,0.65) 45%, rgba(6,9,20,0.1) 85%, transparent 100%);
  pointer-events: none;
}
.card-title-overlay .title-text {
  font-family: "Netflix Sans", "Inter", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0,0,0,0.9), 0 1px 2px rgba(0,0,0,0.95);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.2s;
}
.card-title-overlay.has-logo {
  padding: 2.5rem 1rem 0.8rem;
}
.card-title-overlay .title-logo {
  max-width: 80%;
  max-height: 85px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.85));
  animation: logoFadeIn 0.3s ease;
}
@keyframes logoFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* Expanded info (hidden by default, shown on hover) */
.card-info {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--bg-2);
  padding: 0.85rem 0.9rem 1rem;
  border-radius: 0 0 4px 4px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.15s ease 0s, transform 0.15s ease 0s;
  box-shadow: 0 16px 32px rgba(0,0,0,0.55);
}
.card-actions {
  display: flex; align-items: center; gap: 0.35rem;
  margin-bottom: 0.6rem;
}
.icon-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.5);
  background: transparent;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  font-size: 0.85rem;
}
.icon-btn:hover { border-color: #fff; background: rgba(255,255,255,0.1); }
.icon-btn.primary {
  background: #fff; color: #000; border-color: #fff;
}
.icon-btn.primary:hover { background: rgba(255,255,255,0.75); }
.icon-btn.more { margin-left: auto; }
.icon-btn svg { width: 14px; height: 14px; }
.icon-btn.primary svg { width: 15px; height: 15px; }

/* Plus/check morph for list-toggle icon button */
.icon-btn.list-toggle { position: relative; overflow: hidden; }
.icon-btn.list-toggle .icon-plus,
.icon-btn.list-toggle .icon-check {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease;
}
.icon-btn.list-toggle .icon-check {
  opacity: 0;
  transform: scale(0.4) rotate(-90deg);
  color: #46d369;
}
.icon-btn.list-toggle.added .icon-plus {
  opacity: 0;
  transform: scale(0.4) rotate(90deg);
}
.icon-btn.list-toggle.added .icon-check {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}
.icon-btn.list-toggle.added {
  border-color: rgba(70, 211, 105, 0.5);
}
@keyframes listPop {
  0% { transform: scale(1); }
  35% { transform: scale(1.25); }
  70% { transform: scale(0.92); }
  100% { transform: scale(1); }
}
.icon-btn.list-toggle.just-added { animation: listPop 0.5s ease; }

.card-meta-row {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem;
  margin-bottom: 0.35rem;
  color: rgba(255,255,255,0.75);
}
.hd-badge {
  border: 1px solid rgba(255,255,255,0.3);
  padding: 0 0.3rem;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.8);
}
.year { color: rgba(255,255,255,0.75); }
.card-title-big {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-genres {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.75);
  display: flex; flex-wrap: wrap;
  gap: 0.35rem;
}
.card-genres .dot { color: rgba(255,255,255,0.35); }
.card-progress {
  position: absolute;
  bottom: 6px; left: 6px; right: 6px;
  height: 3px;
  background: rgba(0,0,0,0.5);
  border-radius: 2px;
  overflow: hidden;
}
.card-progress-bar {
  height: 100%;
  background: var(--accent);
}

/* Hover state (desktop only) */
@media (hover: hover) and (pointer: fine) {
  .row-card:hover {
    transform: scale(1.45);
    z-index: 50;
    transition-delay: 0.3s;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  }
  .row-card:hover .card-info {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0.45s;
    transition-duration: 0.2s;
  }
  .row-card.edge-left:hover { transform: scale(1.45) translateX(12%); }
  .row-card.edge-right:hover { transform: scale(1.45) translateX(-12%); }
}

/* ============================================================
   Grid page (Orion's Picks, My List, Search)
   ============================================================ */
.page-wrap {
  padding-top: calc(var(--nav-h) + 2rem);
  padding-left: 3rem;
  padding-right: 3rem;
  max-width: 1800px;
  margin: 0 auto;
}
.page-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}
.page-sub {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}
.grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.grid .row-card {
  flex: none;
  max-width: none;
}

/* ============================================================
   Detail page
   ============================================================ */
.detail-page {
  padding-top: var(--nav-h);
}
.detail-hero {
  position: relative;
  min-height: 420px;
  padding: 4rem 3rem 3rem;
}
.detail-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 15%;
  filter: brightness(0.5);
}
.detail-hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(10,14,26,0.9), rgba(10,14,26,0.3) 60%, transparent 100%),
    linear-gradient(to top, var(--bg) 0%, transparent 60%);
}
.detail-hero-content {
  position: relative; z-index: 2;
  max-width: 680px;
}
.detail-hero-content h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.75rem;
}
.detail-tagline {
  color: var(--muted); font-style: italic; margin-bottom: 1rem;
}
.detail-meta {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.detail-meta .sep { color: rgba(255,255,255,0.35); }
.detail-genres {
  display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.detail-genres .pill {
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  padding: 0.3rem 0.8rem; border-radius: 999px;
  font-size: 0.78rem;
}
.overview {
  font-size: 1.02rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.9);
  margin-bottom: 1.5rem;
  max-width: 680px;
}
.detail-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.player-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  margin-top: 1rem;
  border-radius: 0;
  position: relative;
}
.player-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.player-overlay-btns {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 10;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.player-mode-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  height: 42px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  font: inherit; font-weight: 600; font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  opacity: 0.85;
}
.player-mode-btn:hover { background: rgba(0, 0, 0, 0.88); border-color: rgba(255, 255, 255, 0.45); opacity: 1; }
.player-mode-btn[disabled] { opacity: 0.6; cursor: wait; }
.player-cast-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, border-color 0.15s;
  opacity: 0.85;
}
.player-cast-btn:hover { background: rgba(0, 0, 0, 0.88); transform: scale(1.07); opacity: 1; border-color: rgba(255, 255, 255, 0.45); }
.player-cast-btn.casting {
  background: linear-gradient(135deg, #4a6bd8, #2a3d90);
  color: #fff;
  border-color: transparent;
  animation: castPulse 1.4s ease-in-out infinite;
  opacity: 1;
}
@keyframes castPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 107, 216, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(74, 107, 216, 0); }
}

/* Server picker (constellations) */
.server-picker {
  display: flex; align-items: center;
  gap: 0.5rem; flex-wrap: wrap;
  padding: 1.5rem 3rem 0;
  max-width: 1800px; margin: 0 auto;
}
.server-picker .server-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-right: 0.25rem;
}
.server-btn {
  padding: 0.5rem 1.1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.server-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.3); }
.server-btn:active { transform: scale(0.97); }
.server-btn.active {
  background: linear-gradient(135deg, #4a6bd8 0%, #2a3d90 100%);
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(74, 107, 216, 0.4);
}
.server-hint {
  padding: 0.5rem 3rem 0;
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
  max-width: 1800px; margin: 0 auto;
}
@media (max-width: 900px) {
  .server-picker, .server-hint { padding-left: 1.25rem; padding-right: 1.25rem; }
}

.detail-body {
  padding: 2rem 3rem 4rem;
  max-width: 1800px;
  margin: 0 auto;
}

/* ============================================================
   Episode picker
   ============================================================ */
.episode-picker { margin-top: 2rem; }
.episode-picker h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  font-weight: 700;
}
.season-select {
  padding: 0.65rem 1.1rem;
  background: rgba(40, 40, 40, 0.85);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  margin-bottom: 1.25rem;
  font-family: inherit; font-weight: 500; font-size: 0.95rem;
  outline: none; cursor: pointer;
}
.episodes { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.episode {
  padding: 0.85rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  display: flex; gap: 1rem;
  transition: background 0.15s;
}
.episode:hover { background: rgba(255,255,255,0.08); }
.episode.active { background: rgba(91, 138, 255, 0.1); border-color: var(--accent); }
.episode-num {
  font-size: 1.6rem;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  min-width: 2rem;
}
.episode.active .episode-num { color: var(--accent); }
.episode-info { flex: 1; min-width: 0; }
.episode-title { font-weight: 600; font-size: 0.95rem; }
.episode-overview {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.3rem;
  line-height: 1.45;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ============================================================
   Modal (Auth)
   ============================================================ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s;
}
.modal-backdrop.hidden { display: none; }
.modal {
  background: #141a2a;
  border: 1px solid var(--border);
  border-radius: 8px;
  max-width: 420px;
  width: 100%;
  padding: 2.25rem;
  position: relative;
  animation: slideUp 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.modal h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  font-weight: 800;
}
.modal .subtitle {
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}
.modal form { display: flex; flex-direction: column; gap: 0.75rem; }
.modal input {
  padding: 0.9rem 1.1rem;
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.modal input:focus { border-color: var(--accent); background: rgba(255,255,255,0.08); }
.modal .btn-submit {
  margin-top: 0.5rem;
  padding: 0.9rem;
  background: var(--grad);
  color: white;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 700;
  width: 100%;
  cursor: pointer;
  transition: opacity 0.15s;
}
.modal .btn-submit:hover { opacity: 0.9; }
.modal-switch {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 1.25rem;
}
.modal-switch a { color: var(--accent); font-weight: 600; cursor: pointer; }
.modal-close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  transition: background 0.15s;
}
.modal-close:hover { background: rgba(255,255,255,0.15); }
.modal-error {
  color: #ff6b6b;
  font-size: 0.85rem;
  padding: 0.5rem 0;
  display: none;
}
.modal-error.visible { display: block; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   Coming Soon (no-player state)
   ============================================================ */
.coming-soon {
  width: 100%;
  aspect-ratio: 16/9;
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  background: #000;
}
.coming-soon-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: blur(14px) brightness(0.35);
  transform: scale(1.1);
}
.coming-soon-inner {
  position: relative;
  z-index: 1;
  padding: 2rem;
  max-width: 520px;
}
.coming-soon .cs-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: rgba(122, 152, 255, 0.95);
  background: rgba(122, 152, 255, 0.12);
  border: 1px solid rgba(122, 152, 255, 0.3);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.coming-soon h3 {
  font-size: 1.75rem; font-weight: 800;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}
.coming-soon .cs-date {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
  margin: 0 0 0.75rem;
}
.coming-soon .cs-sub {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
  margin: 0;
}

/* ============================================================
   Detail Modal (Netflix-style overlay)
   ============================================================ */
.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  overflow-y: auto;
  overflow-x: hidden;
  animation: fadeIn 0.2s;
}
.detail-modal.hidden { display: none; }
body.modal-open { overflow: hidden; }
.detail-modal-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 0;
}
.detail-modal-shell {
  position: relative;
  z-index: 1;
  width: min(92vw, 900px);
  margin: 3vh auto 6vh;
  background: #0b0f1a;
  border-radius: 8px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.detail-modal-close {
  position: absolute;
  top: 1.1rem; right: 1.1rem;
  z-index: 20;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #181818;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.detail-modal-close:hover { background: #2a2a2a; }

/* Hero inside modal */
.dm-hero {
  position: relative;
  aspect-ratio: 16/9;
  max-height: 62vh;
  min-height: 360px;
  background: #000;
  overflow: hidden;
}
.dm-hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 15%;
}
.dm-hero-fade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, transparent 45%, rgba(11, 15, 26, 0.25) 70%, rgba(11, 15, 26, 0.98) 100%);
}
.dm-hero-body {
  position: absolute;
  left: 2.75rem; right: 2.75rem; bottom: 2rem;
  z-index: 2;
}
.dm-hero-logo {
  max-width: 58%;
  max-height: 160px;
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 3px 14px rgba(0, 0, 0, 0.7));
}
.dm-hero-title {
  font-family: "Netflix Sans", "Inter", sans-serif;
  font-weight: 800;
  font-size: 2.4rem;
  line-height: 1;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.75);
  margin-bottom: 1.25rem;
  max-width: 85%;
  letter-spacing: -0.02em;
}
.dm-hero-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}
.dm-btn-play {
  background: #fff;
  color: #000;
  padding: 0.65rem 1.75rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 1.02rem;
  border: 0;
  display: inline-flex; align-items: center; gap: 0.5rem;
  cursor: pointer;
  transition: background 0.15s;
}
.dm-btn-play:hover { background: rgba(255, 255, 255, 0.75); }
.dm-icon-round {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(42, 42, 42, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.55);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.dm-icon-round:hover { border-color: #fff; background: rgba(42, 42, 42, 0.8); }

/* Modal-wide add-to-list button with morph + pop animation */
.dm-list-btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.65rem 1.35rem 0.65rem 1.1rem;
  background: rgba(109, 109, 110, 0.5);
  color: #fff;
  border: 0;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 0.5rem;
}
.dm-list-btn:hover { background: rgba(109, 109, 110, 0.35); }
.dm-list-btn.added { background: rgba(70, 211, 105, 0.18); color: #fff; }
.dm-list-btn .icon-slot {
  position: relative;
  width: 20px; height: 20px;
  display: inline-block;
}
.dm-list-btn .icon-plus,
.dm-list-btn .icon-check {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease;
}
.dm-list-btn .icon-plus svg, .dm-list-btn .icon-check svg { width: 18px; height: 18px; }
.dm-list-btn .icon-check { opacity: 0; transform: scale(0.4) rotate(-90deg); color: #46d369; }
.dm-list-btn.added .icon-plus { opacity: 0; transform: scale(0.4) rotate(90deg); }
.dm-list-btn.added .icon-check { opacity: 1; transform: scale(1) rotate(0deg); }
.dm-list-btn.just-added { animation: listPop 0.5s ease; }

/* Netflix-style episode rows */
.episodes-netflix {
  display: flex;
  flex-direction: column;
}
.ep-row {
  display: grid;
  grid-template-columns: 48px 180px 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 0.15s;
  color: inherit;
  text-decoration: none;
}
.ep-row:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.ep-row:hover { background: rgba(255, 255, 255, 0.04); }
.ep-row.active { background: rgba(91, 138, 255, 0.08); }
.ep-num {
  font-size: 1.5rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}
.ep-row.active .ep-num { color: var(--accent); font-weight: 600; }
.ep-thumb {
  position: relative;
  aspect-ratio: 16/9;
  width: 180px;
  border-radius: 4px;
  overflow: hidden;
  background: #000;
}
.ep-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ep-thumb .ep-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  background: rgba(0, 0, 0, 0.25);
}
.ep-row:hover .ep-thumb .ep-play { opacity: 1; }
.ep-meta {
  min-width: 0;
  padding-right: 1rem;
}
.ep-title {
  font-size: 1.05rem;
  font-weight: 500;
  color: #fff;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ep-overview {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ep-runtime {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .ep-row { grid-template-columns: 36px 120px 1fr; gap: 0.75rem; padding: 0.85rem 0; }
  .ep-thumb { width: 120px; }
  .ep-num { font-size: 1.2rem; }
  .ep-title { font-size: 0.95rem; }
  .ep-overview { font-size: 0.82rem; -webkit-line-clamp: 1; }
  .ep-runtime { display: none; }
}

/* Modal tagline + actions + meta row restyling */
.dm-tagline {
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  margin: 0 0 0.8rem;
  font-size: 0.95rem;
}
.dm-hero-body .dm-meta-row {
  margin: 0 0 0.75rem;
  color: #fff;
  font-weight: 500;
  font-size: 0.95rem;
}
.dm-hero-body .dm-meta-row .sep { color: rgba(255,255,255,0.4); }
.dm-hero-body .detail-genres {
  display: flex; gap: 0.4rem; flex-wrap: wrap;
  margin-bottom: 0.8rem;
}
.dm-hero-body .detail-genres .pill {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  color: #fff;
}
.dm-hero-body .dm-overview {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 640px;
  margin: 0 0 0.85rem;
}
.dm-hero-body .dm-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.dm-body .episode-picker { margin-top: 2rem; }

/* Body */
.dm-body {
  padding: 1.5rem 2.75rem 2.5rem;
}
.dm-body-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.5rem;
  margin-bottom: 1.75rem;
}
.dm-meta-row {
  display: flex; align-items: center;
  gap: 0.85rem; flex-wrap: wrap;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
  font-weight: 500;
}
.dm-meta-row .hd-badge {
  font-size: 0.72rem;
  padding: 0.05rem 0.35rem;
}
.dm-overview {
  font-size: 1.02rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  margin: 0;
}
.dm-info { font-size: 0.92rem; line-height: 1.55; }
.dm-info-block + .dm-info-block { margin-top: 0.7rem; }
.dm-info-block .label {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
  margin-right: 0.3rem;
}
.dm-info-block em { color: rgba(255, 255, 255, 0.5); font-style: italic; }

/* Override server picker + player to fit modal */
.dm-body .server-picker { padding: 1rem 0 0; margin: 0; max-width: none; }
.dm-body .server-hint { padding: 0.35rem 0 0.4rem; margin: 0; max-width: none; }
.dm-body .player-wrap { margin-top: 0.8rem; border-radius: 4px; overflow: hidden; }

/* Episodes */
.dm-body .episode-picker { margin-top: 2rem; }
.episodes-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.episodes-head h2 { margin: 0; font-size: 1.4rem; font-weight: 800; }
.episodes-head .season-select { margin: 0; }

@media (max-width: 720px) {
  .dm-hero { min-height: 260px; }
  .dm-hero-body { left: 1.25rem; right: 1.25rem; bottom: 1.25rem; }
  .dm-hero-logo, .dm-hero-title { max-width: 78%; }
  .dm-hero-title { font-size: 1.6rem; }
  .dm-body { padding: 1.25rem 1.25rem 2rem; }
  .dm-body-grid { grid-template-columns: 1fr; gap: 1rem; }
  .detail-modal-shell { width: 96vw; margin: 2vh auto 4vh; border-radius: 6px; }
}

/* ============================================================
   Orion's Picks banner
   ============================================================ */
.picks-banner {
  margin: 0 3rem 1.5rem;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, rgba(74, 107, 216, 0.22), rgba(42, 61, 144, 0.12));
  border: 1px solid rgba(122, 152, 255, 0.22);
  border-radius: 12px;
}
.picks-banner .picks-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: rgba(122, 152, 255, 0.95);
  margin-bottom: 0.5rem;
  display: inline-block;
}
.picks-banner h2 { margin: 0 0 0.3rem; font-size: 1.6rem; font-weight: 800; }
.picks-banner p { margin: 0; color: rgba(255, 255, 255, 0.7); font-size: 0.95rem; }
@media (max-width: 900px) {
  .picks-banner { margin-left: 1.25rem; margin-right: 1.25rem; }
}

/* ============================================================
   Cast / Watch on TV modal
   ============================================================ */
.cast-modal .platform-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.cast-modal .platform-tab {
  padding: 0.4rem 0.9rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.cast-modal .platform-tab:hover { color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.cast-modal .platform-tab.active {
  background: linear-gradient(135deg, #4a6bd8, #2a3d90);
  color: #fff;
  border-color: transparent;
}
.cast-modal .tv-steps { color: rgba(255, 255, 255, 0.85); font-size: 0.92rem; line-height: 1.5; margin-bottom: 1rem; }
.cast-modal .tv-steps ol { margin: 0; padding-left: 1.25rem; }
.cast-modal .tv-steps li { margin-bottom: 0.5rem; }
.cast-modal .tv-steps strong { color: #fff; }
.cast-modal .tv-cast-action {
  display: flex;
  justify-content: center;
  margin-top: 0.75rem;
}
.cast-modal .btn-cast-now {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #4a6bd8, #2a3d90);
  color: #fff;
  border: 0;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.cast-modal .btn-cast-now:hover { opacity: 0.9; }
.cast-modal .btn-cast-now[disabled] { opacity: 0.5; cursor: not-allowed; }
.cast-modal .cast-note {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.8rem;
  text-align: center;
}

/* ============================================================
   Profile
   ============================================================ */
.profile-header {
  display: flex; align-items: center; gap: 1.5rem;
  padding: 1.5rem 0;
  margin-bottom: 1.5rem;
}
.avatar-big {
  width: 72px; height: 72px; border-radius: 8px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; font-weight: 800; color: white;
  border: 1px solid rgba(255,255,255,0.1);
}
.profile-info h1 { font-size: 1.6rem; margin-bottom: 0.2rem; font-weight: 800; }
.profile-info p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.profile-header .spacer { flex: 1; }
.signout-btn {
  padding: 0.55rem 1.25rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s;
}
.signout-btn:hover { background: rgba(255,255,255,0.15); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  padding: 3rem 2rem;
  text-align: center;
  color: var(--dim);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}
.site-footer p { margin: 0 0 0.4rem; }
.site-footer .disclaimer {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.35);
  max-width: 720px;
  margin: 0.25rem auto 0;
  line-height: 1.5;
}
.site-footer .credit {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.05em;
}
.site-footer .footer-links {
  margin-top: 0.8rem;
  font-size: 0.82rem;
}
.site-footer .footer-links a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.site-footer .footer-links a:hover { color: #fff; }

/* Policies / legal page */
.policies-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.65;
  font-size: 0.95rem;
}
.policies-wrap h1 {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 1.5rem;
  letter-spacing: -0.02em;
}
.policies-wrap h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 2rem 0 0.6rem;
  color: #fff;
  letter-spacing: 0;
}
.policies-wrap p { margin: 0 0 0.75rem; }
.policies-wrap ul { padding-left: 1.25rem; margin: 0.4rem 0 1rem; }
.policies-wrap li { margin-bottom: 0.3rem; }
.policies-wrap .last-updated { color: rgba(255, 255, 255, 0.5); font-size: 0.85rem; margin-bottom: 2rem; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .nav-inner { padding: 0 1.25rem; gap: 1rem; }
  .primary-nav { gap: 0.9rem; }
  .primary-nav a { font-size: 0.85rem; }
  .hero-content { bottom: 6rem; left: 1.25rem; right: 1.25rem; }
  .row-arrow { display: none; }
  .page-wrap { padding-left: 1.25rem; padding-right: 1.25rem; }
  .detail-hero { padding: 3rem 1.25rem 2rem; }
  .detail-body { padding: 1.5rem 1.25rem 3rem; }
}
@media (max-width: 600px) {
  .search { display: none; }
  .primary-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .primary-nav::-webkit-scrollbar { display: none; }
  .hero { min-height: 60vh; }
  .hero-title { font-size: 2rem; }
}

/* Touch: disable hover preview */
@media (hover: none) {
  .row-card:hover { transform: none !important; }
  .card-info { display: none; }
}
