@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,700;1,400;1,700&display=swap');

/* ═══════════════════════════════════════════
   THE FILMILECTUALS — CINEMA THEME
   ═══════════════════════════════════════════ */

:root {
  --bg: #0a0608;
  --bg-2: #140e10;
  --surface: #1a1114;
  --surface-2: #221a1d;
  --surface-hover: #2a2024;
  --ink: #efe8ea;
  --ink-2: #ffffff;
  --muted: #9a8e92;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.13);

  --curtain: #8b1a1a;
  --curtain-dark: #5c1010;
  --curtain-light: #c62828;
  --gold: #d4a84b;
  --gold-glow: rgba(212, 168, 75, 0.3);
  --gold-dim: #a07830;
  --red: #e53935;
  --red-glow: rgba(229, 57, 53, 0.25);
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.15);
  --success: #34d399;

  --gradient-gold: linear-gradient(135deg, #d4a84b 0%, #f5d98a 50%, #d4a84b 100%);
  --gradient-curtain: linear-gradient(180deg, #c62828 0%, #8b1a1a 40%, #5c1010 100%);
  --gradient-spotlight: radial-gradient(ellipse at 50% -20%, rgba(255,245,200,0.12) 0%, transparent 60%);

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.7);
  --shadow-gold: 0 4px 20px rgba(212, 168, 75, 0.2);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: var(--gold); text-decoration: none; transition: color 0.2s; }
a:hover { color: #f5d98a; }

.container {
  width: min(1200px, calc(100vw - 2rem));
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* ═══════════════════════════════════════════
   RED CURTAIN OPENING ANIMATION
   ═══════════════════════════════════════════ */

.curtain-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  perspective: 800px;
}

.curtain-left, .curtain-right {
  position: absolute;
  top: -5%;
  bottom: -5%;
  width: 55%;
  background: var(--gradient-curtain);
  z-index: 9999;
  overflow: hidden;
}

.curtain-left { left: 0; transform-origin: left center; }
.curtain-right { right: 0; transform-origin: right center; }

/* Curtain fabric folds */
.curtain-left::before, .curtain-right::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
  background: repeating-linear-gradient(
    90deg,
    transparent 0px,
    rgba(0,0,0,0.15) 30px,
    transparent 60px,
    rgba(255,255,255,0.05) 90px,
    transparent 120px
  );
}

/* Curtain bottom drape */
.curtain-left::after, .curtain-right::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 15%;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.4));
}

/* Gold trim on inner edges */
.curtain-trim-left, .curtain-trim-right {
  position: absolute;
  top: -5%;
  bottom: -5%;
  width: 25px;
  z-index: 10000;
  background: linear-gradient(180deg, #f5d98a 0%, #d4a84b 30%, #a07830 60%, #d4a84b 100%);
  box-shadow: 0 0 20px rgba(212, 168, 75, 0.4);
}

.curtain-trim-left { right: 0; }
.curtain-trim-right { left: 0; }

/* Gold valance at top */
.curtain-valance {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: linear-gradient(180deg, #5c1010 0%, #8b1a1a 60%, transparent 100%);
  z-index: 10001;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.curtain-valance::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 0;
  right: 0;
  height: 20px;
  background:
    radial-gradient(ellipse 60px 20px at 60px 0px, var(--curtain-dark) 50%, transparent 50%),
    radial-gradient(ellipse 60px 20px at 0px 0px, var(--curtain-dark) 50%, transparent 50%);
  background-size: 60px 20px;
}

/* Animation */
.curtain-left {
  animation: curtainOpenLeft 2.2s cubic-bezier(0.65, 0, 0.35, 1) 0.8s forwards;
}
.curtain-right {
  animation: curtainOpenRight 2.2s cubic-bezier(0.65, 0, 0.35, 1) 0.8s forwards;
}
.curtain-valance {
  animation: valanceFade 1s ease 2.5s forwards;
}

@keyframes curtainOpenLeft {
  0% { transform: translateX(0) skewY(0); }
  30% { transform: translateX(-5%) skewY(-1deg); }
  100% { transform: translateX(-100%) skewY(0); }
}

@keyframes curtainOpenRight {
  0% { transform: translateX(0) skewY(0); }
  30% { transform: translateX(5%) skewY(1deg); }
  100% { transform: translateX(100%) skewY(0); }
}

@keyframes valanceFade {
  to { opacity: 0; }
}

/* Content reveal behind curtains */
.page-content {
  opacity: 0;
  animation: contentReveal 1s ease 1.8s forwards;
}

@keyframes contentReveal {
  to { opacity: 1; }
}

/* ═══════════════════════════════════════════
   FILM STRIP BORDERS
   ═══════════════════════════════════════════ */

.film-strip-left, .film-strip-right {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 38px;
  z-index: 1;
  background: #111;
  border-left: 2px solid #222;
  border-right: 2px solid #222;
  opacity: 0;
  animation: filmStripFade 1s ease 3s forwards;
}

.film-strip-left { left: 0; }
.film-strip-right { right: 0; }

.film-strip-left::before, .film-strip-right::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 4px;
  right: 4px;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 8px,
    #1a1a1a 8px,
    #1a1a1a 10px,
    transparent 10px,
    transparent 30px
  );
}

