/* Titan — self-hosted fonts (work offline; no external dependency) */
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 300 800; font-display: swap; src: url('/fonts/Outfit.woff2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-style: italic; font-weight: 300 600; font-display: swap; src: url('/fonts/SourceSerif4-Italic.woff2') format('woff2'); }
@font-face { font-family: 'Bebas Neue'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/BebasNeue.woff2') format('woff2'); }

:root {
  /* Titan palette: near-black field, teal accent, cool text */
  --ink: #0a0d12;          /* page background (near-black) */
  --ink-2: #0d1119;        /* slightly raised black */
  --panel: #141a24;        /* cards, nav surfaces */
  --panel-raised: #1b2431; /* hover / raised surfaces */
  --fog: #8b97a3;          /* muted text */
  --fog-2: #aebbc7;        /* secondary text, brighter */
  --paper: #e8edf2;        /* primary text */
  --ac: #3fc1c9;           /* teal accent (Titan's signature) */
  --ac-dim: #2a8a90;       /* pressed / border teal */
  --ac-ink: #06272b;       /* text on top of the accent */
  --teal: #3fc1c9;         /* alias so existing rules keep working */
  --teal-dim: #2a8a90;
  --gold: #3fc1c9;         /* legacy alias → now teal, so old gold rules adopt the accent */
  --gold-dim: #2a8a90;
  --signal: #e06a6a;       /* errors */

  --font-display: 'Source Serif 4', Georgia, serif; /* italic editorial titles */
  --font-body: 'Outfit', system-ui, sans-serif;
  --font-mono: ui-monospace, Menlo, monospace;
  --font-mono-art: 'Bebas Neue', sans-serif;        /* album monograms */

  --radius: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  min-height: 100vh;
  overscroll-behavior-y: contain;
}

body {
  background-image:
    radial-gradient(ellipse 900px 520px at 50% -10%, rgba(63, 193, 201, 0.06), transparent 60%);
  background-attachment: fixed;
}

a { color: var(--ac); text-decoration: none; }
a:hover { color: #aeeaee; }
button { font-family: inherit; }

::selection { background: var(--ac); color: var(--ac-ink); }

/* Faint film-grain / scanline texture — the ambient signature touch */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: repeating-linear-gradient(
    0deg, #fff 0px, transparent 1px, transparent 2px, #fff 3px
  );
}

/* ---------- Top nav ---------- */

.topnav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 28px;
  padding-top: max(14px, env(safe-area-inset-top));
  background: rgba(18, 20, 28, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.wordmark {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.02em;
  color: var(--paper);
  flex-shrink: 0;
}

.wordmark svg { display: block; }

.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--fog);
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-links a:hover { color: var(--paper); background: rgba(255,255,255,0.05); }
.nav-links a.active { color: var(--ink); background: var(--gold); }

.nav-search {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  color: var(--paper);
  padding: 8px 12px;
  font-size: 14px;
  width: 200px;
  font-family: var(--font-body);
}
.nav-search::placeholder { color: var(--fog); }
.nav-search:focus { outline: 2px solid var(--gold); outline-offset: -1px; }

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

.nav-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--fog);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
  position: relative;
}
.nav-icon-btn:hover { color: var(--paper); background: rgba(255,255,255,0.06); }
.nav-icon-btn.active { color: var(--gold); background: rgba(232,197,71,0.12); }
.nav-icon-btn svg { width: 19px; height: 19px; }

.nav-icon-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  min-width: 15px;
  height: 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

.nav-avatar-btn { padding: 0; overflow: hidden; }
.nav-avatar-btn .avatar-wrap { width: 30px; height: 30px; border-radius: 7px; }

/* ---------- Layout ---------- */

main {
  position: relative;
  z-index: 2;
  /* Titan is a full-width, fluid layout: no capped content column. The hero
     bleeds to the true viewport edges, and inner sections (rails, detail
     bodies) provide their own horizontal padding. Legacy non-Titan views get
     their padding back via the rule below. */
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Non-Titan views (detail pages, admin, account, grids) still want a padded,
   comfortable reading column — restore inner padding for them, but not for
   the full-bleed Titan home. */
main#app > *:not(.titan-home) {
  padding-left: clamp(20px, 4vw, 56px);
  padding-right: clamp(20px, 4vw, 56px);
}

.view-fade-in { animation: viewFadeIn 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  margin: 0 0 16px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.section-title .count {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fog);
  font-weight: 400;
}

section.row { margin-bottom: 44px; }

/* ---------- Landing layout (hero + horizontal rails) ---------- */

/* Let the hero bleed to the true viewport edges even though <main> is
   capped at max-width and centered. The 50%/50vw trick recenters the
   element against the viewport instead of the content column. */
.landing { }
/* On the landing page, heroes are rounded banner cards with page margins
   (per the Plex-concept layout) — not full-bleed like detail pages. */
.landing .hero {
  margin: 0 0 44px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  min-height: 420px;
  height: 54vh;
  max-height: 560px;
}
.landing .hero.spotlight { margin-top: 4px; }

.rail {
  margin-bottom: 40px;
  position: relative;
}
.rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}
.st-icon, .rail-icon {
  display: inline-flex;
  color: var(--gold);
  margin-right: 9px;
  position: relative;
  top: 2px;
}
.st-chevron {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--fog);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.15s ease, transform 0.15s ease;
}
.st-chevron:hover { color: var(--gold); transform: translateX(2px); }

.rail-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.rail-title .count {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--fog);
  font-weight: 400;
}
.rail-seeall {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--fog);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.rail-seeall:hover { color: var(--gold); }

.rail-viewport { position: relative; }
.rail-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  padding: 4px 2px 10px;
  scrollbar-width: none; /* rails scroll via drag / arrows; hidden bar keeps it clean */
}
.rail-track::-webkit-scrollbar { display: none; }
.rail-track > .card {
  flex: 0 0 auto;
  width: 176px;
  scroll-snap-align: start;
}

/* Hover-reveal scroll arrows, hidden on touch (no hover) and at the ends. */
.rail-arrow {
  position: absolute;
  top: 0;
  bottom: 14px;
  width: 52px;
  border: none;
  cursor: pointer;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  font-size: 22px;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.rail-viewport:hover .rail-arrow:not([disabled]) { opacity: 1; }
.rail-arrow[disabled] { opacity: 0 !important; pointer-events: none; }
.rail-arrow-prev {
  left: 0;
  background: linear-gradient(90deg, var(--ink) 12%, rgba(18,20,28,0) 100%);
  justify-content: flex-start;
  padding-left: 6px;
}
.rail-arrow-next {
  right: 0;
  background: linear-gradient(270deg, var(--ink) 12%, rgba(18,20,28,0) 100%);
  justify-content: flex-end;
  padding-right: 6px;
}
.rail-arrow span {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(18,20,28,0.72);
  border: 1px solid rgba(255,255,255,0.16);
  display: flex;
  align-items: center;
  justify-content: center;
}
.rail-arrow:hover span { border-color: var(--gold); background: rgba(18,20,28,0.92); }

@media (hover: none) {
  .rail-arrow { display: none; }
  .rail-track { scrollbar-width: auto; }
}

@media (max-width: 700px) {
  .landing .hero:not(.spotlight) { width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
  .rail-track > .card { width: 140px; }
}

/* ---------- Poster grid & cards ---------- */

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

.card {
  cursor: pointer;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.card:hover { transform: translateY(-8px) scale(1.025); }

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  transition: box-shadow 0.32s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.32s ease;
  animation: artworkFadeIn 0.5s ease both;
}

.card:hover .poster,
.card:focus-visible .poster {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 1px var(--gold-dim), 0 20px 40px rgba(0,0,0,0.55), 0 0 32px rgba(232,197,71,0.22);
}

@keyframes artworkFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.card:hover .poster img { transform: scale(1.07); }

.poster-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--fog);
  text-align: center;
  padding: 12px;
}

.poster-progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: rgba(0,0,0,0.5);
}
.poster-progress > div { height: 100%; background: var(--gold); }

.version-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(18,20,28,0.85);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.card-title {
  margin-top: 9px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--paper);
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fog);
  margin-top: 3px;
}

.empty-state {
  padding: 48px 20px;
  text-align: center;
  color: var(--fog);
  border: 1px dashed rgba(255,255,255,0.12);
  border-radius: var(--radius);
}
.empty-state strong { color: var(--paper); display: block; margin-bottom: 6px; font-family: var(--font-display); font-size: 17px;}

/* ---------- Hero carousel ---------- */

.hero {
  position: relative;
  margin: -32px -28px 44px;
  min-height: 480px;
  height: 62vh;
  max-height: 620px;
  background-size: cover;
  background-position: center 22%;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  animation: heroFadeIn 0.55s ease both;
}
@keyframes heroFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(18,20,28,0.95) 0%, rgba(18,20,28,0.55) 45%, rgba(18,20,28,0.15) 75%),
    linear-gradient(0deg, var(--ink) 0%, rgba(18,20,28,0.1) 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 60px 56px;
  max-width: 640px;
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--gold);
  text-transform: uppercase;
  font-style: italic;
  margin-bottom: 10px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 56px;
  line-height: 0.98;
  letter-spacing: -0.01em;
  color: var(--paper);
  margin: 0 0 18px;
  text-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

.hero-meta {
  display: flex;
  gap: 40px;
  margin-bottom: 16px;
}
.hero-meta-item { display: flex; flex-direction: column; gap: 2px; }
.hero-meta-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fog);
}
.hero-meta-value { font-size: 13.5px; color: var(--paper); font-family: var(--font-mono); }

.hero-overview {
  color: rgba(238,240,246,0.85);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 24px;
  max-width: 520px;
}

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

.hero-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(18,20,28,0.5);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--paper);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.hero-nav-arrow:hover { background: rgba(18,20,28,0.8); border-color: var(--gold); }
.hero-nav-prev { left: 20px; }
.hero-nav-next { right: 20px; }

.hero-dots {
  position: absolute;
  bottom: 18px;
  right: 28px;
  z-index: 3;
  display: flex;
  gap: 7px;
}
.hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  border: none;
  padding: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}
.hero-dot.active { background: var(--gold); transform: scale(1.3); }

/* Spotlight: a second, slightly smaller hero used mid-page */
.hero.spotlight { min-height: 380px; height: 46vh; margin-bottom: 44px; }
.hero.spotlight .hero-title { font-size: 42px; }

/* ---------- Continue watching (landscape cards) ---------- */

.cw-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.cw-card { cursor: pointer; }

.cw-thumb {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  background: var(--panel);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  align-items: flex-end;
}
.cw-card:hover .cw-thumb { border-color: var(--gold-dim); box-shadow: 0 8px 24px rgba(0,0,0,0.4); }

.cw-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, transparent 55%);
}

.cw-title-overlay {
  position: relative;
  z-index: 1;
  padding: 12px 14px;
  color: var(--paper);
  font-weight: 700;
  font-size: 14px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.cw-subtitle { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--fog); font-weight: 400; margin-top: 2px; }

.section-title { display: flex; align-items: center; }

.cw-progress { height: 4px; background: rgba(255,255,255,0.1); border-radius: 0 0 3px 3px; overflow: hidden; margin-top: -3px; position: relative; z-index: 1; }
.cw-progress > div { height: 100%; background: var(--gold); }

