/* "Crown the Queen" — camp voting theme. Shared across landing/vote/control/display.
   Reuses the Full House Realness palette + core components from the bingo app. */
:root {
  --bg: #160a2b;
  --bg2: #0d0620;
  --panel: #241041;
  --panel2: #2f1553;
  --line: #40206a;
  --text: #f5e9ff;
  --muted: #b79fd6;
  --pink: #ff2d95;
  --pink2: #ff5db1;
  --gold: #ffd24a;
  --mint: #2ee6a6;
  --danger: #ff5a7a;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 700px at 50% -12%, #3a1a6b 0%, rgba(58,26,107,0) 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}
a { color: var(--pink2); }
h1, h2, h3 { font-family: "Chonburi", "Bowlby One SC", system-ui, serif; font-weight: 400; }

/* Brand lockup */
.brand { line-height: 1.05; }
.brand .t1 { font-size: 26px; }
.brand .t1 .accent { color: var(--pink); }
.brand .t2 { font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }

/* LIVE badge */
.live {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--pink); color: #fff; font-weight: 800; font-size: 12px;
  letter-spacing: .08em; padding: 5px 11px; border-radius: 999px;
}
.live .dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
.badge-soft {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px;
}

/* Buttons */
.btn {
  border: 1px solid var(--line); background: var(--panel2); color: var(--text);
  padding: 11px 16px; border-radius: 12px; font-weight: 700; cursor: pointer; font-size: 15px;
}
.btn:hover { border-color: var(--pink); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, var(--pink2), var(--pink)); border-color: transparent; color: #fff; }
.btn.gold { background: linear-gradient(180deg, #ffe07a, var(--gold)); border-color: transparent; color: #4a2c00; }
.btn.mint { background: var(--mint); border-color: transparent; color: #04351f; }
.btn.danger { background: transparent; border-color: #6b2740; color: var(--danger); }
.btn:active { transform: translateY(1px); }

/* Big call-to-action button (reused from bingo's .bingo-btn) */
.vote-btn {
  width: 100%; border: none; border-radius: 999px; padding: 16px; cursor: pointer;
  font-family: "Chonburi", serif; font-size: 21px; letter-spacing: .04em; color: #fff;
  background: linear-gradient(180deg, var(--pink2), var(--pink)); box-shadow: 0 10px 30px rgba(255,45,149,.5);
}
.vote-btn:active { transform: translateY(2px); }

/* Center forms (landing / join) */
.center { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.sheet { width: 460px; max-width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 26px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; color: var(--muted); font-size: 13px; }
input, select {
  background: var(--panel2); border: 1px solid var(--line); color: var(--text);
  border-radius: 12px; padding: 12px; font: inherit; font-size: 16px;
}
input:focus, select:focus { outline: none; border-color: var(--pink); }
.err { color: var(--danger); font-size: 14px; min-height: 18px; }
.hint { color: var(--muted); font-size: 13px; }

/* URL result rows (landing) */
.urls { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.urlrow { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.urlrow .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.urlrow .v { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.urlrow .v code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.urlrow .v a { flex: 0 0 auto; }
.qr-inline { text-align: center; margin-top: 16px; }
.qr-inline img { width: 200px; height: 200px; background: #fff; border-radius: 12px; padding: 8px; }

/* Shared panels + heads */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 16px; }
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

/* ============ VOTER (vote.html) ============ */
.play-wrap { max-width: 460px; margin: 0 auto; padding: 12px 14px; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; gap: 12px; }
.countdown-bar {
  text-align: center; font-family: "Chonburi", serif; font-size: 34px; color: var(--gold);
  background: rgba(255,45,149,.10); border: 1px solid rgba(255,45,149,.4); border-radius: 14px; padding: 8px;
}
.countdown-bar.low { color: var(--danger); border-color: rgba(255,90,122,.6); animation: pulse 1s ease-in-out infinite; }
.countdown-bar .cap { font-family: system-ui; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
  background: var(--panel2); border: 2px solid var(--line); color: var(--text);
  border-radius: 14px; padding: 14px 16px; cursor: pointer; font-size: 18px; font-weight: 700;
  transition: transform .12s ease, border-color .15s ease, background .15s ease;
}
.choice:hover { border-color: var(--pink); }
.choice .tick { margin-left: auto; font-size: 20px; opacity: 0; }
.choice.picked { border-color: var(--pink); background: rgba(255,45,149,.16); transform: scale(1.01); }
.choice.picked .tick { opacity: 1; }
.choice:disabled { cursor: default; opacity: .8; }
.status-note {
  text-align: center; font-weight: 800; color: var(--gold);
  background: rgba(255,45,149,.12); border: 1px solid rgba(255,45,149,.4); border-radius: 14px; padding: 12px;
}
.status-note.closed { color: var(--muted); background: transparent; }

/* ============ CONTROL (control.html) ============ */
.wrap { max-width: 900px; margin: 0 auto; padding: 16px; }
.contestant-rows { display: flex; flex-direction: column; gap: 8px; }
.contestant-rows .row { display: flex; gap: 8px; align-items: center; }
.contestant-rows .row input { flex: 1; }
.dur-seg { display: flex; gap: 8px; flex-wrap: wrap; }
.dur-seg .btn.active { background: rgba(255,45,149,.22); color: #fff; box-shadow: inset 0 0 0 1px var(--pink); }
.tally { display: flex; flex-direction: column; gap: 8px; }
.tally .trow { display: flex; align-items: center; gap: 12px; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.tally .trow .name { font-weight: 800; }
.tally .trow .bar { flex: 1; height: 10px; border-radius: 999px; background: #1c1030; overflow: hidden; }
.tally .trow .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--pink2), var(--pink)); width: 0; transition: width .4s ease; }
.tally .trow .n { font-family: "Chonburi", serif; font-size: 20px; min-width: 34px; text-align: right; }
.tally .trow.lead { border-color: var(--gold); }
.tally .trow.lead .n { color: var(--gold); }
.controls-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.stat-inline { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 6px; }
.stat-inline .s .label { font-size: 11px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.stat-inline .s .value { font-size: 22px; font-weight: 900; font-family: "Chonburi", serif; }

/* ============ DISPLAY (display.html) ============ */
.dwrap { height: 100vh; display: flex; flex-direction: column; padding: 2.5vmin 4vmin; }
.dhead { display: flex; align-items: center; justify-content: space-between; gap: 2vmin; flex: 0 0 auto; }
.dhead .title { font-family: "Chonburi", serif; font-size: 5vmin; }
.dhead .title .accent { color: var(--pink); }
.dhead .right { display: flex; align-items: center; gap: 2vmin; font-size: 2.6vmin; color: var(--muted); }
.live-xl { font-size: 2.4vmin; padding: 0.8vmin 1.6vmin; }
.dbody { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3vmin; }
.dtimer { font-family: "Chonburi", serif; font-size: 20vmin; line-height: 1; color: var(--gold); text-shadow: 0 0 5vmin rgba(255,210,74,.4); }
.dtimer.low { color: var(--danger); text-shadow: 0 0 5vmin rgba(255,90,122,.5); animation: pulse 1s ease-in-out infinite; }
.dtimer-cap { font-size: 3vmin; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.dcontestants { display: flex; flex-wrap: wrap; justify-content: center; gap: 2vmin; max-width: 90vw; }
.dchip { font-size: 4vmin; font-weight: 800; padding: 1.4vmin 3vmin; border-radius: 999px; background: var(--panel2); border: 2px solid var(--line); }
.dvotes { font-size: 3vmin; color: var(--muted); }
.dtitle-lg { font-family: "Chonburi", serif; font-size: 7vmin; text-align: center; }
.dtitle-lg .accent { color: var(--pink); }

/* Leaderboard reveal (bottom-to-top) */
.board { display: flex; flex-direction: column; gap: 1.6vmin; width: min(88vw, 1100px); }
.brow {
  display: flex; align-items: center; gap: 3vmin; background: var(--panel2);
  border: 2px solid var(--line); border-radius: 2vmin; padding: 2vmin 3vmin;
  opacity: 0; transform: translateY(6vmin) scale(.96);
  transition: opacity .5s ease, transform .5s cubic-bezier(.2,1.3,.4,1);
}
.brow.show { opacity: 1; transform: none; }
.brow .rank { font-family: "Chonburi", serif; font-size: 5vmin; color: var(--muted); min-width: 8vmin; }
.brow .name { font-family: "Chonburi", serif; font-size: 5.5vmin; flex: 1; }
.brow .votes { font-size: 4vmin; font-weight: 800; color: var(--muted); }
.brow.winner { border-color: var(--gold); background: linear-gradient(90deg, rgba(255,210,74,.18), var(--panel2)); box-shadow: 0 0 6vmin rgba(255,210,74,.35); }
.brow.winner .rank, .brow.winner .name { color: var(--gold); }
.brow.winner .votes { color: var(--gold); }
.crown { font-size: 5.5vmin; }

.overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(9,4,20,.92); backdrop-filter: blur(8px); z-index: 80; }
.overlay[hidden] { display: none; }
.qr-card { background:#fff; color:#1a0b2e; border-radius:3vmin; padding:4vmin 5vmin; text-align:center; }
.qr-card h2 { margin:0 0 3vmin; font-size:4.5vmin; font-family:"Chonburi",serif; }
.qr-card img { width:56vmin; height:56vmin; }
.qr-url { margin-top:2vmin; font-size:3vmin; font-weight:800; color:var(--pink); word-break:break-all; }
.locked-full { height:100vh; display:grid; place-items:center; text-align:center; }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; }

/* Operator-chosen venue logo on the display */
.dhead .dlogo { height: 7vmin; max-width: 30vmin; object-fit: contain; }
/* Venue-logo picker (control console header) */
.venue-logo-ctl { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.venue-logo-ctl select { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; text-transform: none; letter-spacing: 0; }
