:root {
  --bg: #080810;
  --surface: #10101e;
  --border: #1e1e32;
  --red: #e62429;
  --gold: #f0b429;
  --text: #eeeef8;
  --muted: #7777aa;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: 0;
}

/* ── Header ── */
header {
  background: linear-gradient(180deg, #0a0a18 0%, transparent 100%);
  padding: 20px 32px;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  gap: 16px;
}
.logo { font-size: 0.85rem; font-weight: 800; letter-spacing: 0.18em; flex: 1; white-space: nowrap; }

/* ── Auth area ── */
.auth-area {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.auth-status {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auth-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  white-space: nowrap;
}
.auth-btn:hover { border-color: rgba(255,255,255,0.35); background: rgba(255,255,255,0.05); }
.auth-btn.signed-in { border-color: rgba(74,222,128,0.4); color: #4ade80; }
.kofi-btn { text-decoration: none; border-color: rgba(255,184,0,0.4); color: #ffb800; }
.kofi-btn:hover { border-color: rgba(255,184,0,0.7); background: rgba(255,184,0,0.08); }
.kofi-btn.hidden { display: none; }

/* ── Auth modal ── */
.auth-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
}
.auth-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 201;
  background: #12121f;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  padding: 36px 32px 30px;
  width: min(420px, 92vw);
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.auth-modal.open { display: flex; }
.auth-modal-backdrop.open { display: flex; }
.auth-modal-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none; border: none;
  color: var(--muted); font-size: 1rem;
  cursor: pointer; padding: 4px 8px;
}
.auth-modal-close:hover { color: var(--text); }
.auth-modal-logo { font-size: 2.2rem; }
.auth-modal-title { font-size: 1.1rem; font-weight: 700; letter-spacing: 0.06em; }
.auth-modal-sub { font-size: 0.8rem; color: var(--muted); line-height: 1.6; max-width: 320px; }
.auth-email-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.2s;
}
.auth-email-input:focus { border-color: rgba(255,255,255,0.3); }
.auth-send-btn {
  width: 100%;
  background: var(--red);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 12px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.auth-send-btn:hover { opacity: 0.85; }
.auth-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.auth-modal-msg { font-size: 0.8rem; min-height: 1.2em; }
.feedback-textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
  line-height: 1.5;
}
.feedback-btn {
  padding: 5px 10px;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.7;
  position: relative;
}
.feedback-notif-dot {
  display: none;
  position: absolute;
  top: 3px; right: 3px;
  width: 8px; height: 8px;
  background: #e62429;
  border-radius: 50%;
  border: 1.5px solid var(--bg);
}
.feedback-notif-dot.visible { display: block; }
.feedback-modal-wide { max-width: 440px; width: 92vw; }
.feedback-inbox {
  display: none;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 2px;
}
.feedback-inbox.has-messages { display: flex; }
.fb-thread-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fb-user-bubble {
  align-self: flex-end;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px 14px 4px 14px;
  padding: 9px 13px;
  font-size: 0.83rem;
  color: var(--text);
  max-width: 85%;
  line-height: 1.5;
}
.fb-reply-bubble {
  align-self: flex-start;
  background: rgba(230, 36, 41, 0.12);
  border: 1px solid rgba(230, 36, 41, 0.25);
  border-radius: 14px 14px 14px 4px;
  padding: 9px 13px;
  font-size: 0.83rem;
  color: var(--text);
  max-width: 85%;
  line-height: 1.5;
}
.fb-reply-label {
  font-size: 0.68rem;
  color: #e62429;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 1px;
}
.fb-date {
  font-size: 0.68rem;
  color: var(--muted);
  align-self: flex-end;
}
.feedback-inbox-divider {
  width: 100%;
  border: none;
  border-top: 1px solid rgba(255,255,255,0.07);
  margin: 2px 0;
}
.header-sub {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 20px;
}

/* ── Dial Section ── */
.dial-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10vh 0 20px;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, #1a0a2e 0%, var(--bg) 70%);
}