/* Film sprocket holes */
.film-strip-left::after, .film-strip-right::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 12px,
    #0a0a0a 12px,
    #0a0a0a 20px,
    transparent 20px,
    transparent 30px
  );
  border-radius: 1px;
}

@keyframes filmStripFade {
  to { opacity: 0.6; }
}

/* ═══════════════════════════════════════════
   SPOTLIGHT EFFECT
   ═══════════════════════════════════════════ */

.spotlight {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center top, rgba(255,245,200,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  animation: spotlightOn 2s ease 2.8s forwards;
}

@keyframes spotlightOn {
  to { opacity: 1; }
}

/* Wandering spotlight on public page */
.spotlight-wander {
  animation: spotlightOn 2s ease 2.8s forwards, spotlightMove 15s ease-in-out 4s infinite;
}

@keyframes spotlightMove {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  25% { transform: translateX(-35%) translateY(20px); }
  50% { transform: translateX(-55%) translateY(-10px); }
  75% { transform: translateX(-45%) translateY(15px); }
}

/* ═══════════════════════════════════════════
   STAR PARTICLES BACKGROUND
   ═══════════════════════════════════════════ */

.stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

/* ═══════════════════════════════════════════
   HEADER / HERO
   ═══════════════════════════════════════════ */

.site-header {
  padding: 2rem 0 1rem;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 0 1rem;
}

.top-bar strong {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero {
  text-align: center;
  padding: 3rem 0 2rem;
  position: relative;
}

/* Projector light cone behind hero */
.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(212,168,75,0.08) 0%, transparent 65%);
  pointer-events: none;
}

.site-title {
  font-family: 'Bebas Neue', 'Impact', sans-serif;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 400;
  margin: 0;
  letter-spacing: 0.08em;
  line-height: 1;
  color: var(--ink-2);
  text-transform: uppercase;
  position: relative;
  z-index: 1;
  text-shadow: 0 0 40px rgba(212,168,75,0.15);
}

.site-title .the {
  display: block;
  font-size: 0.35em;
  letter-spacing: 0.4em;
  color: var(--muted);
  margin-bottom: 0.2em;
}

.site-title .main-word {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 8px rgba(212,168,75,0.3));
}

.site-title .podcast {
  display: block;
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 0.28em;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-top: 0.3em;
  -webkit-text-fill-color: var(--muted);
}

.site-subtitle {
  margin: 1.2rem auto 0;
  color: var(--muted);
  max-width: 50ch;
  font-size: 1.05rem;
  position: relative;
  z-index: 1;
}

.meta-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════
   CLAPPERBOARD DIVIDER
   ═══════════════════════════════════════════ */

.clap-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0 1.5rem;
}

.clap-divider .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

.clap-divider .clap-icon {
  font-size: 1.6rem;
  filter: drop-shadow(0 0 6px rgba(212,168,75,0.3));
}

.clap-divider h2 {
  margin: 0;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════
   PILLS / BADGES
   ═══════════════════════════════════════════ */

.pill {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--surface);
  color: var(--muted);
  transition: all 0.25s;
  display: inline-block;
}

a.pill:hover {
  background: var(--surface-hover);
  border-color: var(--gold);
  color: var(--gold);
  text-decoration: none;
  box-shadow: 0 0 12px rgba(212,168,75,0.15);
}