/* ---------- Two-column recently added ---------- */

/* Full-width tonal band behind the section — the concept's lighter strip. */
.band {
  margin: 0 -28px 44px;
  padding: 30px 28px 14px;
  background: linear-gradient(180deg, rgba(47, 72, 88, 0.38), rgba(47, 72, 88, 0.22));
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.see-more-btn {
  padding: 7px 16px;
  font-size: 13px;
  border-radius: 999px;
}

.recent-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.recent-col .grid { grid-template-columns: repeat(3, 1fr); }
.recent-col .see-more-btn { margin-top: 18px; }

/* ---------- Detail view ---------- */

.detail-backdrop {
  position: relative;
  margin: -32px -28px 0;
  height: 56vh;
  min-height: 380px;
  max-height: 640px;
  background-size: cover;
  background-position: center 20%;
  image-rendering: -webkit-optimize-contrast;
}
.detail-backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  /* Vertical fade to the page plus a gentle left-side darkening, so the
     title/overview sitting lower-left stays legible over any artwork —
     the layered look modern media apps use instead of a flat scrim. */
  background:
    linear-gradient(180deg, rgba(18,20,28,0) 0%, rgba(18,20,28,0.15) 55%, rgba(18,20,28,0.85) 88%, var(--ink) 100%),
    linear-gradient(90deg, rgba(18,20,28,0.72) 0%, rgba(18,20,28,0.25) 42%, rgba(18,20,28,0) 70%);
}

.detail-content {
  display: flex;
  gap: 32px;
  margin-top: -150px;
  position: relative;
  z-index: 2;
  padding: 0 28px;
}

.detail-poster {
  width: 220px;
  min-width: 220px;
  aspect-ratio: 2/3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 24px 60px rgba(0,0,0,0.65), 0 2px 8px rgba(0,0,0,0.4);
  background: var(--panel);
}
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: -webkit-optimize-contrast;
}

.detail-info { padding-top: 132px; max-width: 660px; }

.detail-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 42px;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  text-shadow: 0 2px 24px rgba(0,0,0,0.5);
}

.detail-chips {
  display: flex;
  gap: 10px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fog);
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.detail-chips .chip {
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.03);
  padding: 4px 11px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.detail-overview {
  color: var(--paper);
  opacity: 0.82;
  line-height: 1.65;
  font-size: 15.5px;
  margin-bottom: 24px;
  max-width: 620px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: rgba(255,255,255,0.06); color: var(--paper); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); }

.quality-select {
  background: var(--panel);
  color: var(--paper);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 14px;
}

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

.versions-section { margin-bottom: 24px; max-width: 560px; }
.versions-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.versions-title .count { font-family: var(--font-mono); font-size: 12px; color: var(--fog); font-weight: 400; }

.versions-list {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  overflow: hidden;
}
.version-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: var(--panel);
}
.version-row:last-child { border-bottom: none; }
.version-row.current { background: rgba(232,197,71,0.06); }

.version-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.version-res { font-family: var(--font-mono); font-size: 13.5px; color: var(--paper); font-weight: 600; }
.version-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--fog); }

.version-progress-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold);
  white-space: nowrap;
}

.version-play-btn { padding: 7px 14px; font-size: 13px; white-space: nowrap; }

.season-tabs {
  display: flex;
  gap: 10px;
  margin: 28px 0 16px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.season-tabs::-webkit-scrollbar { height: 6px; }
.season-tabs::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
.season-tab {
  flex: 0 0 auto;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: var(--panel-raised);
  color: var(--fog);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.season-tab:hover { color: var(--paper); border-color: var(--gold-dim); }
.season-tab.active {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

.episode-list { margin-top: 8px; }
.episode-row {
  display: flex;
  gap: 16px;
  padding: 14px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.episode-row:hover { background: rgba(255,255,255,0.04); }
.episode-num {
  font-family: var(--font-mono);
  color: var(--gold);
  font-size: 13px;
  min-width: 54px;
}
.episode-body { flex: 1; }
.episode-title { font-weight: 600; font-size: 14.5px; }
.episode-overview { color: var(--fog); font-size: 13px; margin-top: 4px; line-height: 1.5; }

/* ---------- Player ---------- */

.player-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.player-topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 18px 24px;
  padding-top: max(18px, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(180deg, rgba(0,0,0,0.7), transparent);
  z-index: 2;
}
.player-topbar .title { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.player-close {
  background: rgba(255,255,255,0.1);
  border: none;
  color: var(--paper);
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.player-close:hover { background: rgba(255,255,255,0.2); }

.player-status {
  position: absolute;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fog);
  background: rgba(0,0,0,0.5);
  padding: 6px 10px;
  border-radius: 20px;
}

/* ---------- Trailer modal ---------- */

.trailer-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,9,13,0.88);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.trailer-modal {
  width: 100%;
  max-width: 960px;
  position: relative;
}
.trailer-modal-frame {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.trailer-modal-frame iframe { width: 100%; height: 100%; border: none; display: block; }

.trailer-modal-close {
  position: absolute;
  top: -46px;
  right: 0;
  background: rgba(255,255,255,0.1);
  border: none;
  color: var(--paper);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
}
.trailer-modal-close:hover { background: rgba(255,255,255,0.2); }

/* ---------- Artwork picker ---------- */

.artwork-modal {
  width: 100%;
  max-width: 880px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
}
.artwork-modal .trailer-modal-close { position: absolute; top: 20px; right: 20px; }

.artwork-modal-title {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0 0 20px;
  padding-right: 40px;
}

.artwork-section { margin-bottom: 28px; }
.artwork-section:last-child { margin-bottom: 0; }
.artwork-section-title {
  font-family: var(--font-display);
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--paper);
}
.artwork-section-title .count { font-family: var(--font-mono); font-size: 12px; color: var(--fog); margin-left: 6px; }

.artwork-grid { display: flex; flex-wrap: wrap; gap: 10px; }

.artwork-thumb {
  position: relative;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  background: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
  flex-shrink: 0;
}
.artwork-thumb:hover:not(:disabled) { transform: translateY(-2px); }
.artwork-thumb.selected { border-color: var(--gold); }
.artwork-thumb.saving { opacity: 0.5; cursor: wait; }
.artwork-thumb:disabled:not(.saving) { opacity: 0.4; cursor: not-allowed; }
.artwork-thumb img { display: block; }
.artwork-thumb-poster { width: 90px; height: 135px; }
.artwork-thumb-poster img { width: 90px; height: 135px; object-fit: cover; }
.artwork-thumb-backdrop { width: 160px; height: 90px; }
.artwork-thumb-backdrop img { width: 160px; height: 90px; object-fit: cover; }

.artwork-thumb-check {
  position: absolute;
  top: 4px; right: 4px;
  background: var(--gold);
  color: var(--ink);
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

/* ---------- Folder browser ---------- */

.browse-modal {
  width: 100%;
  max-width: 560px;
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  display: flex;
  flex-direction: column;
}
.browse-modal .trailer-modal-close { position: absolute; top: 20px; right: 20px; }

.browse-path {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--gold);
  background: var(--ink);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  margin: 4px 0 14px;
  overflow-x: auto;
  white-space: nowrap;
}

.browse-list {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  max-height: 340px;
  overflow-y: auto;
}

.browse-item {
  padding: 11px 14px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.12s ease, color 0.12s ease;
}
.browse-item:last-child { border-bottom: none; }
.browse-item:hover { background: rgba(255,255,255,0.05); color: var(--gold); }
.browse-item-up { color: var(--fog); font-family: var(--font-mono); font-size: 13px; }

.browse-actions { margin-top: 18px; display: flex; justify-content: flex-end; }

/* ---------- Recommend-to-a-friend picker ---------- */

.recommend-panel {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 14px;
  max-width: 420px;
}
.recommend-panel select {
  width: 100%;
  background: var(--ink);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--paper);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-body);
  margin-bottom: 12px;
}
.recommend-panel textarea {
  width: 100%;
  background: var(--ink);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--paper);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-body);
  resize: vertical;
  margin-bottom: 12px;
}

/* ---------- Watchlist button state ---------- */

.btn-watchlist.in-watchlist {
  background: rgba(232,197,71,0.15);
  color: var(--gold);
  border: 1px solid var(--gold-dim);
}

/* ---------- Recommended-by-friends cards ---------- */

.friend-rec-card { position: relative; }
.friend-rec-dismiss {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  border: none;
  color: var(--paper);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.friend-rec-dismiss:hover { background: rgba(0,0,0,0.85); color: var(--gold); }
.friend-rec-message {
  font-size: 12px;
  color: var(--fog);
  font-style: italic;
  margin-top: 4px;
  line-height: 1.4;
}

/* ---------- Auth screens ---------- */

.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.auth-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 380px;
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 36px 32px;
}

.auth-wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 30px;
  text-align: center;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.auth-sub {
  text-align: center;
  color: var(--fog);
  font-size: 13.5px;
  margin-bottom: 28px;
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fog);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  background: var(--ink);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--paper);
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--font-body);
}
.field input:focus { outline: 2px solid var(--gold); outline-offset: -1px; }

.auth-error {
  background: rgba(209, 73, 91, 0.15);
  border: 1px solid rgba(209, 73, 91, 0.4);
  color: #f0a5af;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.auth-card .btn { width: 100%; justify-content: center; margin-top: 6px; }

/* ---------- Admin panel ---------- */

.admin-block {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.admin-block h3 { margin: 0 0 14px; font-family: var(--font-display); font-size: 17px; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.form-row input, .form-row select {
  background: var(--ink);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--paper);
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-body);
}
.lib-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 14px;
}
.lib-item .path { color: var(--fog); font-family: var(--font-mono); font-size: 12px; }

.admin-tag, .you-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
}
.admin-tag { background: rgba(17, 157, 164, 0.18); color: var(--teal); }
.you-tag { background: rgba(255,255,255,0.08); color: var(--fog); }

/* ---------- Category management (Admin) ---------- */

.category-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

.category-manage-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--panel-raised);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 6px 6px 6px 12px;
  font-size: 13px;
  color: var(--paper);
}
.category-manage-chip button {
  background: rgba(255,255,255,0.08);
  border: none;
  color: var(--fog);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.category-manage-chip button:hover { background: var(--signal); color: var(--paper); }

/* ---------- Movies nav dropdown ---------- */

.nav-dropdown { position: relative; }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 190px;
  background: var(--panel-raised);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  padding: 6px;
  z-index: 30;
}
.nav-dropdown-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--fog);
  white-space: nowrap;
}
.nav-dropdown-menu a:hover { color: var(--paper); background: rgba(255,255,255,0.06); }
.nav-dropdown-menu a.active { color: var(--ink); background: var(--gold); }
.nav-dropdown-menu .nav-dropdown-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 6px 4px; }
.nav-dropdown-caret { font-size: 9px; margin-left: 5px; opacity: 0.7; }

.category-filter-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 13.5px;
  color: var(--fog);
}
.category-filter-banner strong { color: var(--paper); }
.category-filter-clear {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--fog);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
}
.category-filter-clear:hover { color: var(--paper); border-color: var(--gold); }

/* ---------- Category pills (metadata edit panel) ---------- */

.category-pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.category-pill {
  background: var(--ink);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--fog);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.category-pill:hover { border-color: var(--gold-dim); color: var(--paper); }
