/* ─── IntrigueFlix Prototype ─────────────────────────────────────── */
/* Design system: dark cinematic / paranormal documentary             */

/* ─── Variables ──────────────────────────────────────────────────── */
:root {
  --bg:          #050507; /* near-black for deeper cinema feel */
  --surface:     #0c0c0d; /* subtle lift from pure black */
  --surface2:    #141418; /* panels */
  --border:      rgba(255,255,255,0.035);
  --red:         #b93a2d; /* slightly desaturated for maturity */
  --red-glow:    rgba(185, 58, 45, 0.24);
  --ember:       #ff5c32; /* warm ember accent */
  --ember-glow:  rgba(255, 92, 50, 0.22);
  --amber:       #e0a04a;
  --teal:        #13a08f;
  --teal-dim:    rgba(19, 160, 143, 0.18);
  --text:        #f6f6f5; /* improved contrast */
  --text-muted:  #aab7b2; /* neutral muted copy */
  --text-dim:    #8a8a8a;
  --card-radius: 6px;
  --transition:  0.2s ease;
  --font-head:   'Oswald', 'Impact', sans-serif;
  --font-body:   'Inter', system-ui, sans-serif;
}

/* ─── Reset & Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle film grain */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.028;
  pointer-events: none;
  z-index: 9000;
}

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

/* ─── Header ─────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 300; /* keep header above mobile nav/backdrop */
  background: rgba(8, 8, 8, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  padding: 0;
  display: block;
  height: 64px;
}

/* Inner container to constrain header content to page grid */
.site-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 64px;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 1px;
  letter-spacing: -0.5px;
  cursor: pointer;
  flex-shrink: 0;
}

.logo { min-width: 140px; }

/* Ember fire wordmark treatment */
.logo-intrigue {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 300;
  color: #e8a84a;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow:
    0 0 3px #fff9e6,
    0 0 8px #ffaa00,
    0 0 18px #e06000,
    0 0 38px rgba(180, 55, 0, 0.55),
    0 0 72px rgba(140, 20, 0, 0.2);
}

.logo-flix {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  color: #ff3a1a;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow:
    0 0 3px #fff0cc,
    0 0 10px #ff5500,
    0 0 22px #cc1800,
    0 0 46px rgba(185, 20, 0, 0.5),
    0 0 80px rgba(140, 10, 0, 0.2);
}

/* Player header: same treatment at smaller size */
.player-logo .logo-intrigue,
.player-logo .logo-flix {
  font-size: 18px;
}

.site-nav {
  display: flex;
  gap: 28px;
  list-style: none;
}

.site-nav a {
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color var(--transition);
  font-weight: 500;
}

.site-nav a:hover { color: var(--text); }

.site-nav a.active { color: var(--red); filter: drop-shadow(0 2px 8px rgba(200,40,20,0.08)); }

.site-nav a.active {
  color: var(--red);
}

/* ─── Hero Brand Moment ─────────────────────────────────────────── */
/* This is where the IntrigueFlix zinger video lives.                 */
/* Drop IntrigueFlixZinger.mp4 in the demo folder and it auto-plays. */
.hero-brand {
  position: relative;
  width: 100%;
  height: 220px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-brand video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
}

/* Edge vignette over the video */
.hero-brand-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,  rgba(8,8,8,0.6) 0%, rgba(8,8,8,0) 20%, rgba(8,8,8,0) 80%, rgba(8,8,8,0.6) 100%),
    linear-gradient(to bottom, rgba(8,8,8,0.5) 0%, rgba(8,8,8,0) 35%, rgba(8,8,8,0) 65%, rgba(8,8,8,0.7) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Tiny "BRAND MOMENT" label visible in prototype only */
.hero-brand-label {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.2);
  z-index: 3;
  font-family: var(--font-body);
  pointer-events: none;
}