.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 20;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-arrow:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.2); }
.nav-arrow.left  { left: 24px; }
.nav-arrow.right { right: 24px; }

/* ── Dial ── */
.dial {
  position: relative;
  width: 100%;
  height: 490px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dial-card {
  position: absolute;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
  border: 1px solid transparent;
  background: #111;
}

/* Position states */
.pos-center    { width:300px; height:450px; transform:translateX(0);    opacity:1;    filter:none;      z-index:10; border-color:rgba(255,255,255,0.18); box-shadow:0 0 60px rgba(0,0,0,.9),0 0 30px rgba(100,50,200,.2); }
.pos-near-left { width:240px; height:360px; transform:translateX(-320px); opacity:0.58; filter:blur(1.5px); z-index:8; }
.pos-near-right{ width:240px; height:360px; transform:translateX(320px);  opacity:0.58; filter:blur(1.5px); z-index:8; }
.pos-far-left  { width:188px; height:282px; transform:translateX(-548px); opacity:0.22; filter:blur(4px);   z-index:6; }
.pos-far-right { width:188px; height:282px; transform:translateX(548px);  opacity:0.22; filter:blur(4px);   z-index:6; }
.pos-edge-left { width:148px; height:222px; transform:translateX(-736px); opacity:0.06; filter:blur(8px);   z-index:4; pointer-events:none; }
.pos-edge-right{ width:148px; height:222px; transform:translateX(736px);  opacity:0.06; filter:blur(8px);   z-index:4; pointer-events:none; }
.pos-hidden    { transform:translateX(0) scale(0.4); opacity:0; z-index:1; pointer-events:none; }

/* Card interior */
.card-bg {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 14px 10px;
  position: relative;
}
.card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--c1), var(--c2));
}
.card-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s, filter 0.35s ease, transform 0.35s ease;
  transform-origin: center;
}
.card-poster.loaded { opacity: 1; }
.dial-card.pos-center:hover .card-poster {
  filter: blur(2px);
  transform: scale(1.02);
}

/* ── Liquid glass hover overlay (center card only) ── */
.card-hover-glass {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  padding: 20% 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 10;
  /* very subtle tint — poster stays the star */
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.08) 0%,
    rgba(0,0,0,0.22) 50%,
    rgba(0,0,0,0.10) 100%
  );
  backdrop-filter: blur(1px) saturate(1.1);
  -webkit-backdrop-filter: blur(1px) saturate(1.1);
}
.dial-card.pos-center:hover .card-hover-glass,
.dial-card.pos-center.glass-active .card-hover-glass {
  opacity: 1;
  pointer-events: auto;
}