.category-pill.selected { background: rgba(232,197,71,0.15); border-color: var(--gold); color: var(--gold); }

/* ---------- Metadata editing ---------- */

.lock-badge {
  font-size: 0.7em;
  vertical-align: middle;
  opacity: 0.85;
}

.chip-link {
  border-color: var(--gold-dim);
  color: var(--gold);
  transition: background 0.15s ease;
}
.chip-link:hover { background: rgba(232, 197, 71, 0.12); }

.episode-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.episode-imdb-link {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold);
  margin-left: 8px;
}
.episode-imdb-link:hover { text-decoration: underline; }

.episode-edit-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--fog);
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  flex-shrink: 0;
}
.episode-edit-btn:hover { color: var(--paper); border-color: var(--gold); }

.edit-form {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 14px;
  max-width: 480px;
}

.edit-form .field textarea {
  width: 100%;
  background: var(--ink);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--paper);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-body);
  resize: vertical;
}
.edit-form .field textarea:focus { outline: 2px solid var(--gold); outline-offset: -1px; }

.lock-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--fog);
  margin: 4px 0 16px;
  cursor: pointer;
  line-height: 1.4;
}
.lock-toggle input { accent-color: var(--gold); width: 15px; height: 15px; flex-shrink: 0; }

.edit-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.edit-actions .btn { padding: 9px 16px; font-size: 13.5px; }

/* ---------- Avatars ---------- */

.avatar-wrap {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.avatar-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }

.avatar-fallback {
  font-family: var(--font-display);
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-tiny { width: 38px; height: 38px; border-radius: 8px; }
.avatar-tiny.avatar-fallback { font-size: 16px; }

.avatar-small { width: 96px; height: 96px; border-radius: 12px; }
.avatar-small.avatar-fallback { font-size: 36px; }

.avatar-medium { width: 120px; height: 120px; border-radius: 14px; }
.avatar-medium.avatar-fallback { font-size: 44px; }

.avatar-large { width: 200px; height: 200px; min-width: 200px; border-radius: 18px; }
.avatar-large.avatar-fallback { font-size: 72px; }

.avatar-upload-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 4px;
}
.avatar-upload-controls { display: flex; flex-direction: column; gap: 8px; }
.avatar-upload-label { text-align: center; cursor: pointer; }

/* ---------- Profiles page ---------- */

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 22px;
}

.profile-tile {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 10px;
  border-radius: var(--radius);
  transition: transform 0.18s ease, background 0.18s ease;
}
.profile-tile:hover, .profile-tile:focus-visible {
  transform: translateY(-3px);
  background: rgba(255,255,255,0.04);
  outline: none;
}
.profile-tile:hover .avatar-wrap, .profile-tile:focus-visible .avatar-wrap {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 1px var(--gold-dim);
}

.profile-tile-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--paper);
  text-align: center;
}

.profile-tile.expanded {
  grid-column: 1 / -1;
  cursor: default;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 32px;
  padding: 28px;
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.08);
}
.profile-tile.expanded:hover { transform: none; background: var(--panel); }

.profile-stats { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }

.profile-stats-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  color: var(--paper);
}

.profile-stat-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fog);
  margin-bottom: 2px;
}
.profile-stat-value {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--paper);
}

.profile-collapse-btn { margin-top: 4px; align-self: flex-start; }

.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  background: var(--panel-raised);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--paper);
  padding: 12px 20px;
  border-radius: 30px;
  font-size: 13.5px;
  z-index: 200;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.loading {
  color: var(--fog);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 40px 0;
  text-align: center;
}

.hidden { display: none !important; }

.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media (max-width: 700px) {
  .nav-links { display: none; }
  .nav-search { display: none; }
  .detail-content { flex-direction: column; margin-top: -90px; }
  .detail-poster { width: 150px; min-width: 150px; }
  .detail-info { padding-top: 16px; max-width: 100%; }
  .detail-title { font-size: 32px; }
  .profile-tile.expanded { flex-direction: column; align-items: flex-start; text-align: left; }
  .avatar-large { width: 140px; height: 140px; min-width: 140px; }
  .hero { min-height: 420px; margin: -32px -16px 32px; }
  .hero-content { padding: 0 20px 32px; max-width: 100%; }
  .hero-title { font-size: 34px; }
  .hero-meta { gap: 22px; }
  .hero-nav-arrow { width: 36px; height: 36px; }
  .recent-columns { grid-template-columns: 1fr; gap: 32px; }
  .recent-col .grid { grid-template-columns: repeat(3, 1fr); }
}


/* ---------- Admin: background scan progress ---------- */
.scan-progress {
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin: 8px 0 4px;
  max-width: 420px;
}
.scan-progress-inner {
  height: 100%;
  background: var(--teal);
  border-radius: 3px;
  transition: width 0.6s ease;
}
.scan-status { min-height: 0; }
.scan-status:not(:empty) { margin-top: 2px; }

/* ---------- Detail page: enrichment (concept layout) ---------- */

.detail-tagline {
  font-style: italic;
  color: var(--fog);
  font-size: 14px;
  margin-bottom: 6px;
}

.dmeta-cols { display: flex; flex-wrap: wrap; gap: 10px 34px; margin: 14px 0 4px; }
.dmeta-item { display: flex; flex-direction: column; gap: 3px; }
.dmeta-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fog); }
.dmeta-value { font-size: 14px; color: var(--paper); }

.tech-tiles { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.tech-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-sm); padding: 9px 16px; cursor: pointer;
  color: var(--paper); font-family: inherit; text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.tech-tile:hover:not(:disabled) { border-color: var(--gold-dim); }
.tech-tile.active { border-color: var(--gold); background: rgba(232,197,71,0.08); }
.tech-tile:disabled { opacity: 0.45; cursor: default; }
.tech-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fog); }
.tech-value { font-size: 13.5px; }
.tech-panel {
  margin-top: 8px; padding: 12px 16px; border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.07);
  font-size: 13.5px; color: var(--paper); line-height: 1.8;
  font-family: var(--font-mono); max-width: 640px;
}

.detail-sections { padding: 34px 28px 0; position: relative; z-index: 2; }

.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.review-card {
  position: relative; background: var(--panel); border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius); padding: 18px 20px;
}
.review-score {
  position: absolute; top: 16px; right: 16px;
  background: var(--gold); color: #1c1c1c; font-weight: 800; font-size: 13px;
  border-radius: 6px; padding: 3px 8px;
}
.review-author { font-weight: 700; margin-bottom: 8px; padding-right: 48px; }
.review-text { color: var(--fog); font-size: 13.5px; line-height: 1.65; margin: 0; }

.cast-row { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.cast-card { flex: 0 0 118px; }
.cast-photo {
  width: 118px; height: 148px; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--panel); border: 1px solid rgba(255,255,255,0.06);
}
.cast-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cast-photo-fallback {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 30px; color: var(--fog);
}
.cast-name { font-size: 13px; font-weight: 700; margin-top: 8px; }
.cast-character { font-size: 12px; color: var(--fog); margin-top: 2px; }

.extras-pills { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.extras-pill {
  background: rgba(255,255,255,0.06); border: 1px solid transparent; color: var(--fog);
  border-radius: 999px; padding: 6px 15px; font-size: 12.5px; cursor: pointer;
  font-family: inherit; transition: all 0.15s ease;
}
.extras-pill:hover { color: var(--paper); }
.extras-pill.active { background: var(--gold); color: #1c1c1c; font-weight: 700; }
.extras-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.extras-thumb { cursor: pointer; }
.extras-img {
  position: relative; aspect-ratio: 16/9; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--panel); border: 1px solid rgba(255,255,255,0.06);
}
.extras-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.extras-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 26px; background: rgba(0,0,0,0.25); opacity: 0;
  transition: opacity 0.15s ease;
}
.extras-thumb:hover .extras-play { opacity: 1; }
.extras-name { font-size: 13px; font-weight: 600; margin-top: 8px; }
.extras-type { font-size: 11.5px; color: var(--fog); margin-top: 2px; }

.seasons-rail { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.season-card { flex: 0 0 138px; cursor: pointer; }
.season-card.missing { cursor: default; }
.season-poster {
  position: relative; aspect-ratio: 2/3; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--panel); border: 1px solid rgba(255,255,255,0.08);
  transition: border-color 0.15s ease;
}
.season-card:not(.missing):hover .season-poster { border-color: var(--gold); }
.season-card.missing .season-poster { border-style: dashed; opacity: 0.55; }
.season-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.season-poster-fallback {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 26px; color: var(--fog);
}
.season-missing-tag {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.7); color: var(--fog); font-size: 10.5px;
  border-radius: 999px; padding: 3px 9px; white-space: nowrap;
}
.season-name { font-size: 13px; font-weight: 700; margin-top: 8px; }
.season-meta { font-size: 12px; color: var(--fog); margin-top: 2px; }

/* ==========================================================================
   TITAN THEME — home + shared restyle
   ========================================================================== */

.titan-home { padding-bottom: 60px; }

/* ---- Hero (tall key-art with floating glass nav feel) ---- */
.titan-home #home-hero .hero,
.titan-home #home-spotlight .hero {
  position: relative;
  width: 100%;
  height: clamp(440px, 62vh, 720px);
  border-radius: 0;
  margin: 0 0 8px;
  border: none;
  background-size: cover;
  background-position: center 18%;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.titan-home #home-spotlight .hero {
  height: clamp(260px, 34vh, 340px);
  border-radius: 16px;
  margin: 0 clamp(20px, 4vw, 56px) 44px;
  width: auto;
}
/* darkening + color wash so text always reads */
.titan-home .hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,13,18,.35) 0%, transparent 30%, transparent 52%, var(--ink) 100%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 clamp(24px, 4.5vw, 64px) clamp(40px, 6vh, 64px);
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.hero-eyebrow {
  font: 600 13px 'Outfit', sans-serif;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ac);
}
.hero-title {
  font: italic 300 84px/1 'Source Serif 4', serif;
  letter-spacing: -1px;
  margin: 0;
  color: var(--paper);
}
.titan-home #home-spotlight .hero-title { font-size: 60px; }
.hero-meta {
  display: flex;
  gap: 18px;
  font: 500 13px 'Outfit', sans-serif;
  color: var(--fog-2);
}
.hero-meta-item { display: flex; gap: 6px; }
.hero-meta-label { display: none; }  /* Titan shows inline values, not labels */
.hero-overview {
  margin: 0;
  font: 400 15px/1.6 'Outfit', sans-serif;
  color: #cdd7e0;
  max-width: 620px;
  text-wrap: pretty;
}
.hero-actions { display: flex; gap: 10px; margin-top: 4px; flex-wrap: wrap; }