/* Large wordmark shown as fallback when video has not loaded/not present */
.hero-brand-logo {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.hero-logo-intrigue {
  font-family: var(--font-head);
  font-size: 72px;
  font-weight: 300;
  color: #e8a84a;
  letter-spacing: 8px;
  text-transform: uppercase;
  text-shadow:
    0 0 6px #fff9e6,
    0 0 16px #ffaa00,
    0 0 36px #e06000,
    0 0 72px rgba(180, 55, 0, 0.65),
    0 0 130px rgba(140, 20, 0, 0.3);
  transition: opacity 0.4s;
}

.hero-logo-flix {
  font-family: var(--font-head);
  font-size: 72px;
  font-weight: 700;
  color: #ff3a1a;
  letter-spacing: 5px;
  text-transform: uppercase;
  text-shadow:
    0 0 6px #fff0cc,
    0 0 18px #ff5500,
    0 0 40px #cc1800,
    0 0 84px rgba(185, 20, 0, 0.6),
    0 0 150px rgba(140, 10, 0, 0.28);
  transition: opacity 0.4s;
}

/* When video is playing, fade the wordmark out so video can breathe */
.hero-brand.video-playing .hero-brand-logo {
  opacity: 0;
}

@media (max-width: 600px) {
  .hero-brand { height: 140px; }
  .hero-logo-intrigue, .hero-logo-flix { font-size: 38px; }
}

/* ─── Main Content ───────────────────────────────────────────────── */
.main {
  padding: 0 32px 80px;
  max-width: 1600px;
  margin: 0 auto;
}

/* ─── Section Headers ────────────────────────────────────────────── */
.section-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin: 48px 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text);
}

.section-title .accent { color: var(--red); }

.section-sub {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #ffffff;
  padding-bottom: 2px;
}

.section-badge {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--teal-dim);
  color: var(--teal);
  border: 1px solid rgba(15, 155, 142, 0.3);
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 2px;
}

/* ─── Shorts Rail (9:16 vertical cards, horizontally scrollable) ─── */
.shorts-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 10px 0 12px;
  cursor: grab;
}
.shorts-grid::-webkit-scrollbar { display: none; }
.shorts-grid.is-dragging       { cursor: grabbing; user-select: none; }

.short-card {
  position: relative;
  border-radius: var(--card-radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
  transition: transform var(--transition), box-shadow var(--transition);
  aspect-ratio: 9 / 16;
  flex: 0 0 auto;
  width: clamp(130px, 15vw, 200px);
}

.short-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(220, 80, 20, 0.45),
    0 0 24px rgba(200, 60, 0, 0.15);
  z-index: 2;
}

.short-card .thumb {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.35s ease;
}

.short-card:hover .thumb { transform: scale(1.05); }

.short-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.1)   0%,
    rgba(0,0,0,0)     25%,
    rgba(0,0,0,0.4)   55%,
    rgba(0,0,0,0.9)   100%
  );
}

.short-card .top-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.badge-pinned {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--red);
  color: #fff;
  padding: 3px 6px;
  border-radius: 3px;
}

.badge-duration {
  font-size: 10px;
  font-weight: 600;
  background: rgba(0,0,0,0.75);
  color: #ccc;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.short-card .card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px;
}

.card-category {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 4px;
}

.card-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Longform Rail (16:9 landscape cards, horizontally scrollable) ─ */
.longform-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 10px 0 12px;
  cursor: grab;
}
.longform-grid::-webkit-scrollbar { display: none; }
.longform-grid.is-dragging        { cursor: grabbing; user-select: none; }

.lf-card {
  position: relative;
  border-radius: var(--card-radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
  transition: transform var(--transition), box-shadow var(--transition);
  aspect-ratio: 16 / 9;
  flex: 0 0 auto;
  width: clamp(250px, 28vw, 380px);
}

.lf-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(220, 80, 20, 0.45),
    0 0 22px rgba(200, 60, 0, 0.15);
  z-index: 2;
}

.lf-card .thumb {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.35s ease;
}

.lf-card:hover .thumb { transform: scale(1.04); }

.lf-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.05) 0%,
    rgba(0,0,0,0.0)  40%,
    rgba(0,0,0,0.85) 100%
  );
}

.lf-card .top-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: space-between;
}

.lf-card .card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 14px;
}

.lf-card .card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.lf-card .card-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* ─── Rail Wrap & Chevrons ───────────────────────────────────────── */
.rail-wrap {
  position: relative;
}

/* Right edge fade — always on, signals offscreen content */
.rail-wrap::after {
  content: '';
  position: absolute;
  top: 0; right: 36px; bottom: 0;
  width: 96px;
  background: linear-gradient(to right, transparent, var(--bg) 85%);
  pointer-events: none;
  z-index: 3;
}