.pill-gold {
  border-color: rgba(212, 168, 75, 0.3);
  color: var(--gold);
  background: rgba(212, 168, 75, 0.06);
}

/* ═══════════════════════════════════════════
   EPISODES GRID
   ═══════════════════════════════════════════ */

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  padding: 0 0 4rem;
}

/* ═══════════════════════════════════════════
   EPISODE CARD — MOVIE TICKET STYLE
   ═══════════════════════════════════════════ */

.episode-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  position: relative;
  overflow: hidden;
}

/* Gold accent top border */
.episode-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-gold);
  opacity: 0;
  transition: opacity 0.3s;
}

/* Subtle film grain texture */
.episode-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  border-radius: var(--radius);
}

.episode-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(212,168,75,0.08);
  border-color: rgba(212,168,75,0.2);
}

.episode-card:hover::before {
  opacity: 1;
}

.episode-card h2 {
  margin: 0 0 0.5rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--ink-2);
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.episode-number {
  display: inline-block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
  padding: 0.15rem 0.6rem;
  border: 1px solid rgba(212,168,75,0.25);
  border-radius: 4px;
  background: rgba(212,168,75,0.06);
}

.episode-date {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.episode-description {
  margin: 0 0 1.2rem;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
  font-size: 0.93rem;
}

/* ═══════════════════════════════════════════
   MEDIA PLAYERS
   ═══════════════════════════════════════════ */

audio {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-top: 0.25rem;
}

video {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-top: 0.25rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* ═══════════════════════════════════════════
   ADMIN LAYOUT
   ═══════════════════════════════════════════ */

.admin-wrap {
  display: grid;
  gap: 1.5rem;
  padding: 0 0 4rem;
}

/* ═══════════════════════════════════════════
   PANELS
   ═══════════════════════════════════════════ */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  position: relative;
}

.panel h2 {
  margin: 0 0 1rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--gold);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.panel-header h2 {
  margin: 0;
}

/* ═══════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════ */

label {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  margin-bottom: 0.35rem;
  color: var(--gold-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

input, textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

input::placeholder, textarea::placeholder {
  color: var(--muted);
  opacity: 0.5;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.field-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
}

.field-stack {
  display: grid;
  gap: 1rem;
}

.hint {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
}

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */

.btn {
  border: none;
  background: var(--gradient-gold);
  color: #1a1114;
  border-radius: var(--radius-sm);
  padding: 0.7rem 1.4rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-shadow: none;
}

.btn:hover {
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.btn:active {
  transform: scale(0.98) translateY(0);
}

.btn-alt {
  background: var(--surface-hover);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  font-weight: 600;
}

.btn-alt:hover {
  background: var(--line-strong);
  box-shadow: none;
  filter: none;
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 4px 16px var(--danger-glow);
  filter: none;
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
}

/* ═══════════════════════════════════════════
   STATUS MESSAGES
   ═══════════════════════════════════════════ */

.status {
  font-size: 0.9rem;
  margin: 0;
  padding: 0.5rem 0;
}

.status:empty { display: none; }
.status.error { color: var(--danger); }
.status.ok { color: var(--success); }

/* ═══════════════════════════════════════════
   PROGRESS BAR
   ═══════════════════════════════════════════ */

progress {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  margin-top: 0.6rem;
  appearance: none;
  -webkit-appearance: none;
}

progress::-webkit-progress-bar {
  background: var(--bg-2);
  border-radius: 999px;
}

progress::-webkit-progress-value {
  background: var(--gradient-gold);
  border-radius: 999px;
}

progress::-moz-progress-bar {
  background: var(--gradient-gold);
  border-radius: 999px;
}

/* ═══════════════════════════════════════════
   ADMIN EPISODE LIST
   ═══════════════════════════════════════════ */

.admin-episode {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  border: 1px solid var(--line);
  transition: border-color 0.25s, background 0.25s;
}

.admin-episode:hover {
  border-color: rgba(212,168,75,0.2);
  background: var(--surface-2);
}

.admin-episode + .admin-episode {
  margin-top: 0.75rem;
}

.admin-episode-info {
  flex: 1;
  min-width: 0;
}

.admin-episode-info h3 {
  margin: 0 0 0.25rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}

.admin-episode-info p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.admin-episode-info .desc-preview {
  margin-top: 0.25rem;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.admin-episode-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
  align-items: flex-start;
}

/* ═══════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════ */

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

.empty-state .icon {
  font-size: 3.5rem;
  margin-bottom: 0.75rem;
}

.empty-state h3 {
  margin: 0 0 0.5rem;
  font-family: 'Bebas Neue', sans-serif;
  color: var(--ink-2);
  font-size: 1.3rem;
  letter-spacing: 0.06em;
}

.empty-state p {
  margin: 0;
  font-size: 0.95rem;
}

/* ═══════════════════════════════════════════
   DELETE CONFIRM MODAL
   ═══════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 420px;
  width: calc(100% - 2rem);
  box-shadow: var(--shadow-lg);
  transform: scale(0.92);
  transition: transform 0.25s;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal h3 {
  margin: 0 0 0.5rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  color: var(--danger);
}

.modal p {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */

.site-footer {
  text-align: center;
  padding: 2rem 0 3rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 2;
}

.site-footer .footer-gold {
  color: var(--gold-dim);
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.08em;
}

/* ═══════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════ */

.top-bar-brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
}

.top-bar-brand:hover { color: #f5d98a; }

.nav-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.nav-active {
  border-color: rgba(212, 168, 75, 0.5);
  color: var(--gold);
  background: rgba(212, 168, 75, 0.08);
}

/* ═══════════════════════════════════════════
   HOMEPAGE EXTRAS
   ═══════════════════════════════════════════ */

.episode-card-artwork {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

.hero-cta {
  margin-top: 2rem;
  position: relative;
  z-index: 1;
}

.btn-hero {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.08em;
  padding: 1rem 3rem;
  border-radius: 999px;
  background: var(--gradient-gold);
  color: #1a1114;
  font-weight: 400;
  box-shadow: 0 6px 32px rgba(212,168,75,0.35), 0 2px 8px rgba(0,0,0,0.4);
  display: inline-block;
  transition: all 0.25s;
  text-decoration: none;
}

.btn-hero:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 40px rgba(212,168,75,0.5), 0 4px 12px rgba(0,0,0,0.4);
  filter: brightness(1.08);
  color: #1a1114;
}

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

.footer-links {
  margin-top: 0.5rem;
  font-size: 0.8rem;
}

.footer-links a {
  color: var(--muted);
  opacity: 0.6;
  transition: opacity 0.2s;
}

.footer-links a:hover { opacity: 1; }

.view-all-wrap {
  text-align: center;
  padding: 1.5rem 0 2rem;
}

/* ═══════════════════════════════════════════
   POSTER GRID (episodes page)
   ═══════════════════════════════════════════ */

.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  padding: 0 0 2rem;
}

/* Homepage featured grid — collapses empty tracks and centers the block */
.poster-grid-featured {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

.poster-card {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  transition: transform 0.25s;
  border-radius: var(--radius-sm);
  outline: none;
}

.poster-card:hover { transform: translateY(-4px); }

.poster-card:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.poster-img-wrap {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: var(--surface-2);
  box-shadow: var(--shadow);
  transition: box-shadow 0.25s;
}

.poster-card:hover .poster-img-wrap {
  box-shadow: var(--shadow-lg), 0 0 24px rgba(212,168,75,0.15);
}

.poster-active .poster-img-wrap {
  box-shadow: 0 0 0 3px var(--gold), var(--shadow-lg);
}

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

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

.poster-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(160deg, var(--surface-2) 0%, var(--bg-2) 100%);
  color: var(--muted);
}

.poster-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.poster-card:hover .poster-overlay,
.poster-active .poster-overlay { opacity: 1; }

.poster-play {
  font-size: 2.5rem;
  color: var(--gold);
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6));
  transform: translateY(4px);
  transition: transform 0.25s;
}

.poster-card:hover .poster-play { transform: translateY(0); }
.poster-active .poster-play { display: none; }

.poster-meta {
  padding: 0.6rem 0.1rem 0;
}

.poster-title {
  margin: 0.3rem 0 0.15rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink-2);
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.poster-date {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ═══════════════════════════════════════════
   EPISODE DETAIL PANEL
   ═══════════════════════════════════════════ */

.detail-panel {
  position: relative;
  background: var(--surface);
  border: 1px solid rgba(212,168,75,0.25);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(212,168,75,0.06);
  animation: panelSlideIn 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
}

@keyframes panelSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.detail-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--surface-hover);
  border: 1px solid var(--line-strong);
  color: var(--muted);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 1;
}

