/* Movie Night: classic cinema. Loaded AFTER /shared/css/base.css (whose
   fallback block is zero-specificity `:where(:root)`), so both the variables
   and the component overrides below win the cascade. */
@import url('https://fonts.googleapis.com/css2?family=Limelight&display=swap');

:root {
  --bg-deep: #070b18;
  --bg: #0b1020;
  --surface: #141a33;
  --accent: #f5c542;
  --accent-light: #ffe08a;
  --accent-glow: #f5c542;
  --cream: #fff6dc;
  --text: #f8f4ea;
  --text-dim: #b8b3c7;
  --danger: #ff5a5a;
  --success: #3ddc84;
  --velvet: #a3142c;
  --velvet-dark: #5c0a19;
  --confetti-colors: #f5c542, #ffe08a, #a3142c, #ffffff;
}

body {
  background: radial-gradient(ellipse at top, var(--bg) 0%, var(--bg-deep) 70%);
}

/* Red velvet header band with a gold marquee title. */
header.top {
  background: linear-gradient(180deg, var(--velvet) 0%, var(--velvet-dark) 100%);
  border-bottom: 4px solid var(--accent);
  max-width: none;
  padding: 0.85rem 1rem;
}
header.top a.brand {
  color: var(--accent-light);
  font-family: 'Limelight', 'Georgia', serif;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.marquee {
  margin: 0.5rem auto 1.25rem;
  padding: 1rem 1.25rem;
  border: 6px solid var(--accent);
  border-radius: 14px;
  background: var(--surface);
  text-align: center;
  position: relative;
  box-shadow: 0 0 0 4px var(--velvet-dark), 0 0 40px rgba(245, 197, 66, 0.25);
}
/* marquee bulbs */
.marquee::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 12px;
  background: radial-gradient(circle, var(--accent-light) 0 2px, transparent 3px) 0 0 / 14px 14px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 3px;
  pointer-events: none;
  opacity: 0.9;
}
.marquee-title {
  font-family: 'Limelight', 'Georgia', serif;
  font-size: 1.7rem;
  color: var(--accent);
  margin: 0;
  text-shadow: 0 0 14px rgba(245, 197, 66, 0.6);
}
.marquee-sub {
  color: var(--text-dim);
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
}

h1 {
  font-family: 'Limelight', 'Georgia', serif;
  font-weight: 400;
  text-shadow: 0 0 18px rgba(245, 197, 66, 0.45);
}
h1 .glow {
  color: var(--accent);
}

.big-btn {
  background: linear-gradient(160deg, var(--velvet) 0%, var(--velvet-dark) 100%);
  box-shadow: 0 10px 24px rgba(163, 20, 44, 0.4);
  border: 2px solid var(--accent);
}
.big-btn.secondary {
  background: linear-gradient(160deg, var(--surface) 0%, var(--bg-deep) 100%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}

.card {
  background: rgba(20, 26, 51, 0.7);
  border: 1px solid rgba(245, 197, 66, 0.22);
}

.btn {
  background: var(--accent);
  color: #1a1400;
}
.btn.ghost {
  background: transparent;
  color: var(--accent-light);
  border: 1px solid rgba(245, 197, 66, 0.5);
}

/* Poster grid + film-strip cards */
.poster-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-top: 1rem;
}
@media (min-width: 560px) {
  .poster-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
.poster-card {
  background: var(--surface);
  border: 2px solid rgba(245, 197, 66, 0.18);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  padding: 0 8px;
  color: var(--text);
  font-family: inherit;
  display: flex;
  flex-direction: column;
  position: relative;
  background-image:
    repeating-linear-gradient(180deg, #000 0 6px, transparent 6px 12px),
    repeating-linear-gradient(180deg, #000 0 6px, transparent 6px 12px);
  background-size: 6px 100%, 6px 100%;
  background-position: left top, right top;
  background-repeat: repeat-y, repeat-y;
}
.poster-card:active {
  transform: scale(0.98);
}
.poster-card.ranked {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 197, 66, 0.35);
}
.poster-card .poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #000;
  display: block;
  margin-top: 8px;
  border-radius: 6px;
}
.poster-card .poster.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(160deg, var(--velvet-dark), var(--bg-deep));
}
.poster-card .medal {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 1.8rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
}
.poster-card .info {
  padding: 0.55rem 0.35rem 0.75rem;
}
.poster-card .name {
  font-weight: 800;
  font-size: 0.98rem;
  margin: 0 0 0.15rem;
}
.poster-card .meta {
  font-size: 0.78rem;
  color: var(--text-dim);
}
.poster-card .details {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 0.4rem;
  line-height: 1.35;
}
.poster-card .details a {
  color: var(--accent-light);
}
.poster-card .note {
  color: var(--accent-light);
  font-style: italic;
}
.details-toggle {
  background: none;
  border: none;
  color: var(--accent-light);
  font-size: 0.8rem;
  padding: 0.25rem 0;
  cursor: pointer;
  font-family: inherit;
}

/* Sticky ballot tray */
.ballot-tray {
  position: sticky;
  bottom: 0;
  margin: 1rem -1rem 0;
  padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(7, 11, 24, 0.85), var(--bg-deep));
  border-top: 2px solid var(--accent);
  backdrop-filter: blur(6px);
  z-index: 5;
}
.ballot-tray h3 {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ballot-slot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px dashed rgba(245, 197, 66, 0.2);
  font-size: 0.92rem;
}
.ballot-slot:last-child {
  border-bottom: none;
}
.ballot-slot .slot-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ballot-slot.empty .slot-title {
  color: var(--text-dim);
  font-style: italic;
}
.slot-actions button {
  background: var(--surface);
  color: var(--text);
  border: 1px solid rgba(245, 197, 66, 0.35);
  border-radius: 8px;
  min-width: 2.1rem;
  height: 2.1rem;
  font-size: 1rem;
  cursor: pointer;
}
.slot-actions button:disabled {
  opacity: 0.35;
}

/* Admin search */
.search-results {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.search-row {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  padding: 0.45rem;
}
.search-row img,
.search-row .thumb-placeholder {
  width: 44px;
  height: 66px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-row .grow {
  flex: 1;
  font-size: 0.9rem;
}
.tally img.thumb {
  width: 40px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

/* Reveal */
.reveal-poster {
  width: min(70vw, 260px);
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  border: 4px solid var(--accent);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  margin: 0.5rem auto;
  display: block;
}
.now-showing {
  font-family: 'Limelight', 'Georgia', serif;
  color: var(--accent);
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0.25rem 0;
}