/* Left edge fade — appears once scrolled away from start */
.rail-wrap::before {
  content: '';
  position: absolute;
  top: 0; left: 36px; bottom: 0;
  width: 96px;
  background: linear-gradient(to left, transparent, var(--bg) 85%);
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s;
}
.rail-wrap.has-scrolled::before { opacity: 1; }

.rail-chevron {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 36px;
  height: 88px;
  background: rgba(10, 10, 10, 0.92);
  border: 1px solid rgba(220, 80, 20, 0.28);
  color: var(--amber);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity 0.25s, background 0.2s, border-color 0.2s, color 0.2s;
}

.rail-chevron svg { flex-shrink: 0; }

.rail-chevron:hover {
  background: rgba(220, 80, 20, 0.2);
  border-color: rgba(220, 80, 20, 0.65);
  color: #fff;
}

.rail-chevron--left  { left: 0; }
.rail-chevron--right { right: 0; }

/* Portrait rail (shorts) — taller chevrons to match card height */
.rail-wrap--portrait .rail-chevron { height: 140px; }

.rail-chevron.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* ─── Keyboard Focus Ring ────────────────────────────────────────── */
.short-card:focus-visible,
.lf-card:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  box-shadow:
    0 0 0 5px rgba(220, 80, 20, 0.18),
    0 0 30px rgba(220, 80, 20, 0.35);
  z-index: 6;
}

/* ─── Hover Preview State ────────────────────────────────────────── */
.short-card.previewing,
.lf-card.previewing {
  box-shadow:
    0 0 0 2px var(--ember),
    0 0 36px rgba(220, 80, 20, 0.45);
  z-index: 5;
}

.short-card.previewing .thumb,
.lf-card.previewing .thumb {
  opacity: 0.12;
}

.preview-badge {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: rgba(210, 65, 10, 0.9);
  color: #fff;
  padding: 3px 10px;
  border-radius: 20px;
  z-index: 6;
  white-space: nowrap;
  pointer-events: none;
}

/* ─── Mobile scroll snap ─────────────────────────────────────────── */
@media (hover: none) {
  .shorts-grid,
  .longform-grid {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .short-card  { scroll-snap-align: start; }
  .lf-card     { scroll-snap-align: start; }
}

/* ─── Play icon overlay ───────────────────────────────────────────── */
.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  width: 48px;
  height: 48px;
  background: rgba(220, 70, 20, 0.88);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition), transform var(--transition);
}

.play-icon svg {
  width: 18px;
  height: 18px;
  fill: white;
  margin-left: 3px;
}

.short-card:hover .play-icon,
.lf-card:hover .play-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ─── Player Page ────────────────────────────────────────────────── */
.player-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.player-header {
  padding: 0 32px;
  height: 56px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 8, 8, 0.95);
  position: sticky;
  top: 0;
  z-index: 100;
}

.player-nav-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #d6d6d6;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.06);
  padding: 8px 18px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.12));
  transition: all 0.18s ease;
  box-shadow: 0 4px 18px rgba(0,0,0,0.6);
}

.btn-back:hover {
  color: #fff;
  border-color: rgba(220,80,20,0.45);
  background: linear-gradient(180deg, rgba(220,80,20,0.06), rgba(0,0,0,0.12));
  transform: translateY(-2px);
}

.player-logo {
  margin-left: auto;
  display: flex;
  align-items: baseline;
}

.player-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0;
}

/* ─── Video Stage ─────────────────────────────────────────────────── */
.video-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 32px 24px 48px;
  min-width: 0;
}

.player-wrap {
  width: 100%;
  /* Portrait default: comfortably sized on small/medium viewports */
  max-width: clamp(360px, 92vw, 480px);
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 80px rgba(0, 0, 0, 0.85);
  margin: 0 auto;
  border: 1px solid rgba(255,255,255,0.02);
}

.player-wrap.landscape {
  /* Make longform players more prominent and responsive */
  max-width: clamp(680px, 70vw, 1200px);
  border-radius: 12px;
  box-shadow: 0 18px 120px rgba(0,0,0,0.85);
}

.player-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
}