.detail-close:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

.detail-inner {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: start;
}

.detail-artwork-col { position: sticky; top: 1rem; }

.detail-artwork {
  width: 100%;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.detail-artwork-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--muted);
}

.detail-title {
  margin: 0.5rem 0 0.4rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  color: var(--ink-2);
  letter-spacing: 0.04em;
  line-height: 1.15;
}

.detail-description {
  margin: 0.5rem 0 1.25rem;
  line-height: 1.65;
  color: var(--ink);
  font-size: 0.95rem;
  white-space: pre-wrap;
}

.detail-player { margin-bottom: 1.5rem; }

/* ═══════════════════════════════════════════
   REACTIONS
   ═══════════════════════════════════════════ */

.reactions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.reactions-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  cursor: pointer;
  transition: all 0.2s;
  font: inherit;
  color: var(--ink);
}

.reaction-btn:hover:not(:disabled) {
  border-color: var(--gold);
  background: rgba(212,168,75,0.08);
  color: var(--gold);
}

.reaction-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.reaction-btn.reaction-voted {
  border-color: var(--gold);
  background: rgba(212,168,75,0.12);
  color: var(--gold);
}

.reaction-icon { font-size: 1.1rem; }

.reaction-count {
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 1.2ch;
}

/* ═══════════════════════════════════════════
   COMMENTS
   ═══════════════════════════════════════════ */