/* Pill buttons (Titan style) — applies app-wide via the shared btn classes */
.btn {
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font: 600 14px 'Outfit', sans-serif;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--ac); color: var(--ac-ink); border: none; font-weight: 700; }
.btn-primary:hover { transform: translateY(-1px); background: #52d0d8; }
.btn-ghost {
  background: rgba(10,13,18,.45);
  color: var(--paper);
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { border-color: rgba(255,255,255,.4); }

/* hero nav arrows / dots */
.hero-nav-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 3; width: 44px; height: 44px; border-radius: 999px;
  background: rgba(10,13,18,.5); color: var(--paper);
  border: 1px solid rgba(255,255,255,.18); cursor: pointer; font-size: 22px;
  backdrop-filter: blur(8px);
}
.hero-nav-prev { left: 20px; } .hero-nav-next { right: 20px; }
.hero-dots { position: absolute; bottom: 20px; right: 44px; z-index: 3; display: flex; gap: 7px; }
.hero-dot { width: 8px; height: 8px; border-radius: 999px; border: none; background: rgba(255,255,255,.3); cursor: pointer; }
.hero-dot.active { background: var(--ac); }

/* ---- Rails (sections) ---- */
.titan-sec { padding: 0 clamp(20px, 4vw, 56px); margin-bottom: 44px; }
.titan-rail-head {
  display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 18px;
}
.titan-rail-title-wrap { display: flex; align-items: center; gap: 12px; }
.titan-rail-title {
  margin: 0;
  font: italic 500 26px 'Source Serif 4', serif;
  color: var(--paper);
}
.titan-friend-badge {
  width: 28px; height: 28px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font: 600 12px 'Outfit', sans-serif; color: #fff;
}
.titan-soon {
  font: 600 10.5px 'Outfit', sans-serif; letter-spacing: 1px; text-transform: uppercase;
  color: var(--ac); border: 1px solid var(--ac-dim); border-radius: 999px; padding: 3px 10px;
  position: relative; top: -3px;
}
.titan-rail-arrows { display: flex; gap: 8px; }
.titan-arrow {
  width: 32px; height: 32px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.15); background: transparent; color: #dbe4ec;
  cursor: pointer; font-size: 16px; transition: border-color .15s ease, color .15s ease;
}
.titan-arrow:hover { border-color: var(--ac); color: var(--ac); }

.titan-row {
  display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none;
  scroll-behavior: smooth; padding-bottom: 4px;
}
.titan-row::-webkit-scrollbar { display: none; }

/* ---- Poster cards ---- */
.titan-card { flex: none; width: 206px; display: flex; flex-direction: column; gap: 9px; cursor: pointer; }
.titan-poster {
  position: relative; aspect-ratio: 2/3; border-radius: 12px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.5); transition: transform .18s ease;
  background: var(--panel);
}
.titan-card:hover .titan-poster { transform: translateY(-5px); }
.titan-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.titan-poster-fallback {
  width: 100%; height: 100%; display: flex; align-items: flex-end; padding: 14px;
  font: italic 500 20px 'Source Serif 4', serif; color: var(--fog-2);
  background: linear-gradient(160deg, var(--panel), var(--ink-2));
}
.titan-wl {
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25); background: rgba(10,13,18,.55); color: var(--paper);
  font-size: 16px; cursor: pointer; backdrop-filter: blur(6px); opacity: 0; transition: opacity .15s ease;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.titan-card:hover .titan-wl { opacity: 1; }
.titan-wl:hover { border-color: var(--ac); color: var(--ac); }
.titan-dismiss:hover { border-color: var(--signal); color: var(--signal); }
.titan-card-meta { display: flex; flex-direction: column; gap: 2px; }
.titan-card-title { font: 500 14px 'Outfit', sans-serif; color: var(--paper); }
.titan-card-year { font: 400 12px 'Outfit', sans-serif; color: var(--fog); }
.titan-card-note { font: italic 400 12px 'Source Serif 4', serif; color: var(--fog-2); }

/* ---- Continue watching (16:9 wide cards) ---- */
.titan-cw { flex: none; width: 460px; max-width: 72vw; cursor: pointer; }
.titan-cw-art {
  position: relative; width: 100%; height: 250px; border-radius: 14px; overflow: hidden;
  background-size: cover; background-position: center; box-shadow: 0 10px 30px rgba(0,0,0,.55);
  transition: transform .18s ease; background-color: var(--panel);
}
.titan-cw:hover .titan-cw-art { transform: translateY(-5px); }
.titan-cw-fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 24px; text-align: center; font: italic 500 26px 'Source Serif 4', serif; color: var(--fog-2);
}
.titan-cw-label {
  position: absolute; left: 18px; bottom: 16px; right: 18px;
  font: 500 13px 'Outfit', sans-serif; color: #d5dee6; text-shadow: 0 1px 6px rgba(0,0,0,.6);
}
.titan-cw-label span { color: var(--fog-2); }
.titan-cw-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(255,255,255,.15); }
.titan-cw-bar > div { height: 100%; background: var(--ac); }

/* ---- Music placeholder ---- */
.titan-album-art {
  aspect-ratio: 1; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.titan-album-mono { font: 400 76px 'Bebas Neue', sans-serif; color: rgba(255,255,255,.85); }
.titan-music-placeholder { opacity: .82; }
.titan-skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.12), rgba(255,255,255,.06));
  background-size: 200% 100%; border-radius: 5px; animation: titanShimmer 1.6s infinite; color: transparent;
  width: 80%;
}
.titan-skeleton-sm { width: 50%; height: 10px; }
@keyframes titanShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---- Responsive ---- */
@media (max-width: 760px) {
  .titan-sec { padding: 0 20px; }
  .hero-content { padding: 0 24px 40px; }
  .hero-title { font-size: 54px; }
  .titan-home #home-spotlight .hero { margin: 0 20px 32px; }
  .titan-card { width: 150px; }
  .titan-cw { width: 300px; }
}

/* ==========================================================================
   TITAN NAV — floating glass header (1:1 with the Titan design)
   ========================================================================== */

.titan-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 20px;
  padding: 18px clamp(20px, 4vw, 56px);
  transition: background .25s ease, backdrop-filter .25s ease, border-color .25s ease;
  border-bottom: 1px solid transparent;
}
/* A soft top-down scrim keeps the wordmark, avatars, and icons legible when
   the transparent nav floats over bright artwork (before it gains its solid
   scrolled backing). */
.titan-nav::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(8,10,14,.55) 0%, rgba(8,10,14,.2) 55%, transparent 100%);
  opacity: 1; transition: opacity .25s ease;
}
.titan-nav.scrolled::before { opacity: 0; }
/* Once scrolled (or on non-home pages) the bar gains a solid glass backing. */
.titan-nav.scrolled {
  background: rgba(10,13,18,.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.titan-wordmark {
  display: flex; align-items: baseline; gap: 1px;
  font: 800 22px 'Outfit', sans-serif; letter-spacing: 1px; color: var(--paper);
  cursor: pointer; user-select: none;
}
.titan-wordmark span { color: var(--ac); }
.titan-nav-spacer { flex: 1; }
.titan-nav-left { display: flex; align-items: center; gap: 22px; min-width: 0; flex-shrink: 0; }

/* Collapsible search: an icon that expands into a field on click. */
.titan-nav-search-wrap {
  display: flex; align-items: center; position: relative;
}
.titan-nav-search-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 999px; flex: none;
  border: 1px solid rgba(255,255,255,.14); background: rgba(10,13,18,.4);
  color: var(--paper); cursor: pointer; backdrop-filter: blur(12px);
  transition: color .18s ease, border-color .18s ease;
  z-index: 2;
}
.titan-nav-search-toggle:hover { color: var(--ac); border-color: var(--ac-dim); }
.titan-nav-search {
  width: 0; padding: 0; opacity: 0; pointer-events: none;
  border: 1px solid transparent; border-radius: 999px; height: 38px;
  background: rgba(10,13,18,.55); color: var(--paper);
  font: 400 13.5px 'Outfit', sans-serif; outline: none; backdrop-filter: blur(12px);
  margin-left: -38px; padding-left: 44px;
  transition: width .28s cubic-bezier(.22,1,.36,1), opacity .2s ease, border-color .18s ease;
}
.titan-nav-search::placeholder { color: var(--fog); }
.titan-nav-search-wrap.expanded .titan-nav-search {
  width: clamp(200px, 24vw, 320px); opacity: 1; pointer-events: auto;
  padding-right: 16px; border-color: rgba(255,255,255,.16);
}
.titan-nav-search-wrap.expanded .titan-nav-search:focus { border-color: var(--ac); }
.titan-nav-search-wrap.expanded .titan-nav-search-toggle { color: var(--ac); border-color: transparent; background: transparent; }
.titan-nav-pills {
  display: flex; gap: 6px; padding: 5px; border-radius: 999px;
  background: rgba(10,13,18,.4); backdrop-filter: blur(12px);
}
.titan-nav-pill {
  padding: 7px 16px; border-radius: 999px; border: none; cursor: pointer;
  background: transparent; color: var(--fog-2); font: 600 13px 'Outfit', sans-serif;
  transition: background .15s ease, color .15s ease;
}
.titan-nav-pill:hover { color: var(--paper); }
.titan-nav-pill.active { background: var(--ac); color: var(--ac-ink); }
.titan-nav-actions { display: flex; align-items: center; gap: 10px; }
.titan-nav-icon {
  width: 38px; height: 38px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  color: var(--fog-2); background: rgba(10,13,18,.4); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.1); transition: color .15s ease, border-color .15s ease; position: relative;
}
.titan-nav-icon:hover, .titan-nav-icon.active { color: var(--ac); border-color: var(--ac-dim); }
.titan-nav-avatar {
  width: 34px; height: 34px; border-radius: 999px; overflow: hidden; display: flex;
  align-items: center; justify-content: center;
  background: linear-gradient(140deg,#2a6f8e,#3fc1c9);
  border: 1px solid rgba(255,255,255,.12);
}
.titan-nav-avatar img { width: 100%; height: 100%; object-fit: cover; }
.titan-nav-icon .nav-icon-badge {
  position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--ac); color: var(--ac-ink);
  font: 700 10px 'Outfit', sans-serif; display: flex; align-items: center; justify-content: center;
}

/* The home hero starts at the very top and slides UNDER the transparent nav.
   Other pages need top padding so content clears the fixed bar. */
#app { padding-top: 0; }
.titan-home { padding-top: 0; }
main#app > .titan-home:first-child #home-hero { margin-top: 0; }
/* Non-home views (Movies, Shows, detail, admin, account) clear the fixed nav */
main#app > *:not(.titan-home) { padding-top: 84px; }

/* Music placeholder page */
.music-empty { text-align: center; padding: 80px 20px; color: var(--fog); max-width: 520px; margin: 0 auto; }
.music-empty-mono { font: 400 120px 'Bebas Neue', sans-serif; color: rgba(63,193,201,.28); line-height: 1; }
.music-empty p { font: 400 15px/1.6 'Outfit', sans-serif; margin-top: 16px; }

@media (max-width: 760px) {
  .titan-nav { padding: 14px 20px; gap: 12px; }
  .titan-nav-search-wrap { display: none; }
  .titan-nav-pills { gap: 3px; padding: 4px; }
  .titan-nav-pill { padding: 6px 11px; font-size: 12px; }
  main#app > *:not(.titan-home) { padding-top: 72px; }
}

/* ==========================================================================
   MUSIC — browse, album, and now-playing bar
   ========================================================================== */

.music-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 24px;
}
.music-cover {
  position: relative; background-size: cover; background-position: center;
}
.music-artist-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.music-artist-chip {
  padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12);
  background: var(--panel); color: var(--paper); font: 500 13px 'Outfit', sans-serif;
  cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.music-artist-chip:hover { border-color: var(--ac); }
.music-artist-chip span { color: var(--fog); margin-left: 4px; }