.player-wrap.portrait { aspect-ratio: 9 / 16; }
.player-wrap.landscape { aspect-ratio: 16 / 9; }

.video-info {
  width: 100%;
  max-width: clamp(360px, 92vw, 480px);
  margin-top: 20px;
}

.player-wrap.landscape + .video-info {
  max-width: clamp(680px, 70vw, 1200px);
}

@media (min-width: 1200px) {
  /* On wide screens, give the longform player extra breathing room */
  .video-stage { padding: 48px 36px 64px; }
  .side-panel { width: 360px; }
  .video-info { margin-top: 24px; }
}

/* Layout: keep the player stacked above content in the main column, side-panel on the right */
@media (min-width: 900px) {
  .player-body {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 36px;
    align-items: start;
  }

  .video-stage {
    grid-column: 1 / 2;
    padding: 40px 28px 64px;
  }

  .side-panel {
    grid-column: 2 / 3;
    align-self: start;
  }

  /* Make player larger within the main column */
  .player-wrap {
    max-width: min(1100px, 72vw);
    margin: 0 auto;
  }

  .video-info {
    max-width: none;
    margin-top: 20px;
  }
}

/* Ensure list bullets do not appear anywhere */
.site-nav, .site-nav ul, .more-menu { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.site-nav a, .more-menu a { display: block; }

.video-category-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 8px;
}

.video-title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 1px;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 6px;
}

.video-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.video-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-pill {
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: lowercase;
  background: var(--surface2);
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 20px;
}

/* ─── Side Panel ──────────────────────────────────────────────────── */
.side-panel {
  width: 340px;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  padding: 28px 20px;
  gap: 24px;
}

@keyframes ember-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 80, 20, 0); }
  50%       { box-shadow: 0 0 18px 3px rgba(220, 80, 20, 0.32); }
}

.btn-mlt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(180deg, #ff6a3a, #e04222);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease;
  box-shadow: 0 10px 30px rgba(224,66,34,0.14), 0 2px 6px rgba(0,0,0,0.6);
}

.btn-mlt:hover {
  background: linear-gradient(180deg, #ff7a50, #ff4a22);
  transform: translateY(-2px);
}

.btn-mlt:active {
  transform: translateY(0);
}

.next-up-section {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.next-up-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
  font-weight: 700;
}

.next-up-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.04);
  background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.00));
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.12s ease;
}

.next-up-card:hover {
  border-color: rgba(220,80,20,0.6);
  background: linear-gradient(180deg, rgba(220,80,20,0.03), rgba(0,0,0,0.06));
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.6);
}

.next-up-thumb {
  width: 72px;
  flex-shrink: 0;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
  background-color: var(--border);
}

.next-up-thumb.portrait  { aspect-ratio: 9/16; width: 52px; }
.next-up-thumb.landscape { aspect-ratio: 16/9; }

.next-up-info {
  flex: 1;
  min-width: 0;
}

.next-up-type {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 4px;
}

.next-up-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.next-up-meta {
  font-size: 10px;
  color: var(--text-muted);
}

.score-debug {
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(15, 155, 142, 0.06);
  border: 1px solid rgba(15, 155, 142, 0.15);
  border-radius: 4px;
}

.score-debug-title {
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 700;
  margin-bottom: 6px;
}

.score-row {
  font-size: 10px;
  color: var(--text-dim);
  font-family: 'Courier New', monospace;
  line-height: 1.6;
}

.score-row .winner { color: var(--teal); font-weight: bold; }

.watched-section {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.watched-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 10px;
  font-weight: 700;
}