.comments-section { border-top: 1px solid var(--line); padding-top: 1.25rem; }

.comments-heading {
  margin: 0 0 1rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.comments-list { margin-bottom: 1.25rem; }

.no-comments {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.comment {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
}

.comment-header {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.comment-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.comment-time {
  font-size: 0.78rem;
  color: var(--muted);
}

.comment-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-form { display: grid; gap: 0.75rem; }

.comment-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.char-count {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ═══════════════════════════════════════════
   POSTER REACTION COUNTS (on grid cards)
   ═══════════════════════════════════════════ */

/* Reaction count bar — pinned to the bottom of the poster image */
.poster-reactions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 0.4rem;
  padding: 0.45rem 0.55rem;
  background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
  z-index: 2;
}

.poster-reaction {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
}

.poster-reaction strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
}

.poster-reaction-down {
  color: #ffffff;
}

/* ═══════════════════════════════════════════
   SEARCH + SORT BAR (episodes page)
   ═══════════════════════════════════════════ */

.search-filter-bar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin: 0 0 1.25rem;
  flex-wrap: wrap;
}

.search-wrap {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
  color: var(--muted);
}

.search-input {
  width: 100%;
  padding-left: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  border-radius: 999px;
  height: 2.6rem;
  font: inherit;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.search-input::placeholder { color: var(--muted); opacity: 0.6; }

.sort-select {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  border-radius: 999px;
  padding: 0 1.1rem;
  height: 2.6rem;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239a8e92'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.4rem;
}

.sort-select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

/* ═══════════════════════════════════════════
   SERIES FILTER PILLS (episodes page)
   ═══════════════════════════════════════════ */

.series-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.series-pill {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

.series-pill:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(212,168,75,0.07);
}

.series-pill-active {
  border-color: rgba(212,168,75,0.5);
  color: var(--gold);
  background: rgba(212,168,75,0.1);
}

.result-count {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

/* ═══════════════════════════════════════════
   ADMIN COMMENT MODERATION
   ═══════════════════════════════════════════ */

.admin-comment-list {
  display: grid;
  gap: 0.6rem;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.admin-comment {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
}

.admin-comment-hidden {
  opacity: 0.55;
  border-color: rgba(239,68,68,0.2);
  background: rgba(239,68,68,0.04);
}

.admin-comment-meta {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.admin-comment-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  background: rgba(239,68,68,0.15);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.25);
}

.admin-comment-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

/* Inline series dropdown on admin episode rows */
.admin-series-select {
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.6rem;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  max-width: 180px;
  transition: border-color 0.2s;
}

.admin-series-select:focus {
  outline: none;
  border-color: var(--gold);
}

/* ═══════════════════════════════════════════
   ADMIN EPISODE THUMBNAILS
   ═══════════════════════════════════════════ */

.admin-episode-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1px solid var(--line-strong);
}

.admin-episode-thumb-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--muted);
}