/* shared glass button base */
.card-glass-play,
.card-glass-trailer {
  cursor: pointer;
  border-radius: 8px;
  letter-spacing: 0.12em;
  font-weight: 800;
  text-align: center;
  width: 130px;
  padding: 10px 0;
  font-size: 0.75rem;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.12s;
  border: none;
}
.card-glass-play {
  background: rgba(255,255,255,0.92);
  color: #0a0010;
}
.card-glass-trailer {
  background: rgba(255,255,255,0.92);
  color: #0a0010;
}
.card-glass-play:hover,
.card-glass-trailer:hover { opacity: 0.88; transform: scale(1.04); }
.card-glass-play:active,
.card-glass-trailer:active { transform: scale(0.96); }
.card-glass-hint {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  pointer-events: none;
  user-select: none;
}
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.05) 55%);
  z-index: 1;
}
.card-number {
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
  z-index: 2;
}
.card-type-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  padding: 3px 6px;
  border-radius: 3px;
  z-index: 2;
}
.badge-movie   { background: rgba(230,36,41,0.85);  color:#fff; }
.badge-series  { background: rgba(30,100,220,0.85); color:#fff; }
.badge-netflix { background: rgba(229,9,20,0.9);    color:#fff; }
.badge-oneshot { background: rgba(150,80,200,0.85); color:#fff; }

.card-title {
  position: relative;
  z-index: 2;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.pos-center .card-title { font-size: 1rem; }

/* Hide title text when real poster is showing */
.has-poster .card-title { display: none; }
/* Keep split label visible over poster */
.has-poster .card-split-label { display: block; }

/* Split label — positioned top-left so it never covers the poster title text */
.card-split-label {
  position: absolute;
  top: 26px;
  left: 12px;
  z-index: 3;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  background: rgba(0,0,0,0.45);
  padding: 2px 5px;
  border-radius: 2px;
}
.has-poster .card-split-label { display: block; }
body.tva-mode .card-split-label { display: none !important; }

/* Special Presentation italic label */
.card-special-label {
  position: absolute;
  bottom: 26px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.5rem;
  font-style: italic;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.5);
  z-index: 2;
}

/* Watch-before gold dot */
.card-dots {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  gap: 4px;
  z-index: 3;
}
.card-wb-dot, .card-wa-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.card-wb-dot {
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}
.card-wa-dot {
  background: #5ba4f5;
  box-shadow: 0 0 8px #5ba4f5;
}

/* ── Earliest / Latest edge labels ── */
.dial-edge-label {
  position: absolute;
  top: 50%;
  writing-mode: vertical-lr;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: rgba(140, 100, 220, 0.5);
  pointer-events: none;
  z-index: 15;
  user-select: none;
}
.dial-edge-label.left  { left: 96px;  transform: translateY(-50%) rotate(180deg); }
.dial-edge-label.right { right: 96px; transform: translateY(-50%); }

/* ── Info Strip ── */
.dial-info {
  padding: 20px 24px 32px;
  text-align: center;
  min-height: 100px;
  padding-bottom: 100px;
}
.info-inner { max-width: 600px; margin: 0 auto; }
.info-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
}
.info-tva-pos {
  position: absolute;
  right: 0;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: #f5a623;
  background: rgba(245,166,35,0.12);
  border: 1px solid rgba(245,166,35,0.4);
  padding: 2px 8px;
  border-radius: 3px;
  display: none;
}
.info-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: 3px;
}
.info-year { font-size: 0.8rem; color: var(--muted); }
.info-title { font-size: 1.6rem; font-weight: 800; margin-bottom: 10px; line-height: 1.2; }
.info-desc  { font-size: 0.9rem; color: #aaaacc; line-height: 1.6; }

/* ── Watch Before ── */
/* ── Watch trigger bar ── */
.watch-trigger {
  position: fixed;
  bottom: 44px;
  left: 0;
  right: 0;
  height: 44px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  z-index: 100;
  cursor: pointer;
}
.watch-trigger-half {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  transition: background 0.2s;
}
.watch-trigger-half .section-icon,
.section-label .section-icon {
  font-variant-emoji: text;
  font-style: normal;
}
.watch-trigger-before { color: var(--gold); }
.watch-trigger-before:hover { background: rgba(240,180,41,0.07); }
.watch-trigger-after  { color: #5ba4f5; }
.watch-trigger-after:hover  { background: rgba(91,164,245,0.07); }
.watch-trigger-divider { width: 1px; background: var(--border); align-self: stretch; margin: 8px 0; }
.watch-trigger.no-before .watch-trigger-before { opacity: 0.25; pointer-events: none; }
.watch-trigger.no-after  .watch-trigger-after  { opacity: 0.25; pointer-events: none; }
.watch-after-disabled { opacity: 0.25; pointer-events: none; }

/* ── Watch overlay ── */
.watch-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 150;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.watch-overlay.open { transform: translateY(0); }
.watch-overlay-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 24px 80px;
}
.watch-overlay-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 8px;
}
.watch-overlay-col {}
.watch-before-list,
.watch-after-list { display: flex; gap: 14px; flex-wrap: wrap; }
.section-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wb-card {
  background: rgba(240,180,41,0.05);
  border: 1px solid rgba(240,180,41,0.22);
  border-radius: 10px;
  padding: 14px 16px;
  flex: 1 1 200px;
  max-width: 260px;
}
.wb-title  { font-size: 0.88rem; font-weight: 700; color: var(--gold); margin-bottom: 6px; }
.wb-reason { font-size: 0.76rem; color: #aaaacc; line-height: 1.5; }


/* ── Vault trigger bar ── */
.vault-trigger {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  z-index: 100;
  transition: background 0.2s;
}
.vault-trigger:hover { background: #16162a; }
.vault-trigger-arrow {
  font-size: 0.9rem;
  color: var(--muted);
  transition: transform 0.3s;
}
.vault-trigger-arrow.open { transform: rotate(180deg); }

/* ── Vault overlay ── */
.vault-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.vault-overlay.open { transform: translateY(0); }
.vault-overlay-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 24px 80px;
}
.vault-close-btn {
  display: block;
  margin-bottom: 24px;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.vault-close-btn:hover { border-color: rgba(255,255,255,0.2); color: var(--text); }

/* ── Vault ── */
.vault-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 80px;
  border-top: 1px solid var(--border);
}
.vault-header { margin-bottom: 20px; }
.vault-sub { font-size: 0.82rem; color: var(--muted); margin-top: 8px; max-width: 680px; line-height: 1.6; }
.vault-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.vault-copyright { text-align: center; font-size: 0.65rem; font-weight: 400; color: #666; margin-top: 40px; padding-bottom: 4px; letter-spacing: 0.02em; }

.vault-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.vault-card:hover { border-color: rgba(255,255,255,0.12); }
.vault-poster-wrap {
  width: 100%;
  aspect-ratio: 2/3;
  background: #1a1a2a;
  position: relative;
  overflow: hidden;
}
.vault-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #3a1a4a, #1a0a2a);
}
.vault-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s;
}
.vault-poster.loaded { opacity: 1; }
.vault-info { padding: 14px 16px; }
.vault-year     { font-size: 0.72rem; color: var(--muted); margin-bottom: 4px; font-weight: 600; letter-spacing: 0.04em; }
.vault-title    { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; line-height: 1.3; }
.vault-director { font-size: 0.76rem; color: var(--muted); margin-bottom: 10px; }
.vault-note     { font-size: 0.7rem; color: #bb7777; font-weight: 600; letter-spacing: 0.03em; font-style: italic; }

/* ── Universe watch groups ── */
.watch-before-list,
.watch-after-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wb-universe-group {
  background: rgba(240,180,41,0.04);
  border: 1px solid rgba(240,180,41,0.18);
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
  transition: border-color 0.2s;
}
.wb-universe-group:hover { border-color: rgba(240,180,41,0.32); }

.wb-universe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  cursor: pointer;
  user-select: none;
}
.wb-universe-info { flex: 1; }
.wb-universe-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.3;
}
.wb-universe-earth {
  font-size: 0.64rem;
  color: var(--muted);
  margin-top: 2px;
  letter-spacing: 0.05em;
}
.wb-universe-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.wb-film-count {
  font-size: 0.68rem;
  color: var(--muted);
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 2px 8px;
  letter-spacing: 0.04em;
}
.wb-expand-icon {
  font-size: 1rem;
  color: var(--muted);
  transition: transform 0.25s;
}
.wb-universe-group.expanded .wb-expand-icon { transform: rotate(90deg); }

/* Branch note (for split timelines) */
.wb-branch-note {
  font-size: 0.68rem;
  color: #8888bb;
  background: rgba(100,100,180,0.08);
  border-top: 1px solid rgba(100,100,180,0.15);
  padding: 7px 16px;
  display: none;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.02em;
}
.wb-branch-note::before { content: "↳"; opacity: 0.6; }
.wb-universe-group.expanded .wb-branch-note { display: flex; }

/* Film list — vertical numbered */
.wb-films-list {
  display: none;
  flex-direction: column;
  padding: 4px 16px 14px;
  gap: 0;
}
.wb-universe-group.expanded .wb-films-list { display: flex; }

/* Film items — checklist style */
.wb-film-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.8rem;
  color: #bbbbd0;
  line-height: 1.3;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}