/* Album detail hero */
.album-hero { display: flex; gap: 32px; padding: 0 0 32px; align-items: flex-end; text-align: left; }
.album-hero-cover {
  width: 240px; height: 240px; flex: none; border-radius: 16px; background-size: cover; background-position: center;
  box-shadow: 0 16px 48px rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center;
}
.album-hero-cover.nocover { background: linear-gradient(140deg, var(--panel), var(--ink-2)); }
.album-hero-cover span { font: 400 96px 'Bebas Neue', sans-serif; color: rgba(255,255,255,.6); }
.album-hero-info { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding-bottom: 8px; }
.album-hero-eyebrow { font: 600 12px 'Outfit'; letter-spacing: 3px; text-transform: uppercase; color: var(--ac); }
.album-hero-title { font: italic 300 64px/1 'Source Serif 4', serif; margin: 0; color: var(--paper); text-align: left; }
.album-hero-meta { font: 500 14px 'Outfit'; color: var(--fog-2); text-align: left; }
.album-hero-actions { margin-top: 8px; }

/* Tracklist — left-aligned, capped width so it stays readable over the dark side */
.music-tracklist { padding: 0 0 40px; max-width: 760px; margin: 0; }
.music-track-row {
  display: grid; grid-template-columns: 40px 1fr auto auto; align-items: center; gap: 16px;
  padding: 11px 14px; border-radius: 10px; cursor: pointer; transition: background .12s ease;
}
.music-track-row:hover { background: var(--panel); }
.music-track-num { font: 400 14px 'Outfit'; color: var(--fog); text-align: center; }
.music-track-title { font: 500 14.5px 'Outfit'; color: var(--paper); }
.music-track-dur { font: 400 13px 'Outfit'; color: var(--fog); font-variant-numeric: tabular-nums; }
.lossless-badge {
  font: 600 10px 'Outfit'; letter-spacing: .5px; text-transform: uppercase; color: var(--ac);
  border: 1px solid var(--ac-dim); border-radius: 999px; padding: 2px 8px;
}