/* ═══════════════════════════════════════════
   ETHOS / ABOUT SECTION
   ═══════════════════════════════════════════ */

.ethos {
  margin: 2.5rem 0 1.5rem;
}

.ethos-panel {
  max-width: 820px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  text-align: center;
}

.ethos-panel p {
  margin: 0 0 1.15rem;
  line-height: 1.75;
  color: var(--ink);
  font-size: 1rem;
  max-width: 65ch;
  margin-left: auto;
  margin-right: auto;
}

.ethos-panel p:last-child {
  margin-bottom: 0;
}

.ethos-tagline {
  font-family: 'Bebas Neue', 'Impact', sans-serif;
  font-size: clamp(1.6rem, 4.2vw, 2.5rem);
  letter-spacing: 0.1em;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 6px rgba(212, 168, 75, 0.25));
  margin: 0 auto 1.75rem !important;
  text-transform: uppercase;
  line-height: 1.15;
  max-width: none !important;
}

.ethos-name {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ethos-thoughtless {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(229, 57, 53, 0.55);
  text-decoration-thickness: 2px;
}

.ethos-thoughtful {
  color: var(--gold);
  font-weight: 600;
  text-shadow: 0 0 12px rgba(212, 168, 75, 0.3);
}

.ethos-emphasis {
  color: var(--gold);
  font-style: italic;
  font-weight: 600;
}

.ethos-questions {
  list-style: none;
  padding: 1.25rem 1rem;
  margin: 1.75rem auto;
  max-width: 540px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: rgba(212, 168, 75, 0.03);
}

.ethos-questions li {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  color: var(--ink);
  padding: 0.4rem 0.5rem;
  font-size: 1.05rem;
  line-height: 1.45;
}

.ethos-questions li::before {
  content: '\201C';
  color: var(--gold);
  margin-right: 0.2rem;
  font-size: 1.4em;
  font-style: normal;
  vertical-align: -0.18em;
}

.ethos-questions li::after {
  content: '\201D';
  color: var(--gold);
  margin-left: 0.15rem;
  font-size: 1.4em;
  font-style: normal;
  vertical-align: -0.18em;
}

.ethos-closing {
  color: var(--muted) !important;
  font-style: italic;
}

/* ── Homepage teaser variant ──────────────────────────────── */

.ethos-teaser {
  padding: 2.75rem 2rem 2.25rem;
}

.ethos-lead {
  font-size: 1.08rem !important;
  color: var(--ink) !important;
  line-height: 1.7;
  max-width: 60ch !important;
}

.ethos-sub {
  color: var(--muted) !important;
  font-size: 0.97rem !important;
  letter-spacing: 0.01em;
}

.ethos-cta {
  margin-top: 1.75rem;
}

.ethos-cta .btn-alt {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.1em;
  padding: 0.7rem 1.6rem;
  font-size: 1rem;
}

/* ═══════════════════════════════════════════
   ABOUT PAGE
   ═══════════════════════════════════════════ */

.about-section {
  margin: 2rem 0 2.5rem;
}

.about-panel {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 2rem;
  text-align: center;
}

.about-panel p {
  margin: 0 auto 1.1rem;
  line-height: 1.75;
  color: var(--ink);
  font-size: 1.02rem;
  max-width: 62ch;
}

.about-panel p:last-child {
  margin-bottom: 0;
}

.about-lead {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.15rem !important;
  color: var(--gold) !important;
  margin-bottom: 1.5rem !important;
}

/* Craft pills row on the About page */
.about-craft-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  margin-top: 1.75rem;
}

.craft-pill {
  border: 1px solid rgba(212, 168, 75, 0.3);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(212, 168, 75, 0.06);
}