.watched-pills {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.watched-pill {
  font-size: 10px;
  color: var(--text-dim);
  padding: 4px 8px;
  background: var(--surface2);
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Session Stats (bottom of side panel) ────────────────────────── */
.session-stats {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.8;
  font-family: 'Courier New', monospace;
}

.session-stats strong { color: var(--text-muted); }

/* ─── Empty / Loading States ─────────────────────────────────────── */
.no-recommendation {
  padding: 16px;
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  font-style: italic;
}

/* ─── Mobile / Small Screen Enhancements ─────────────────────────── */
@media (max-width: 900px) {
  .main { padding: 0 20px 72px; }
  .site-header-inner { padding: 0 16px; gap: 16px; }
  .site-nav { gap: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .site-nav a { font-size: 12px; padding: 8px 6px; white-space: nowrap; }

  .hero-brand { height: 140px; }

  /* Adjust rails for smaller screens so cards remain tappable */
  .short-card { width: clamp(120px, 32vw, 160px); }
  .lf-card    { width: clamp(220px, 46vw, 320px); }

  /* Stack player and side panel vertically */
  .player-body { display: block; }
  .video-stage { padding: 20px 14px 40px; }
  .player-wrap { max-width: 100%; margin: 0 auto; border-radius: 10px; }
  .player-wrap.landscape { max-width: 100%; }
  .video-info { max-width: 100%; margin-top: 16px; padding: 0 6px; }

  .side-panel {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 18px 14px;
    margin-top: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.00));
  }

  .player-header { padding: 0 12px; }
  .btn-back { padding: 10px 12px; font-size: 13px; }
  .btn-mlt  { padding: 12px 14px; font-size: 14px; }

  .next-up-thumb { width: 84px; }
  .next-up-thumb.portrait { width: 64px; }
  .next-up-title { font-size: 13px; }

  .video-title { font-size: 20px; }
  .card-title  { font-size: 13px; }
}

@media (max-width: 480px) {
  .main { padding: 0 12px 56px; }
  .site-header-inner { padding: 0 12px; gap: 10px; }
  .logo-intrigue, .logo-flix { font-size: 20px; }
  .hero-brand { height: 120px; }
  .hero-logo-intrigue, .hero-logo-flix { font-size: 36px; }

  .shorts-grid { gap: 10px; padding-left: 6px; padding-right: 6px; }
  .short-card { width: clamp(110px, 36vw, 150px); }
  .lf-card    { width: clamp(200px, 72vw, 300px); }

  /* Make touch targets bigger and easier to tap */
  .site-nav a { padding: 10px 10px; font-size: 13px; }
  .btn-back { padding: 12px 14px; width: auto; }

  .player-wrap { border-radius: 8px; box-shadow: 0 8px 40px rgba(0,0,0,0.7); }
  .video-stage { padding: 16px 12px 32px; }

  /* Increase prominence of next-up thumbnails on phones */
  .next-up-thumb { width: 92px; }
  .next-up-thumb.landscape { aspect-ratio: 16/9; }

  .video-title { font-size: 18px; }
  .card-title  { font-size: 12px; }
}

/* Improve readability when system prefers larger touch controls */
@media (pointer: coarse) {
  .btn-back, .btn-mlt { min-height: 44px; }
  .short-card, .lf-card { touch-action: pan-x; }
}

/* Mobile menu styles */
.mobile-menu-btn {
  display: none !important;
  background: transparent;
  border: none;
  color: var(--text);
  margin-left: 12px;
  cursor: pointer;
}
.mobile-menu-btn svg { display: block; }

/* backdrop for dimming when mobile menu is open */
.mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
  z-index: 180;
}

/* Small screens: show hamburger and animate nav open/close */
@media (max-width: 900px) {
  .mobile-menu-btn { display: inline-flex !important; align-items: center; }
  .site-header-inner { position: relative; padding-right: 12px; overflow: visible; }
  .mobile-menu-btn { margin-left: auto; }
  .site-nav {
    position: absolute;
    top: 56px; /* align immediately below the header on mobile */
    left: 12px;
    right: 12px;
    width: calc(100% - 24px);
    background: linear-gradient(180deg, rgba(8,8,8,0.98), rgba(8,8,8,0.98));
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 210;
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: max-height 320ms cubic-bezier(.2,.9,.2,1), opacity 220ms ease, transform 260ms ease;
    pointer-events: none;
  }

  body.menu-open .site-nav {
    max-height: 520px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  body.menu-open .mobile-backdrop { opacity: 1; pointer-events: auto; }

  .site-nav a { color: var(--text); font-size: 15px; padding: 10px 6px; }

  /* More submenu */
  .more-wrap { position: relative; }
  .more-toggle {
    background: transparent; border: none; color: var(--text); text-align: left; padding: 8px 6px; font-size: 15px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px;
    font-weight: 600;
  }
  .more-menu {
    list-style: none; margin: 6px 0 0 0; padding: 0 6px; max-height: 0; overflow: hidden;
    transition: max-height 220ms ease, opacity 180ms ease;
    opacity: 0;
  }
  .more-menu.open { max-height: 240px; opacity: 1; }
  .more-menu li a { display: block; padding: 8px 6px; color: var(--text); }
}

/* Hamburger alignment and animation tweaks */
.mobile-menu-btn {
  width: 46px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text);
  transition: background 180ms ease, color 160ms ease;
  position: relative;
  z-index: 400;
}
.mobile-menu-btn:hover { background: rgba(255,255,255,0.02); color: var(--text); }
.mobile-menu-btn svg { display: block; }
.mobile-menu-btn svg rect { transition: transform 240ms cubic-bezier(.2,.9,.2,1), opacity 180ms ease; transform-origin: 50% 50%; }
body.menu-open .mobile-menu-btn svg rect:nth-child(1) { transform: translateY(5px) rotate(45deg); }
body.menu-open .mobile-menu-btn svg rect:nth-child(2) { opacity: 0; transform: scaleX(0.2); }
body.menu-open .mobile-menu-btn svg rect:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* subtle visual polish for menu panel */
.site-nav {
  border-radius: 10px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}