.wb-film-item:last-child { border-bottom: none; }
.wb-film-item input[type="checkbox"] { display: none; }

.wb-film-check-box {
  width: 16px;
  height: 16px;
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  font-size: 0.65rem;
  color: transparent;
}
.wb-film-item.checked .wb-film-check-box {
  background: #2a9d5c;
  border-color: #2a9d5c;
  color: #fff;
}
.wb-film-item.checked .wb-film-check-box::after { content: "✓"; }
.wb-film-item.checked .wb-film-title { text-decoration: line-through; opacity: 0.45; }
.wb-film-item.checked .wb-film-num   { opacity: 0.3; }

.wb-film-num {
  font-size: 0.62rem;
  color: var(--muted);
  min-width: 16px;
  text-align: right;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.wb-film-title { flex: 1; transition: opacity 0.2s, text-decoration 0.2s; }
.wb-film-tag {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #f0b429;
  background: rgba(240,180,41,0.1);
  border: 1px solid rgba(240,180,41,0.25);
  border-radius: 4px;
  padding: 1px 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Group complete state */
.wb-universe-group.group-complete { border-color: rgba(42,157,92,0.35); }
.wb-universe-group.group-complete .wb-universe-name { color: #2a9d5c; }
.wb-universe-group.group-complete .wb-universe-header::after {
  content: "✓";
  font-size: 0.8rem;
  color: #2a9d5c;
  margin-right: 4px;
}

/* Group locked state (Watch Before only — waiting for previous group) */
.wb-universe-group.group-locked {
  opacity: 0.55;
  border-color: rgba(255,255,255,0.07);
}
.wb-universe-group.group-locked .wb-universe-header { cursor: not-allowed; }
.wb-universe-group.group-locked .wb-universe-name  { color: var(--muted); }

/* Film locked state (Watch Before only — waiting for previous film) */
.wb-film-item.film-locked {
  opacity: 0.3;
  cursor: not-allowed;
}
.wb-film-item.film-locked .wb-film-check-box { border-color: rgba(255,255,255,0.08); }

/* wb-card checklist style */
.wb-card-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 4px 0;
}
.wb-card-label input[type="checkbox"] { display: none; }
.wb-card-label .wb-film-check-box { margin-top: 2px; flex-shrink: 0; }
.wb-card-label.checked .wb-title { text-decoration: line-through; opacity: 0.4; }
.wb-card-text { flex: 1; }

/* ── Main film checkpoint ── */
.main-film-checkpoint {
  display: block;
  margin-top: 18px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 20px;
  background: rgba(255,255,255,0.03);
  transition: border-color 0.3s, box-shadow 0.3s;
  position: relative;
  opacity: 0.45;
  pointer-events: none;
}
.main-film-checkpoint.active {
  opacity: 1;
  pointer-events: auto;
}
.main-film-checkpoint.active:not(.completed) {
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(240,180,41,0.1);
  animation: pulse-glow 2.5s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 14px rgba(240,180,41,0.08); }
  50%       { box-shadow: 0 0 28px rgba(240,180,41,0.2); }
}
.mfc-step {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 8px;
}
.mfc-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.3;
}
.mfc-btn {
  background: var(--gold);
  color: #0a0a14;
  border: none;
  border-radius: 8px;
  padding: 9px 20px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.mfc-btn:hover { opacity: 0.88; }
.mfc-btn:active { transform: scale(0.97); }
.main-film-checkpoint.completed .mfc-btn { background: rgba(255,255,255,0.08); color: var(--muted); letter-spacing: 0.06em; }
.main-film-checkpoint.active { cursor: pointer; }
.main-film-checkpoint.completed .mfc-step { color: #2a9d5c; }
.main-film-checkpoint.completed .mfc-step::after { content: " — WATCHED"; }
.mfc-done-icon { display: none !important; }

/* ── Watch After lock overlay ── */
.watch-overlay-col { position: relative; }
.watch-after-lock {
  display: none;
  position: absolute;
  inset: -8px;
  background: rgba(8, 8, 20, 0.45);
  border-radius: 14px;
  z-index: 5;
  pointer-events: auto;
}
#watch-after-col.locked .watch-after-lock { display: flex; }
#watch-after-col.locked .watch-after-list { display: none; }
/* When checkpoint lives in after-col (no watchBefore), hide lock text — the checkpoint IS the message */
#watch-after-col.checkpoint-top.locked .wal-icon,
#watch-after-col.checkpoint-top.locked .wal-text { display: none; }
.wal-icon { display: none; }
.wal-text  { display: none; }

/* ── Watch After accent colors ── */
.watch-after-label { color: #5ba4f5 !important; }
.wa-universe-group { border-color: rgba(91,164,245,0.18) !important; background: rgba(91,164,245,0.04) !important; }
.wa-universe-group:hover { border-color: rgba(91,164,245,0.35) !important; }
.wa-card { border-color: rgba(91,164,245,0.18) !important; background: rgba(91,164,245,0.04) !important; }

/* ── Card title (for items without a poster) ── */
.card-title {
  position: relative;
  z-index: 2;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  padding: 0 8px;
  line-height: 1.3;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

/* ── Utility ── */
.hidden { display: none !important; }

/* ── Responsive — tablet ── */
@media (max-width: 960px) {
  .pos-edge-left, .pos-edge-right { display: none; }
  .pos-far-left  { transform: translateX(-460px); opacity: 0.18; }
  .pos-far-right { transform: translateX(460px);  opacity: 0.18; }
  .auth-status { display: none; }
}

/* ── Responsive — mobile ── */
@media (max-width: 600px) {
  /* Header */
  header { padding: 12px 14px; }
  .logo  { font-size: 0.72rem; letter-spacing: 0.1em; white-space: nowrap; }
  .auth-area { gap: 6px; }
  .auth-status { display: none; }
  .auth-btn { font-size: 0.62rem; padding: 5px 9px; letter-spacing: 0.04em; }

  /* Dial */
  .dial-section { padding: 5vh 0 12px; }
  .dial { height: 340px; }
  .pos-center     { width: 210px; height: 315px; }
  .pos-near-left  { width: 155px; height: 232px; transform: translateX(-215px); opacity: 0.5; }
  .pos-near-right { width: 155px; height: 232px; transform: translateX(215px);  opacity: 0.5; }
  .pos-far-left, .pos-far-right, .pos-edge-left, .pos-edge-right { display: none; }
  .nav-arrow { width: 38px; height: 38px; font-size: 1.1rem; }
  .nav-arrow.left  { left: 6px; }
  .nav-arrow.right { right: 6px; }
  .dial-edge-label { font-size: 0.5rem; letter-spacing: 0.12em; }
  .dial-edge-label.left  { left: 52px; }
  .dial-edge-label.right { right: 52px; }

  /* Info section */
  .dial-info { padding: 14px 16px 120px; }
  .info-title { font-size: 1.2rem; }
  .info-desc  { font-size: 0.82rem; }

  /* Watch trigger */
  .watch-trigger-label { font-size: 0.62rem; letter-spacing: 0.1em; }

  /* Watch overlay — stack columns vertically */
  .watch-overlay-columns { grid-template-columns: 1fr; gap: 24px; }
  .watch-overlay-inner { padding: 16px 16px 100px; }

  /* Vault */
  .vault-overlay-inner { padding: 16px 16px 100px; }
  .vault-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
  .vault-info { padding: 10px 12px; }
  .vault-title { font-size: 0.85rem; }

  /* Main film checkpoint */
  .mfc-title { font-size: 1rem; }
}

/* ── Split-series toast ── */
#dial-toast {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: rgba(16,16,30,0.96);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 10px 20px;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 999;
  white-space: nowrap;
}
#dial-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
#dial-toast.toast-blue {
  border-color: #3b82f6;
  color: #3b82f6;
}


/* Position number hidden on card corner for series; shown in info panel instead */
.card-series .card-number { display: none; }
.info-badge-number {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
  background: none;
  padding: 0;
}

/* ── TVA Branch ─────────────────────────────────────────── */

/* Subtle centre-pulse on enter (radial, not full-screen) */
#tva-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: radial-gradient(ellipse at center, rgba(245,166,35,0.35) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
}
#tva-overlay.active { opacity: 1; }

/* TVA vars — background stays unchanged */
body.tva-mode { --tva-gold: #f5a623; --tva-amber: #ff8c00; }

/* Neon orange outline on ALL visible TVA cards */
body.tva-mode .dial-card:not(.pos-hidden) {
  box-shadow: 0 0 0 2px var(--tva-amber), 0 0 18px 4px rgba(255,140,0,0.45);
  transition: box-shadow 0.3s ease;
}

/* Header logo swaps to TVA in TVA mode */
/* Logo TVA swap */
.logo-prefix { display: inline; }
.logo-tva { display: none; }
.logo-rest { color: #fff; }
body.tva-mode .logo-mcu  { display: none; }
body.tva-mode .logo-tva  { display: inline; color: var(--tva-gold); }
body.tva-mode .logo-rest { color: var(--tva-gold); }

/* Info badge label for TVA position */
.info-badge-tva {
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: #f5a623;
  background: rgba(245,166,35,0.12);
  border: 1px solid rgba(245,166,35,0.4);
  padding: 2px 8px;
  border-radius: 3px;
}

/* Split label hidden from card corner — episode info shown in info panel yearLabel instead */
.card-split-label { display: none !important; }

/* ── Tap-to-watch ────────────────────────────────────────── */
.card-watched-badge {
  position: absolute;
  bottom: 10px;
  left: 12px;
  font-size: 0.7rem;
  font-weight: 900;
  color: #22c55e;
  background: rgba(0,0,0,0.55);
  border: 1.5px solid #22c55e;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 4;
}
.card-watched .card-watched-badge { opacity: 1; }
.card-watched { box-shadow: 0 0 0 2px #22c55e, 0 0 14px 3px rgba(34,197,94,0.35); }

/* ── Watch Before Mode ───────────────────────────────────── */
.wb-mode-overlay {
  position: fixed;
  inset: 0;
  background: #0a0010;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0 12px;
  --tl-color: #b464ff;
  --tl-bg: rgba(180,100,255,0.08);
  --tl-glow: rgba(180,100,255,0.28);
  transition: --tl-color 0.4s ease;
}
.wb-mode-overlay.hidden { display: none; }

.wb-mode-header {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 0 16px;
}
.wb-back-btn {
  align-self: flex-start;
  background: none;
  border: 1px solid rgba(255,255,255,0.35);
  color: rgba(255,255,255,0.9);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
}
.wb-mode-title {
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.25em;
  color: rgba(255,255,255,0.85);
  text-shadow: none;
}

/* Universe tabs */
.wb-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.wb-tab {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.5);
  background: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}
.wb-tab.active {
  background: var(--tl-bg);
  border-color: var(--tl-color);
  color: var(--tl-color);
  box-shadow: 0 0 10px var(--tl-glow);
}

/* Film card stage — full width, same layout as main dial */
.wb-mode-body {
  position: relative;
  width: 100vw;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  height: 460px;
  flex-shrink: 0;
}
.wb-stage {
  position: relative;
  width: 300px;
  height: 450px;
  flex-shrink: 0;
}
.wb-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid rgba(180,100,255,0.35);
  color: #b464ff;
  font-size: 1.4rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
}
#wb-nav-left  { left: 12px; }
#wb-nav-right { right: 12px; }

/* Cards: same 300×450 as main dial center */
.wb-film-card {
  position: absolute;
  width: 300px;
  height: 450px;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.35s ease, opacity 0.35s ease, box-shadow 0.35s ease;
  user-select: none;
  border: 1.5px solid rgba(180,100,255,0.25);
  overflow: hidden;
}
.wb-film-card.wbc-center {
  transform: translateX(0) scale(1);
  opacity: 1;
  z-index: 3;
  box-shadow: 0 0 0 2px var(--tl-color), 0 8px 40px rgba(0,0,0,0.7);
}
.wb-film-card.wbc-left  { transform: translateX(-240px) scale(0.72); opacity: 0.45; z-index: 2; }
.wb-film-card.wbc-right { transform: translateX(240px)  scale(0.72); opacity: 0.45; z-index: 2; }
.wb-film-card.wbc-far-left  { transform: translateX(-420px) scale(0.55); opacity: 0.2; z-index: 1; }
.wb-film-card.wbc-far-right { transform: translateX(420px)  scale(0.55); opacity: 0.2; z-index: 1; }
.wb-film-card.wbc-hidden { opacity: 0; pointer-events: none; z-index: 0; transform: translateX(0) scale(0.4); }

.wb-film-card.wbc-watched {
  box-shadow: 0 0 0 2px #22c55e, 0 0 22px rgba(34,197,94,0.45);
}
.wb-film-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.wb-film-poster.loaded { opacity: 1; }
.wb-film-overlay { display: none; }
.wb-film-title { display: none; }
.wb-card-glass {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  padding: 20% 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  background: linear-gradient(to bottom, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.22) 50%, rgba(0,0,0,0.10) 100%);
  backdrop-filter: blur(1px) saturate(1.1);
  -webkit-backdrop-filter: blur(1px) saturate(1.1);
  border-radius: 14px;
  z-index: 5;
}
.wb-film-card.wbc-center:hover .wb-card-glass,
.wb-film-card.wbc-center.glass-active .wb-card-glass { opacity: 1; pointer-events: auto; }
.wb-glass-play, .wb-glass-trailer {
  display: block;
  padding: 10px 28px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: rgba(255,255,255,0.92);
  color: #0a0010;
  transition: opacity 0.15s, transform 0.12s;
}
.wb-glass-play:hover, .wb-glass-trailer:hover { opacity: 0.88; transform: scale(1.04); }
.wb-glass-play:active, .wb-glass-trailer:active { transform: scale(0.96); }
.wb-card-number {
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
  z-index: 2;
}
.wb-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  z-index: 3;
  pointer-events: none;
}
.wb-film-check {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  border: 1.5px solid #22c55e;
  color: #22c55e;
  font-size: 0.75rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 4;
}
.wb-film-card.wbc-watched .wb-film-check { opacity: 1; }

.wb-film-counter {
  text-align: center;
  padding: 10px 0 6px;
}
.wb-info-year {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent, #7c3aed);
  margin-bottom: 6px;
}
.wb-info-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0;
}
.wb-info-counter {
  position: absolute;
  bottom: 14px;
  left: 0; right: 0;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(180,100,255,0.45);
  text-align: center;
}

@media (max-width: 600px) {
  .wb-film-card { width: 210px; height: 315px; }
  .wb-film-card.wbc-left  { transform: translateX(-170px) scale(0.72); }
  .wb-film-card.wbc-right { transform: translateX(170px)  scale(0.72); }
  .wb-film-card.wbc-far-left  { transform: translateX(-300px) scale(0.55); }
  .wb-film-card.wbc-far-right { transform: translateX(300px)  scale(0.55); }
}