/* Larger questions block on the dedicated About page */
.about-panel-questions {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.about-questions-large {
  max-width: 600px;
  padding: 1.5rem 1rem;
}

.about-questions-large li {
  font-size: 1.18rem;
  padding: 0.55rem 0.5rem;
}

/* "Why It Matters" closing block */
.about-panel-closing {
  background: linear-gradient(180deg, rgba(212, 168, 75, 0.04), transparent 70%), var(--surface);
}

.about-pullquote {
  font-family: 'Bebas Neue', 'Impact', sans-serif;
  font-size: clamp(1.4rem, 3.5vw, 2rem) !important;
  letter-spacing: 0.08em;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 6px rgba(212, 168, 75, 0.2));
  text-transform: uppercase;
  margin-bottom: 1.25rem !important;
  line-height: 1.2;
  max-width: none !important;
}

.about-cta {
  text-align: center;
  padding: 1rem 0 3rem;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media (max-width: 900px) {
  .detail-inner {
    grid-template-columns: 140px 1fr;
    gap: 1.25rem;
  }
}

@media (max-width: 768px) {
  .field-row {
    grid-template-columns: 1fr;
  }

  .episodes-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 2rem 0 1.5rem;
  }

  .film-strip-left, .film-strip-right {
    display: none;
  }

  .admin-episode {
    flex-direction: column;
  }

  .admin-episode-actions {
    width: 100%;
  }

  .admin-episode-actions .btn {
    flex: 1;
    justify-content: center;
  }

  .poster-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.85rem;
  }

  .detail-panel { padding: 1.25rem; }

  .detail-inner {
    grid-template-columns: 1fr;
  }

  .detail-artwork-col {
    position: static;
    max-width: 180px;
  }

  .detail-artwork,
  .detail-artwork-placeholder {
    aspect-ratio: 1 / 1;
  }

  .search-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .sort-select {
    width: 100%;
  }

  .admin-comment-list {
    max-height: 50vh;
  }

  .ethos-panel {
    padding: 1.75rem 1.25rem;
  }

  .ethos-questions {
    padding: 1rem 0.5rem;
  }

  .ethos-questions li {
    font-size: 0.98rem;
  }

  .about-panel {
    padding: 1.75rem 1.25rem;
  }

  .about-questions-large li {
    font-size: 1.05rem;
  }

  .craft-pill {
    font-size: 0.82rem;
    padding: 0.35rem 0.8rem;
  }
}

/* ═══════════════════════════════════════════
   ADMIN ANALYTICS DASHBOARD
   ═══════════════════════════════════════════ */