/* Now-playing bar */
.music-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  display: grid; grid-template-columns: minmax(180px, 1fr) auto minmax(200px, 2fr); gap: 20px; align-items: center;
  padding: 12px clamp(16px, 3vw, 40px);
  background: rgba(13,17,25,.85); backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,.08);
  --bar-glow: var(--ac); --bar-accent: var(--ac);
  transition: box-shadow .6s ease, border-color .6s ease;
}
/* Subtle album-colored glow along the top edge of the bar; pulses gently. */
.music-bar.glowing {
  border-top-color: color-mix(in srgb, var(--bar-glow) 45%, transparent);
  box-shadow: 0 -1px 0 color-mix(in srgb, var(--bar-glow) 40%, transparent),
              0 -12px 40px -16px var(--bar-glow);
  animation: bar-pulse 4.5s ease-in-out infinite;
}
@keyframes bar-pulse {
  0%, 100% { box-shadow: 0 -1px 0 color-mix(in srgb, var(--bar-glow) 35%, transparent),
                         0 -12px 40px -18px var(--bar-glow); }
  50%      { box-shadow: 0 -1px 0 color-mix(in srgb, var(--bar-glow) 55%, transparent),
                         0 -16px 52px -14px var(--bar-glow); }
}
@media (prefers-reduced-motion: reduce) { .music-bar.glowing { animation: none; } }
.music-bar.hidden { display: none; }
.music-bar-now { display: flex; align-items: center; gap: 13px; min-width: 0; }
.music-bar-cover {
  width: 54px; height: 54px; border-radius: 9px; flex: none; background-size: cover; background-position: center;
  background-color: var(--panel);
  box-shadow: 0 4px 16px -4px color-mix(in srgb, var(--bar-glow) 60%, transparent);
  transition: transform .18s ease, box-shadow .4s ease;
}
.music-bar-cover.clickable { cursor: pointer; }
.music-bar-cover.clickable:hover { transform: scale(1.05); box-shadow: 0 8px 24px -4px var(--bar-glow); }
.music-bar-meta { min-width: 0; }
.music-bar-title { font: 600 14px 'Outfit'; color: var(--paper); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-bar-artist { font: 400 12.5px 'Outfit'; color: var(--fog-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-bar-controls { display: flex; align-items: center; gap: 14px; }
.music-bar-btn {
  background: none; border: none; color: var(--paper); cursor: pointer; font-size: 16px; opacity: .85;
  transition: opacity .12s ease, transform .12s ease;
}
.music-bar-btn:hover { opacity: 1; }
.music-bar-play {
  width: 42px; height: 42px; border-radius: 999px;
  background: var(--bar-accent); color: #0a0d12;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  transition: background .5s ease, transform .12s ease;
}
.music-bar-play:hover { transform: scale(1.06); }
.music-bar-progress-wrap { display: flex; align-items: center; gap: 12px; }
.music-bar-time { font: 400 12px 'Outfit'; color: var(--fog); font-variant-numeric: tabular-nums; min-width: 38px; }
.music-bar-track { flex: 1; height: 5px; border-radius: 999px; background: rgba(255,255,255,.14); cursor: pointer; overflow: hidden; }
.music-bar-fill {
  height: 100%; width: 0; border-radius: 999px;
  background: var(--bar-accent); transition: background .5s ease;
}

@media (max-width: 760px) {
  .album-hero { flex-direction: column; align-items: flex-start; }
  .album-hero-cover { width: 160px; height: 160px; }
  .album-hero-title { font-size: 44px; }
  .music-bar { grid-template-columns: 1fr auto; gap: 12px; }
  .music-bar-progress-wrap { display: none; }
}

/* ==========================================================================
   MEDIA DASHBOARD — live stats, sessions, security
   ========================================================================== */

.dash-header-block { position: relative; }
.dash-title-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.dash-live-dot {
  width: 9px; height: 9px; border-radius: 999px; background: var(--ac);
  box-shadow: 0 0 0 0 rgba(63,193,201,.6); animation: dashPulse 2s infinite;
}
@keyframes dashPulse {
  0% { box-shadow: 0 0 0 0 rgba(63,193,201,.5); }
  70% { box-shadow: 0 0 0 8px rgba(63,193,201,0); }
  100% { box-shadow: 0 0 0 0 rgba(63,193,201,0); }
}

/* Security banner */
.dash-security {
  display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border-radius: 12px;
  margin-bottom: 18px; border: 1px solid;
}
.dash-security.ok { background: rgba(63,193,201,.08); border-color: rgba(63,193,201,.3); }
.dash-security.warn { background: rgba(224,176,74,.08); border-color: rgba(224,176,74,.35); }
.dash-security-icon { font-size: 22px; line-height: 1; }
.dash-security-text { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.dash-security-text strong { font: 600 15px 'Outfit', sans-serif; color: var(--paper); }
.dash-security-text span { font: 400 13px/1.5 'Outfit', sans-serif; color: var(--fog-2); }
.dash-security-badges { display: flex; flex-direction: column; gap: 6px; }
.dash-badge {
  font: 600 11px 'Outfit'; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  background: rgba(255,255,255,.06); color: var(--fog); border: 1px solid rgba(255,255,255,.1);
}
.dash-badge.on { background: rgba(63,193,201,.15); color: var(--ac); border-color: var(--ac-dim); }

/* Stat cards */
.dash-stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 22px;
}
.dash-stat {
  background: var(--ink-2); border: 1px solid rgba(255,255,255,.06); border-radius: 12px; padding: 14px 16px;
}
.dash-stat-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.dash-stat-head span { font: 500 13px 'Outfit'; color: var(--fog-2); }
.dash-stat-head strong { font: 700 20px 'Outfit'; color: var(--paper); }
.dash-stat-track { height: 6px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; }
.dash-stat-fill { height: 100%; border-radius: 999px; transition: width .5s ease; }
.dash-stat-sub { font: 400 11.5px 'Outfit'; color: var(--fog); margin-top: 7px; }

.dash-subhead { font: 600 14px 'Outfit'; color: var(--paper); margin: 22px 0 12px; }

/* Sessions table */
.dash-sessions { width: 100%; border-collapse: collapse; }
.dash-sessions th {
  text-align: left; font: 600 11px 'Outfit'; letter-spacing: .5px; text-transform: uppercase;
  color: var(--fog); padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.dash-sessions td { padding: 12px; font: 400 13.5px 'Outfit'; color: var(--paper); border-bottom: 1px solid rgba(255,255,255,.04); }
.dash-media { color: var(--fog-2); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-tag { font: 600 10px 'Outfit'; color: var(--ac); border: 1px solid var(--ac-dim); border-radius: 4px; padding: 1px 5px; }
.dash-scope { font: 600 11px 'Outfit'; padding: 3px 10px; border-radius: 999px; }
.dash-scope.local { background: rgba(63,193,201,.14); color: var(--ac); }
.dash-scope.remote { background: rgba(224,176,74,.14); color: #e8b04a; }
.dash-speed { font: 600 12px 'Outfit'; margin-left: 4px; }
.dash-speed.ok { color: var(--ac); }
.dash-speed.slow { color: #e06a6a; }
.dash-empty { padding: 24px; text-align: center; color: var(--fog); font: 400 14px 'Outfit'; }

/* Per-user connection badges */
.conn-badge {
  font: 600 10.5px 'Outfit'; padding: 2px 9px; border-radius: 999px; margin-left: 8px; white-space: nowrap;
}
.conn-badge.idle { background: rgba(255,255,255,.06); color: var(--fog); }
.conn-badge.local { background: rgba(63,193,201,.14); color: var(--ac); }
.conn-badge.safe { background: rgba(63,193,201,.16); color: var(--ac); }
.conn-badge.unsafe { background: rgba(224,106,106,.16); color: #e06a6a; }

@media (max-width: 760px) {
  .dash-security { flex-wrap: wrap; }
  .dash-sessions th:nth-child(2), .dash-sessions td:nth-child(2) { display: none; }
}

/* Album cards on the Music landing reuse the Movies/Series card + rail, but
   album art is square (1:1) rather than the 2:3 movie-poster ratio. */
.poster-square { aspect-ratio: 1 / 1; }

/* ==========================================================================
   Active-users cluster (next to the Titan wordmark) + dashboard additions
   ========================================================================== */

.titan-active-users {
  display: flex; align-items: center; min-height: 34px; padding-left: 20px;
  border-left: 1px solid rgba(255,255,255,.12); flex-shrink: 0;
}
.titan-active-users:empty { padding-left: 0; border-left: none; }
.active-user {
  position: relative; display: inline-flex; margin-left: -8px;
  width: 30px; height: 30px; border-radius: 999px; overflow: visible;
  border: 2px solid var(--ink); transition: transform .15s ease;
}
.active-user:first-child { margin-left: 0; }
.active-user:hover { transform: translateY(-2px); z-index: 2; }
/* Constrain whatever avatarHtml renders (image OR letter fallback) to a tidy
   28px circle so a fallback initial can never spill next to the wordmark. */
.active-user .avatar-wrap,
.active-user .avatar-fallback {
  width: 28px !important; height: 28px !important; border-radius: 999px;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  font: 700 12px 'Outfit', sans-serif; color: #fff; line-height: 1;
}
.active-user .avatar-wrap img { width: 100%; height: 100%; object-fit: cover; }
.active-user-dot {
  position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 999px;
  border: 2px solid var(--ink);
}
.active-user-dot.video { background: var(--ac); }
.active-user-dot.music { background: #b98adf; }
.active-user-more {
  display: inline-flex; align-items: center; justify-content: center; margin-left: 2px;
  min-width: 28px; height: 28px; padding: 0 7px; border-radius: 999px;
  background: var(--panel); color: var(--fog); font: 600 12px 'Outfit', sans-serif;
  border: 2px solid var(--ink);
}

/* Server-identity header block on the Media Dashboard */
.server-identity-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.server-identity h3 { font: 600 18px 'Outfit', sans-serif; }

/* Session type icons (music vs video) in the dashboard table */
.dash-type-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  border-radius: 6px; font-size: 13px;
}
.dash-type-icon.music { background: rgba(185,138,223,.16); color: #b98adf; }
.dash-type-icon.video { background: rgba(63,193,201,.14); color: var(--ac); }

/* ==========================================================================
   MUSIC DETAIL PAGES — artist & album landing with backdrop
   ========================================================================== */

.music-detail { position: relative; min-height: 100vh; }
.music-detail-backdrop {
  position: absolute; top: 0; left: 0; right: 0; height: 62vh; min-height: 420px;
  background-size: cover; background-position: center 22%;
  z-index: 0;
}
.music-detail-backdrop.nobackdrop { background: linear-gradient(160deg, var(--panel), var(--ink)); }
.music-detail-scrim {
  position: absolute; top: 0; left: 0; right: 0; height: 62vh; min-height: 420px; z-index: 1;
  background: linear-gradient(180deg, rgba(10,13,18,.55) 0%, rgba(10,13,18,.35) 30%, var(--ink) 92%);
}
.music-detail-body {
  position: relative; z-index: 2; padding: clamp(150px, 26vh, 300px) clamp(20px, 4vw, 56px) 60px;
  max-width: 1400px; margin: 0 auto;
}

/* Album hero (cover + info side by side) */
.album-hero { display: flex; gap: 32px; align-items: flex-end; margin-bottom: 36px; }
.album-hero-cover {
  width: 232px; height: 232px; flex: none; border-radius: 14px; background-size: cover; background-position: center;
  box-shadow: 0 22px 60px rgba(0,0,0,.65); display: flex; align-items: center; justify-content: center;
}
.album-hero-cover.nocover { background: linear-gradient(140deg, var(--panel), var(--ink-2)); }
.album-hero-cover span { font: 400 92px 'Bebas Neue', sans-serif; color: rgba(255,255,255,.6); }
.album-hero-info { display: flex; flex-direction: column; gap: 10px; padding-bottom: 6px; }
.album-hero-eyebrow, .artist-hero-eyebrow { font: 600 12px 'Outfit'; letter-spacing: 3px; text-transform: uppercase; color: var(--ac); }
.album-hero-title { font: italic 300 60px/1 'Source Serif 4', serif; margin: 0; color: var(--paper); }
.album-hero-meta { font: 500 14px 'Outfit'; color: var(--fog-2); }
.album-hero-artist { color: var(--paper); cursor: pointer; text-decoration: none; border-bottom: 1px solid transparent; }
.album-hero-artist:hover { border-bottom-color: var(--ac); color: var(--ac); }
.album-hero-actions, .artist-hero-actions { margin-top: 10px; display: flex; gap: 10px; }

/* Artist hero (thumbnail + info) */
.artist-hero { display: flex; gap: 28px; align-items: flex-end; margin-bottom: 40px; }
.artist-hero-thumb {
  width: 180px; height: 180px; flex: none; border-radius: 999px; background-size: cover; background-position: center;
  box-shadow: 0 18px 48px rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center;
  border: 3px solid rgba(255,255,255,.1);
}
.artist-hero-thumb.nothumb { background: linear-gradient(140deg, var(--panel), var(--ink-2)); }
.artist-hero-thumb span { font: 400 80px 'Bebas Neue', sans-serif; color: rgba(255,255,255,.6); }
.artist-hero-info { display: flex; flex-direction: column; gap: 8px; max-width: 640px; padding-bottom: 8px; }
.artist-hero-title { font: 700 52px/1 'Outfit', sans-serif; margin: 0; color: var(--paper); }
.artist-hero-meta { font: 500 14px 'Outfit'; color: var(--fog-2); }
.artist-hero-bio { font: 400 13.5px/1.6 'Outfit'; color: var(--fog-2); margin: 6px 0 0; max-height: 4.8em; overflow: hidden; }
.music-albums-section { margin-top: 12px; }
.music-albums-section .section-title { margin-bottom: 16px; }

/* ==========================================================================
   Music artwork editor modal
   ========================================================================== */

.music-modal-overlay {
  position: fixed; inset: 0; z-index: 500; background: rgba(6,8,12,.72); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.music-modal {
  width: min(560px, 100%); max-height: 88vh; overflow-y: auto; background: var(--ink-2);
  border: 1px solid rgba(255,255,255,.1); border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.music-modal-head {
  display: flex; align-items: center; justify-content: space-between; padding: 18px 22px;
  border-bottom: 1px solid rgba(255,255,255,.08); position: sticky; top: 0; background: var(--ink-2); z-index: 2;
}
.music-modal-head h3 { margin: 0; font: 600 17px 'Outfit'; }
.music-modal-close { background: none; border: none; color: var(--fog); font-size: 18px; cursor: pointer; }
.music-modal-close:hover { color: var(--paper); }
.music-modal-body { padding: 20px 22px 24px; }

.art-fetch-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.art-fetch-status { font: 400 13px 'Outfit'; color: var(--fog-2); }
.art-edit-hint { font: 400 12.5px/1.5 'Outfit'; color: var(--fog); margin: 6px 0 18px; }

.art-edit-row { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.art-edit-preview {
  width: 92px; height: 64px; flex: none; border-radius: 8px; background: var(--panel); background-size: cover;
  background-position: center; border: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
}
.art-edit-preview.empty span { font: 400 11px 'Outfit'; color: var(--fog); }
.art-edit-controls { display: flex; flex-direction: column; gap: 6px; }
.art-edit-label { font: 500 13.5px 'Outfit'; color: var(--paper); }
.art-upload-btn { font-size: 13px; padding: 6px 12px; align-self: flex-start; }

.art-edit-field { margin-top: 14px; }
.art-edit-field label { display: block; font: 500 12px 'Outfit'; color: var(--fog); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .5px; }
.art-edit-field input, .art-edit-field textarea {
  width: 100%; background: var(--panel); color: var(--paper); border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px; padding: 9px 12px; font: 400 14px 'Outfit'; resize: vertical;
}
.art-edit-actions { margin-top: 18px; display: flex; justify-content: flex-end; }

@media (max-width: 760px) {
  .album-hero, .artist-hero { flex-direction: column; align-items: flex-start; }
  .album-hero-cover { width: 160px; height: 160px; }
  .artist-hero-thumb { width: 130px; height: 130px; }
  .album-hero-title { font-size: 40px; }
  .artist-hero-title { font-size: 36px; }
}

/* ==========================================================================
   Users page — expandable rounded cards
   ========================================================================== */

.users-page { padding: 96px clamp(20px, 4vw, 56px) 60px; max-width: 900px; margin: 0 auto; }
.users-page-head { margin-bottom: 28px; }
.users-page-head h1 { font: 700 34px 'Outfit', sans-serif; margin: 0 0 4px; color: var(--paper); }
.users-page-head p { font: 400 14px 'Outfit'; color: var(--fog-2); margin: 0; }

.user-cards { display: flex; flex-direction: column; gap: 14px; }
.user-card {
  background: var(--ink-2); border: 1px solid rgba(255,255,255,.07); border-radius: 16px;
  overflow: hidden; cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.user-card:hover { border-color: rgba(255,255,255,.14); }
.user-card:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }
.user-card.expanded { border-color: var(--ac-dim); box-shadow: 0 12px 40px rgba(0,0,0,.4); }

.user-card-head { display: flex; align-items: center; gap: 16px; padding: 16px 20px; }
.user-card-avatar .avatar, .user-card-avatar .avatar-small {
  width: 48px; height: 48px; border-radius: 999px; font-size: 18px;
}
.user-card-id { flex: 1; min-width: 0; }
.user-card-name { font: 600 16px 'Outfit', sans-serif; color: var(--paper); display: flex; align-items: center; gap: 8px; }
.user-card-sub { margin-top: 3px; }
.user-status { font: 600 12px 'Outfit'; padding: 2px 9px; border-radius: 999px; }
.user-status.idle { background: rgba(255,255,255,.06); color: var(--fog); }
.user-status.watching { background: rgba(63,193,201,.14); color: var(--ac); }
.user-status.music { background: rgba(185,138,223,.16); color: #b98adf; }
.user-card-chevron { color: var(--fog); font-size: 16px; transition: transform .22s ease; }
.user-card.expanded .user-card-chevron { transform: rotate(180deg); }

/* The detail area animates open via max-height. */
.user-card-detail {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .28s cubic-bezier(.22,1,.36,1), opacity .2s ease, padding .28s ease;
  padding: 0 20px;
}
.user-card.expanded .user-card-detail { max-height: 260px; opacity: 1; padding: 4px 20px 20px; }

.user-stat-grid { display: grid; grid-template-columns: auto 1fr; gap: 14px 28px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.06); }
.user-stat-value { font: 700 22px 'Outfit', sans-serif; color: var(--paper); }
.user-stat-value.user-stat-recent { font-size: 15px; font-weight: 500; color: var(--fog-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; }
.user-stat-label { font: 500 11.5px 'Outfit'; color: var(--fog); text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }
.user-live-note { margin-top: 14px; font: 500 13px 'Outfit'; color: var(--ac); }

/* ==========================================================================
   "What's new" update modal (center-screen)
   ========================================================================== */

.whatsnew-overlay {
  position: fixed; inset: 0; z-index: 600; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(6,8,12,0); backdrop-filter: blur(0px);
  transition: background .25s ease, backdrop-filter .25s ease;
}
.whatsnew-overlay.visible { background: rgba(6,8,12,.72); backdrop-filter: blur(8px); }
.whatsnew-overlay.closing { background: rgba(6,8,12,0); backdrop-filter: blur(0px); }

.whatsnew-modal {
  width: min(520px, 100%); max-height: 86vh; overflow-y: auto;
  background: linear-gradient(180deg, var(--ink-2), var(--ink));
  border: 1px solid rgba(63,193,201,.2); border-radius: 20px;
  box-shadow: 0 30px 90px rgba(0,0,0,.6); padding: 32px 30px 28px; text-align: center;
  transform: translateY(16px) scale(.97); opacity: 0;
  transition: transform .3s cubic-bezier(.22,1,.36,1), opacity .25s ease;
}
.whatsnew-overlay.visible .whatsnew-modal { transform: translateY(0) scale(1); opacity: 1; }

.whatsnew-sparkle {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, rgba(63,193,201,.25), rgba(63,193,201,.05));
  color: var(--ac);
}
.whatsnew-eyebrow { font: 600 12px 'Outfit'; letter-spacing: 2.5px; text-transform: uppercase; color: var(--ac); }
.whatsnew-title { font: 700 30px 'Outfit', sans-serif; margin: 4px 0 22px; color: var(--paper); }

.whatsnew-entries { text-align: left; display: flex; flex-direction: column; gap: 22px; margin-bottom: 26px; }
.whatsnew-entry-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.whatsnew-entry-head h3 { font: 600 17px 'Outfit', sans-serif; margin: 0; color: var(--paper); }
.whatsnew-release-badge {
  display: inline-block; margin-bottom: 12px;
  font: 600 11.5px 'Outfit', sans-serif; letter-spacing: .3px;
  color: var(--ac); background: rgba(63,193,201,.12);
  border: 1px solid rgba(63,193,201,.25); border-radius: 999px; padding: 3px 11px;
}
.whatsnew-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.whatsnew-list li {
  position: relative; padding-left: 26px; font: 400 14px/1.5 'Outfit', sans-serif; color: var(--fog-2);
}
.whatsnew-list li::before {
  content: '✦'; position: absolute; left: 4px; top: 1px; color: var(--ac); font-size: 13px;
}
.whatsnew-dismiss { width: 100%; padding: 12px; font-size: 15px; }

/* ==========================================================================
   Music landing — artist icon grid
   ========================================================================== */

.music-landing { padding: 96px clamp(20px, 4vw, 56px) 60px; max-width: 1400px; margin: 0 auto; }
.music-landing-head { margin-bottom: 30px; }
.music-landing-head h1 { font: 700 34px 'Outfit', sans-serif; margin: 0 0 4px; color: var(--paper); }
.music-landing-head p { font: 400 14px 'Outfit'; color: var(--fog-2); margin: 0; }

.artist-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 28px 20px;
}

/* --- Large photo cards with a color wash pulled from the artwork --- */
.artist-grid.photo-cards { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 26px 22px; }
.artist-card { cursor: pointer; }
.artist-grid.photo-cards .artist-card {
  --card-dom: rgba(63,193,201,.4); --card-acc: rgba(63,193,201,.25);
  border-radius: 18px; overflow: hidden; background: var(--ink-2);
  border: 1px solid rgba(255,255,255,.06);
  transition: transform .28s cubic-bezier(.22,1,.36,1), box-shadow .3s ease, border-color .3s ease;
  position: relative;
}
.artist-grid.photo-cards .artist-card:hover,
.artist-grid.photo-cards .artist-card:focus-visible {
  transform: translateY(-6px);
  /* Glow uses the card's own extracted color once washed. */
  box-shadow: 0 18px 50px -12px var(--card-dom), 0 8px 24px rgba(0,0,0,.5);
  border-color: color-mix(in srgb, var(--card-dom) 55%, transparent);
}
.artist-card-photo {
  position: relative; width: 100%; aspect-ratio: 1 / 1;
  background-size: cover; background-position: center; background-color: var(--panel);
  display: flex; align-items: center; justify-content: center;
}
.artist-card-photo.noimg { background: linear-gradient(140deg, var(--panel), var(--ink-2)); }
.artist-card-photo span { font: 400 clamp(52px, 7vw, 76px) 'Bebas Neue', sans-serif; color: rgba(255,255,255,.5); }
/* The wash: a soft gradient of the artwork's colors over the photo bottom,
   blending into the info strip. Opacity lifts a touch on hover. */
.artist-card-wash {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 34%,
    color-mix(in srgb, var(--card-dom) 45%, transparent) 82%,
    color-mix(in srgb, var(--card-acc) 70%, transparent) 100%);
  opacity: 0; transition: opacity .5s ease;
}
.artist-card.washed .artist-card-wash { opacity: 1; }
.artist-card-info {
  padding: 12px 14px 14px;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--card-acc) 22%, var(--ink-2)) 0%, var(--ink-2) 70%);
}
.artist-card-name {
  font: 600 15px 'Outfit', sans-serif; color: var(--paper);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.artist-card-sub { font: 400 12.5px 'Outfit'; color: var(--fog-2); margin-top: 2px; }

@media (max-width: 600px) {
  .artist-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 22px 14px; }
  .artist-grid.photo-cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ==========================================================================
   Artist page — full-bleed background, bio, album row
   ========================================================================== */

.artist-page { position: relative; min-height: 100vh; }
.artist-page-bg {
  position: fixed; inset: 0; z-index: 0;
  background-size: cover; background-position: center 20%;
  /* A gentle blur + scale so the single Deezer photo reads as an ambient
     full-page background rather than a stretched portrait. */
  filter: blur(2px) saturate(1.05); transform: scale(1.08);
}
.artist-page-bg.nobg { background: linear-gradient(160deg, #16202e, var(--ink)); filter: none; transform: none; }
.artist-page-veil {
  position: fixed; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(10,13,18,.35) 0%, rgba(10,13,18,.7) 46%, var(--ink) 88%),
    linear-gradient(90deg, rgba(10,13,18,.6) 0%, rgba(10,13,18,.15) 60%);
}
.artist-page-content {
  position: relative; z-index: 2;
  padding: clamp(150px, 26vh, 320px) clamp(20px, 5vw, 72px) 70px;
  max-width: 1000px; margin: 0 auto 0 0; /* hug the left */
}
.artist-page-hero { display: flex; align-items: flex-end; gap: 30px; }
.artist-portrait {
  width: 172px; height: 172px; flex: none; border-radius: 20px;
  background-size: cover; background-position: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.7); border: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
}
.artist-portrait.noimg { background: linear-gradient(140deg, var(--panel), var(--ink-2)); }
.artist-portrait span { font: 400 84px 'Bebas Neue', sans-serif; color: rgba(255,255,255,.6); }
.artist-page-eyebrow { font: 600 12px 'Outfit'; letter-spacing: 3px; text-transform: uppercase; color: var(--ac); }
.artist-page-name {
  font: 800 clamp(44px, 7vw, 82px)/0.98 'Outfit', sans-serif; margin: 6px 0 8px; color: #fff;
  letter-spacing: -1px; text-shadow: 0 4px 30px rgba(0,0,0,.5);
}
.artist-page-meta { font: 500 14px 'Outfit'; color: var(--fog-2); }
.artist-page-bio {
  margin: 26px 0 0; max-width: 760px; font: 400 15px/1.7 'Outfit', sans-serif; color: rgba(255,255,255,.82);
}
.artist-page-actions { margin-top: 20px; }

.artist-albums { margin-top: 44px; position: relative; }
.artist-albums-title { font: 600 20px 'Outfit', sans-serif; color: var(--paper); margin-bottom: 18px; }
.artist-albums-scroller { position: relative; }
.artist-albums-row {
  display: flex; gap: 20px; overflow-x: auto; padding-bottom: 14px; scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent;
}
.artist-albums-row::-webkit-scrollbar { height: 8px; }
.artist-albums-row::-webkit-scrollbar-track { background: transparent; }
.artist-albums-row::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 999px; }
.artist-albums-row::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.35); }
/* Left/right scroll arrows — appear when there's overflow. */
.albums-nav {
  position: absolute; top: calc(84px - 20px); z-index: 5;
  width: 40px; height: 40px; border-radius: 999px; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20,25,33,.9); color: var(--paper); font-size: 18px;
  box-shadow: 0 6px 20px rgba(0,0,0,.5); backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .2s ease, background .2s ease, transform .15s ease;
}
.artist-albums-scroller:hover .albums-nav.show { opacity: 1; }
.albums-nav:hover { background: rgba(30,37,48,.95); transform: scale(1.06); }
.albums-nav.prev { left: -6px; }
.albums-nav.next { right: -6px; }
.albums-nav[disabled] { opacity: 0 !important; pointer-events: none; }
.artist-album-card { flex: 0 0 auto; width: 168px; cursor: pointer; scroll-snap-align: start; }
.artist-album-cover {
  width: 168px; height: 168px; border-radius: 12px; background-size: cover; background-position: center;
  background-color: var(--panel); box-shadow: 0 12px 34px rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  transition: transform .22s cubic-bezier(.22,1,.36,1), box-shadow .22s ease;
}
.artist-album-card:hover .artist-album-cover, .artist-album-card:focus-visible .artist-album-cover {
  transform: translateY(-5px); box-shadow: 0 20px 46px rgba(0,0,0,.6);
}
.artist-album-cover.nocover { background: linear-gradient(140deg, var(--panel), var(--ink-2)); }
.artist-album-cover span { font: 400 60px 'Bebas Neue', sans-serif; color: rgba(255,255,255,.5); }
.artist-album-title {
  margin-top: 10px; font: 600 14px 'Outfit', sans-serif; color: var(--paper);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.artist-album-year { font: 400 12.5px 'Outfit'; color: var(--fog); }

/* ==========================================================================
   Album tracklist — faded glass panel
   ========================================================================== */

.music-tracklist-glass {
  margin-top: 8px; border-radius: 18px; overflow: hidden; max-width: 760px;
  background: rgba(18, 23, 31, 0.5);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
/* Cap the height so long albums scroll inside the panel instead of pushing the
   page down. ~7 rows visible; the rest scrolls. */
.music-tracklist-glass .music-tracklist {
  padding: 10px 8px; max-width: none;
  max-height: 384px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent;
}
.music-tracklist-glass .music-tracklist::-webkit-scrollbar { width: 8px; }
.music-tracklist-glass .music-tracklist::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.18); border-radius: 999px;
}
.music-tracklist-glass .music-tracklist::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.3); }
.music-tracklist-glass .music-track-row { border-radius: 10px; }
.music-tracklist-glass .music-track-row:hover { background: rgba(255,255,255,.08); }

@media (max-width: 760px) {
  .artist-page-hero { flex-direction: column; align-items: flex-start; gap: 18px; }
  .artist-portrait { width: 128px; height: 128px; }
}

/* ==========================================================================
   Album page — full-page cover-matched background
   ========================================================================== */

.album-page { position: relative; min-height: 100vh; }
.album-page-bg {
  position: fixed; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  /* The album cover is square; scaling + blur turns it into an ambient
     full-bleed background whose colors match the record. */
  filter: blur(28px) saturate(1.25) brightness(0.65); transform: scale(1.2);
}
.album-page-bg.nobg { background: linear-gradient(160deg, #1a2230, var(--ink)); filter: none; transform: none; }
.album-page-veil {
  position: fixed; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(10,13,18,.35) 0%, rgba(10,13,18,.6) 50%, var(--ink) 92%),
    radial-gradient(120% 80% at 50% 0%, rgba(10,13,18,.1), rgba(10,13,18,.55));
}
.album-page-content {
  position: relative; z-index: 2;
  padding: clamp(140px, 24vh, 300px) clamp(20px, 5vw, 72px) 80px;
  max-width: 1000px; margin: 0 auto 0 0; /* hug the left */
}

/* ==========================================================================
   Immersive music — whole-page color tinting from artwork
   ========================================================================== */

/* When a page is tinted, the -bg element holds a color GRADIENT (built from the
   artwork palette) instead of a blurred photo — cleaner and more designed. */
.artist-page-bg.tinted, .album-page-bg.tinted {
  filter: none !important; transform: none !important;
  background-size: cover; transition: background-image .6s ease, opacity .6s ease;
}

/* Color-themed accents: buttons, links, and hovers adopt the artwork's accent.
   Only applies inside a .color-themed music page, so the rest of the app keeps
   its default teal. Text stays neutral for readability (per the design). */
.artist-page.color-themed, .album-page.color-themed {
  --ac: var(--music-accent, var(--ac));
  --ac-dim: color-mix(in srgb, var(--music-accent, var(--ac)) 55%, transparent);
}
.color-themed .btn-primary {
  background: var(--music-accent); border-color: transparent; color: #0a0d12;
  transition: background .4s ease, box-shadow .3s ease, transform .15s ease;
}
.color-themed .btn-primary:hover {
  box-shadow: 0 8px 24px -6px var(--music-accent); transform: translateY(-1px);
}
.color-themed .album-hero-artist:hover { color: var(--music-accent); border-bottom-color: var(--music-accent); }
.color-themed .music-track-row:hover { background: color-mix(in srgb, var(--music-accent) 14%, transparent); }
.color-themed .lossless-badge {
  background: color-mix(in srgb, var(--music-accent) 22%, transparent);
  color: color-mix(in srgb, var(--music-accent) 80%, white);
}
.color-themed .btn-ghost:hover { border-color: var(--ac-dim); color: var(--music-accent); }
.color-themed .artist-albums-title, .color-themed .album-hero-eyebrow, .color-themed .artist-page-eyebrow {
  color: var(--music-accent);
}
/* Album cover / artist portrait get a subtle color halo when themed. */
.color-themed .album-hero-cover, .color-themed .artist-portrait {
  box-shadow: 0 20px 60px -12px color-mix(in srgb, var(--music-dominant, #000) 60%, transparent),
              0 10px 30px rgba(0,0,0,.5);
}

/* ==========================================================================
   Immersive artist/album pages — full-bleed faded photo, big portrait, bio
   ========================================================================== */

/* Full-bleed hi-res photo background, visible but faded so text stays readable.
   (Replaces the heavy blur; the photo shows through.) */
.artist-page.immersive .artist-page-bg,
.album-page .album-page-bg {
  position: fixed; inset: 0; z-index: 0;
  background-size: cover; background-position: 95% 22%; /* pushed further right */
  filter: saturate(1.05); transform: none;
  opacity: .62;  /* a bit more visible now that the veil is lighter */
}
.artist-page.immersive .artist-page-veil,
.album-page .album-page-veil {
  position: fixed; inset: 0; z-index: 1;
  background:
    /* Lighter left-to-right fade (~half the previous heaviness): smaller solid
       region and lower opacities, so the image shows through much more. */
    linear-gradient(90deg, var(--ink) 0%, rgba(10,13,18,.82) 20%, rgba(10,13,18,.45) 50%, rgba(10,13,18,.22) 78%, rgba(10,13,18,.08) 100%),
    linear-gradient(180deg, rgba(10,13,18,.28) 0%, rgba(10,13,18,.34) 55%, rgba(10,13,18,.82) 96%);
}

/* Bigger portrait / cover */
.artist-portrait.big { width: 272px; height: 272px; border-radius: 28px; }
.album-hero-cover.big { width: 260px; height: 260px; }

/* Bio / description: clamp to a few lines with a read-more toggle. */
.artist-page-bio, .album-hero-desc {
  margin: 18px 0 0; max-width: 680px;
  font: 400 14.5px/1.7 'Outfit', sans-serif; color: rgba(255,255,255,.82);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4;
  overflow: hidden;
}
.artist-page-bio.expanded, .album-hero-desc.expanded {
  -webkit-line-clamp: unset; display: block;
}
.artist-page-bio.muted { color: var(--fog); font-style: italic; }
.bio-toggle {
  margin-top: 8px; background: none; border: none; cursor: pointer; padding: 0;
  font: 600 13px 'Outfit', sans-serif; color: var(--music-accent, var(--ac));
}
.bio-toggle:hover { text-decoration: underline; }

.artist-page-actions, .album-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

@media (max-width: 760px) {
  .artist-portrait.big { width: 190px; height: 190px; }
  .album-hero-cover.big { width: 180px; height: 180px; }
}

/* ==========================================================================
   Music "What's Fresh" hero banner
   ========================================================================== */

.music-hero {
  position: relative; border-radius: 20px; overflow: hidden; margin-bottom: 36px;
  min-height: 300px; display: flex; align-items: flex-end;
  --hero-accent: var(--ac); --hero-dom: var(--ac);
  box-shadow: 0 20px 60px -20px rgba(0,0,0,.6);
}
.music-hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  filter: blur(34px) saturate(1.35) brightness(.7); transform: scale(1.25);
  transition: background-image .6s ease;
}
.music-hero-veil {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(10,13,18,.35) 0%, rgba(10,13,18,.5) 55%, rgba(10,13,18,.82) 100%),
    linear-gradient(90deg, rgba(10,13,18,.55) 0%, rgba(10,13,18,.15) 60%);
}
.music-hero-inner {
  position: relative; z-index: 2; width: 100%;
  padding: clamp(24px, 4vw, 44px);
}
.music-hero-eyebrow {
  font: 700 13px 'Outfit', sans-serif; letter-spacing: 3px; text-transform: uppercase;
  color: var(--hero-accent); margin-bottom: 18px; transition: color .5s ease;
}
.music-hero-body { display: flex; align-items: flex-end; gap: 26px; }
.music-hero-cover {
  width: 168px; height: 168px; flex: none; border-radius: 14px; cursor: pointer;
  background-size: cover; background-position: center; background-color: var(--panel);
  box-shadow: 0 18px 46px -10px var(--hero-dom), 0 6px 18px rgba(0,0,0,.5);
  transition: transform .2s ease, box-shadow .5s ease;
}
.music-hero-cover:hover { transform: translateY(-4px) scale(1.02); }
.music-hero-text { min-width: 0; flex: 1; }
.music-hero-title {
  font: italic 300 clamp(30px, 4.4vw, 52px)/1 'Source Serif 4', serif;
  color: #fff; margin: 0 0 8px; letter-spacing: -.5px;
  text-shadow: 0 3px 24px rgba(0,0,0,.5);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.music-hero-artist { font: 600 16px 'Outfit', sans-serif; color: rgba(255,255,255,.9); }
.music-hero-meta { font: 400 13px 'Outfit', sans-serif; color: var(--fog-2); margin-top: 3px; }
.music-hero-actions { margin-top: 16px; }
.music-hero .btn-primary {
  background: var(--hero-accent); border-color: transparent; color: #0a0d12;
  transition: background .5s ease, box-shadow .3s ease, transform .15s ease;
}
.music-hero .btn-primary:hover { box-shadow: 0 8px 24px -6px var(--hero-accent); transform: translateY(-1px); }

.music-hero-dots { display: flex; gap: 8px; margin-top: 20px; }
.music-hero-dot {
  width: 8px; height: 8px; border-radius: 999px; border: none; padding: 0; cursor: pointer;
  background: rgba(255,255,255,.28); transition: background .3s ease, width .3s ease;
}
.music-hero-dot.active { background: var(--hero-accent); width: 22px; }

@media (max-width: 640px) {
  .music-hero-body { flex-direction: column; align-items: flex-start; gap: 16px; }
  .music-hero-cover { width: 120px; height: 120px; }
}

/* ==========================================================================
   Artwork gallery picker (in the art editors)
   ========================================================================== */
.art-section { margin-bottom: 22px; }
.art-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.art-section-head h4 { font: 600 14px 'Outfit', sans-serif; margin: 0; color: var(--paper); }
.btn.btn-sm { padding: 5px 12px; font-size: 12.5px; }

.art-gallery { margin-top: 10px; }
.art-gallery-loading { font: 400 13px 'Outfit'; color: var(--fog); padding: 14px 4px; }
.art-gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px;
  max-height: 280px; overflow-y: auto; padding: 4px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent;
}
.art-gallery-grid::-webkit-scrollbar { width: 8px; }
.art-gallery-grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 999px; }
.art-gallery-tile {
  position: relative; aspect-ratio: 1/1; padding: 0; border: 2px solid transparent;
  border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--panel);
  transition: border-color .15s ease, transform .15s ease;
}
.art-gallery-tile:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.25); }
.art-gallery-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-gallery-tile.selected { border-color: var(--ac); }
.art-gallery-tile.saving { opacity: .6; }
.art-gallery-src {
  position: absolute; bottom: 4px; right: 4px; font: 600 9px 'Outfit'; text-transform: uppercase;
  letter-spacing: .5px; padding: 2px 5px; border-radius: 4px;
  background: rgba(0,0,0,.6); color: rgba(255,255,255,.8);
}