.site-nav a { padding: 12px 10px; border-radius: 8px; }
.site-nav a:hover { background: rgba(255,255,255,0.02); color: var(--text); }

/* More toggle chevron rotation */
.more-toggle { transition: transform 180ms ease; }
.more-toggle[aria-expanded="true"] { transform: rotate(180deg); }

/* Desktop-specific: ensure mobile UI elements are inactive on wide screens */
@media (min-width: 901px) {
  .mobile-menu-btn { display: none !important; }
  .site-nav {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    max-height: none !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 28px;
    padding: 0;
    background: transparent;
    border-bottom: none;
    box-shadow: none;
  }
  .site-nav a { padding: 0; }
  .more-toggle { display: none !important; }
  .more-menu { display: flex !important; max-height: none !important; opacity: 1 !important; flex-direction: row; gap: 20px; padding: 0; }
  .more-menu li a { padding: 0; }
  .mobile-backdrop { display: none !important; }
}

/* Additional mobile polish: tighter header, scaled hero, better gutters */
@media (max-width: 900px) {
  .site-header { height: 56px; }
  .site-header-inner { height: 56px; padding-left: 16px; padding-right: 16px; }
  .logo-intrigue { font-size: 20px; letter-spacing: 2px; }
  .logo-flix    { font-size: 20px; }

  .hero-brand { height: 120px; }
  .hero-logo-intrigue, .hero-logo-flix { font-size: 40px; letter-spacing: 6px; text-shadow: 0 0 8px rgba(0,0,0,0.3); }

  .main { padding: 0 16px 72px; margin-top: 10px; }
  .shorts-grid, .longform-grid { margin-top: 12px; }

  .section-head { margin: 28px 0 12px; }
  .section-title { font-size: 16px; }

  .badge-pinned { background: var(--red); color: #fff; padding: 4px 8px; font-size: 10px; }
  .section-badge { padding: 3px 8px; font-size: 9px; }

  .site-nav a { font-size: 15px; padding: 12px 10px; }
  .more-toggle { padding: 12px 10px; }

  /* Position hamburger absolutely so it's always aligned right and vertically centered */
  .site-header-inner { position: relative; }
  .mobile-menu-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); margin-left: 0; }

  /* Slightly reduce glow on hero wordmark to avoid saturation */
  .hero-logo-intrigue { text-shadow: 0 0 6px rgba(255,220,160,0.18), 0 0 18px rgba(224,120,40,0.06); }
  .hero-logo-flix    { text-shadow: 0 0 6px rgba(255,180,160,0.15), 0 0 18px rgba(220,80,40,0.05); }
}

@media (max-width: 440px) {
  .hero-brand { height: 110px; }
  .hero-logo-intrigue, .hero-logo-flix { font-size: 32px; letter-spacing: 4px; }
  .logo-intrigue, .logo-flix { font-size: 18px; }
  .site-nav a { font-size: 16px; }
  .next-up-thumb { width: 84px; }
}

.more-toggle[aria-expanded="true"] { transform: rotate(180deg); }