.analytics-range {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.range-btn,
.sort-btn {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.range-btn:hover,
.sort-btn:hover {
  color: var(--ink);
}

.range-btn.active,
.sort-btn.active {
  background: var(--gradient-gold);
  color: #1a1114;
  box-shadow: var(--shadow-gold);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin: 1rem 0 1.5rem;
}

.stat-card {
  position: relative;
  padding: 1.1rem 1.2rem;
  background: linear-gradient(145deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-gold);
  opacity: 0.55;
}

.stat-card-good::before { background: linear-gradient(90deg, #34d399, #10b981); }
.stat-card-bad::before  { background: linear-gradient(90deg, #ef4444, #b91c1c); }

.stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.stat-value {
  font-family: 'Bebas Neue', 'Inter', sans-serif;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}

.stat-sub {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

.dash-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.2rem 1.25rem;
  margin-top: 1rem;
}

.dash-card h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-2);
  letter-spacing: 0.01em;
}

.dash-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.dash-card-header h3 { margin: 0; }

.legend {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.legend-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 2px;
  margin-right: 0.3rem;
  vertical-align: middle;
}

.legend-downloads { background: var(--gold); }
.legend-plays     { background: #6ea8fe; }

/* ─── Daily trend chart ─── */

.trend-chart {
  width: 100%;
  height: 180px;
  display: block;
}

.trend-chart .bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 100%;
  padding-top: 0.25rem;
}

.trend-chart .bar-col {
  flex: 1;
  min-width: 4px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  position: relative;
  cursor: default;
}

.trend-chart .bar-stack {
  display: flex;
  flex-direction: column-reverse;
  height: calc(100% - 1.1rem);
  width: 100%;
  border-radius: 3px 3px 0 0;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
  transition: opacity 0.15s;
}

.trend-chart .bar-col:hover .bar-stack { opacity: 0.85; }

.trend-chart .bar {
  width: 100%;
  transition: height 0.3s ease;
}

.trend-chart .bar-downloads { background: var(--gold); }
.trend-chart .bar-plays     { background: #6ea8fe; }

.trend-chart .bar-label {
  font-size: 0.65rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.25rem;
  height: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
}

/* ─── Bar list (top countries / clients / etc.) ─── */

.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.breakdown-grid .dash-card { margin-top: 0; }

.bar-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.bar-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.bar-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.85rem;
}

.bar-row-label {
  color: var(--ink);
  font-weight: 500;
}

.bar-row-count {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.bar-row-track {
  height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
  overflow: hidden;
}

.bar-row-fill {
  height: 100%;
  background: var(--gradient-gold);
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* ─── Top episodes table ─── */

.ep-table {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ep-row {
  display: grid;
  grid-template-columns: 2.5fr repeat(5, minmax(70px, 0.7fr));
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.ep-row::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--gold-glow) 0%, transparent var(--bar, 0%));
  opacity: 0.18;
  pointer-events: none;
}

.ep-row-head {
  background: transparent;
  border: 0;
  padding: 0.25rem 0.7rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}

.ep-row-head::before { display: none; }

.ep-title-cell {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.ep-thumb {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--line);
}

.ep-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--muted);
}

.ep-title {
  font-weight: 600;
  color: var(--ink-2);
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep-meta {
  font-size: 0.72rem;
  color: var(--muted);
}

.ep-cell-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 0.88rem;
  color: var(--ink);
  font-weight: 500;
}

.ep-cell-active {
  color: var(--gold);
  font-weight: 700;
}

/* ─── Recent activity feed ─── */

.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 460px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.activity-feed::-webkit-scrollbar { width: 8px; }
.activity-feed::-webkit-scrollbar-track { background: transparent; }
.activity-feed::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }

.activity-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.event-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  background: rgba(255,255,255,0.06);
  color: var(--ink);
  border: 1px solid var(--line);
}

.event-badge.ev-download { background: rgba(212,168,75,0.15); border-color: rgba(212,168,75,0.4); color: var(--gold); }
.event-badge.ev-play     { background: rgba(110,168,254,0.15); border-color: rgba(110,168,254,0.4); color: #6ea8fe; }
.event-badge.ev-like     { background: rgba(52,211,153,0.15); border-color: rgba(52,211,153,0.4); color: var(--success); }
.event-badge.ev-dislike  { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.4); color: var(--danger); }
.event-badge.ev-comment  { background: rgba(255,255,255,0.08); border-color: var(--line-strong); color: var(--ink-2); }

.activity-body { min-width: 0; }

.activity-ep {
  display: block;
  font-weight: 600;
  color: var(--ink-2);
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-meta {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.activity-side {
  text-align: right;
  font-size: 0.78rem;
  color: var(--ink);
  white-space: nowrap;
}

.activity-time {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* ─── Mobile tweaks ─── */

@media (max-width: 720px) {
  .stat-value { font-size: 1.8rem; }

  .ep-row {
    grid-template-columns: 1.6fr 0.7fr 0.7fr;
    grid-template-areas:
      "title  dl     pl"
      "title  likes  comments";
    row-gap: 0.25rem;
  }
  .ep-row > div:nth-child(1) { grid-area: title; }
  .ep-row > div:nth-child(2) { grid-area: dl; }
  .ep-row > div:nth-child(3) { grid-area: pl; }
  .ep-row > div:nth-child(4) { grid-area: likes; }
  .ep-row > div:nth-child(5) { display: none; }
  .ep-row > div:nth-child(6) { grid-area: comments; }
  .ep-row-head { display: none; }

  .activity-row {
    grid-template-columns: 80px 1fr;
    grid-template-areas:
      "badge  body"
      "side   side";
    row-gap: 0.3rem;
  }
  .activity-row > .event-badge   { grid-area: badge; }
  .activity-row > .activity-body { grid-area: body; }
  .activity-row > .activity-side {
    grid-area: side;
    text-align: left;
    border-top: 1px solid var(--line);
    padding-top: 0.35rem;
  }

  .trend-chart { height: 140px; }
}