/* ==========================================================================
   Album music videos section
   ========================================================================== */
.album-videos { margin-top: 36px; max-width: 900px; }
.album-videos-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.album-videos-head h3 { font: 600 20px 'Outfit', sans-serif; margin: 0; color: var(--paper); }
.album-videos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.album-video-frame {
  position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden;
  background: #000; box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.album-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.album-video-title { font: 600 13.5px 'Outfit'; color: var(--paper); margin-top: 8px; }
.album-video-channel { font: 400 12px 'Outfit'; color: var(--fog); }
.album-videos-empty { font: 400 13.5px 'Outfit'; color: var(--fog); padding: 8px 0; }

/* Video manager modal */
.video-manager { display: flex; flex-direction: column; gap: 14px; }
.video-add-url, .video-search-bar { display: flex; gap: 8px; }
.video-add-url input, .video-search-bar input {
  flex: 1; padding: 9px 12px; border-radius: 8px;
  background: var(--panel); border: 1px solid rgba(255,255,255,.1); color: var(--paper);
}
.video-results, .video-current { max-height: 320px; overflow-y: auto; }
.video-results h4, .video-current h4 { font: 600 13px 'Outfit'; color: var(--fog-2); margin: 6px 0; text-transform: uppercase; letter-spacing: .5px; }
.video-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 8px; }
.video-row:hover { background: var(--panel); }
.video-row img { width: 88px; height: 50px; object-fit: cover; border-radius: 6px; flex: none; background: #000; }
.video-row-title { flex: 1; font: 500 13px 'Outfit'; color: var(--paper); min-width: 0; }
.video-row-title small { color: var(--fog); font-weight: 400; }
.video-loading { font: 400 13px 'Outfit'; color: var(--fog); padding: 12px 4px; }
/* ---- Transcoding admin panel ---- */
.tc-status {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 16px 18px;
}
.tc-status-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
}
.tc-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: 0 0 10px currentColor;
}
.tc-status-meta {
  color: #8a93a0;
  font-size: 13px;
  margin: 6px 0 12px;
}
.tc-accel-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.tc-accel-row {
  display: grid;
  grid-template-columns: 190px auto 1fr;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.tc-accel-detail {
  color: #8a93a0;
  font-size: 12px;
}
.tc-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  justify-self: start;
}
.tc-badge.tc-ok {
  background: rgba(95, 144, 144, 0.18);
  color: #7bb3b3;
}
.tc-badge.tc-off {
  background: rgba(255, 255, 255, 0.06);
  color: #8a93a0;
}
.tc-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.settings-row select {
  min-width: 200px;
}
.settings-row-check {
  justify-content: flex-start;
  align-items: flex-start;
}
.settings-row-check input {
  margin-top: 3px;
  flex: 0 0 auto;
}
.settings-desc {
  color: #8a93a0;
  font-size: 13px;
  margin: 4px 0 14px;
  line-height: 1.5;
}
