/* Savage Pitch. The big screen (body.host) and the phones (body.phone) share this file.
   Savage Global Marketing brand: black and white, green #44D62C, accents purple, pink and sky,
   Montserrat, square buttons. Big-screen sizes scale with the window so they read on a TV. */
:root {
  --green: #44d62c;
  --purple: #7482e3;
  --pink: #ff8af3;
  --sky: #70d2f0;
  --gold: #f2b33d;
  --ink: #050505;
  --panel: #121212;
  --line: #2a2a2a;
  --text: #ffffff;
  --muted: #a3a3a3;
  --red: #ff4d5e;
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: radial-gradient(1100px 600px at 85% -10%, rgba(116, 130, 227, 0.22), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(68, 214, 44, 0.16), transparent 60%), var(--ink);
  color: var(--text);
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.muted { color: var(--muted); }
.green { color: var(--green); }

/* ---------- buttons (square, brand) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  border: 0; border-radius: 0; padding: 0.75em 1.3em;
  font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--green); color: #031a00;
}
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost:hover:not(:disabled) { box-shadow: inset 0 0 0 2px var(--muted); }
.btn.big { font-size: 1.2rem; padding: 0.9em 1.8em; }
.btn.small { font-size: 0.8rem; padding: 0.5em 0.9em; }
.btn.danger { background: transparent; color: var(--red); box-shadow: inset 0 0 0 2px var(--red); }
input, select, textarea {
  background: #0d0d0d; border: 2px solid var(--line); border-radius: 0; padding: 0.7em 0.9em; width: 100%;
}
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 3px solid var(--green); outline-offset: 1px; }
label { display: block; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.4em; }
.error { color: var(--red); min-height: 1.3em; margin: 0.6em 0 0; font-weight: 700; }

/* ---------- big screen layout ---------- */
.host { --u: clamp(10px, 1.05vw, 22px); font-size: var(--u); }
.topbar {
  display: flex; align-items: center; gap: 1.5em; padding: 0.9em 1.6em;
  border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, 0.6);
}
.brand { display: flex; align-items: center; gap: 0.7em; }
.brand img { width: 2.8em; height: 2.8em; }
.brand h1 { margin: 0; font-size: 1.7em; font-weight: 900; text-transform: uppercase; letter-spacing: 0.02em; }
.brand h1 span { color: var(--green); }
.joinline { display: flex; align-items: center; gap: 0.9em; margin-left: auto; font-size: 1.25em; font-weight: 700; }
.joinline b { color: var(--green); letter-spacing: 0.12em; font-size: 1.3em; }
.qr svg { display: block; width: 100%; height: 100%; }
.qr.small { width: 4.4em; height: 4.4em; }
.tools { display: flex; gap: 0.6em; }
.joinline + .tools { margin-left: 0; }
.tools:only-child, .brand + .tools { margin-left: auto; }
.tool { background: transparent; border: 2px solid var(--line); padding: 0.45em 0.9em; font-weight: 800; font-size: 0.85em; }
.tool:hover { border-color: var(--muted); }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--panel); border: 2px solid var(--line); min-width: 15em; z-index: 10; display: grid; }
.menu button { background: none; border: 0; text-align: left; padding: 0.8em 1em; font-weight: 700; }
.menu button:hover { background: #1d1d1d; }
.menu .danger { color: var(--red); }

.stage { padding: 2.2em 3em 7em; max-width: 120em; margin: 0 auto; }
.eyebrow { color: var(--green); font-weight: 900; letter-spacing: 0.18em; text-transform: uppercase; font-size: 1.1em; margin: 0 0 0.6em; }
.headline { font-size: 3.2em; font-weight: 900; line-height: 1.08; margin: 0 0 0.3em; text-transform: uppercase; }
.lead { font-size: 1.4em; color: var(--muted); margin: 0 0 1.4em; max-width: 50em; }

/* setup */
.setup { max-width: 52em; margin: 0 auto; background: var(--panel); border-top: 4px solid var(--green); padding: 2.2em 2.4em; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1em 1.4em; margin: 1.4em 0 1.8em; }
.setup .btn { font-size: 1.1em; }

/* lobby */
.lobby { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 3em; align-items: start; }
.joinbox { background: var(--panel); border-top: 4px solid var(--green); padding: 2em; text-align: center; }
.joinbox .qr { width: 15em; height: 15em; margin: 0 auto 1.2em; }
.joinbox .code { font-size: 5em; font-weight: 900; letter-spacing: 0.14em; color: var(--green); line-height: 1; margin: 0.1em 0 0.2em; }
.joinbox .url { font-size: 1.3em; font-weight: 700; word-break: break-all; }
.chips { display: flex; flex-wrap: wrap; gap: 0.7em; margin: 0 0 1.6em; }
.chip { display: inline-flex; align-items: center; gap: 0.55em; padding: 0.55em 0.9em; background: var(--panel); border-left: 0.35em solid var(--c, var(--green)); font-weight: 800; font-size: 1.2em; }
.chip.off { opacity: 0.45; }
.chip .tag { font-size: 0.65em; background: var(--purple); color: #fff; padding: 0.15em 0.5em; font-weight: 800; }
.chip .x { background: none; border: 0; color: var(--muted); font-weight: 900; padding: 0 0 0 0.3em; }
.chip.done { box-shadow: inset 0 0 0 2px var(--green); }
.chip.done::after { content: '✓'; color: var(--green); }
.summary { color: var(--muted); font-size: 1.15em; margin: 0 0 1.4em; }
.actions { display: flex; gap: 1em; flex-wrap: wrap; align-items: center; }

/* brief */
.brief { text-align: center; padding: 1.5em 0 0; }
.brief .client { font-size: 4.2em; font-weight: 900; line-height: 1.1; margin: 0.2em auto 0.35em; max-width: 22em; }
.brief .ask { font-size: 1.8em; font-weight: 800; color: var(--pink); text-transform: uppercase; letter-spacing: 0.06em; }
.brief.small .client { font-size: 2.4em; margin-bottom: 0.2em; }
.brief.small .ask { font-size: 1.2em; }
.mult { display: inline-block; background: var(--gold); color: #1d1300; font-weight: 900; padding: 0.15em 0.55em; margin-left: 0.4em; font-size: 0.8em; letter-spacing: 0.04em; }
.clock { font-size: 5.5em; font-weight: 900; font-variant-numeric: tabular-nums; margin: 0.25em 0 0.15em; }
.clock.low { color: var(--red); }
.clock.paused { color: var(--muted); }
.bar { height: 0.7em; background: #1d1d1d; max-width: 46em; margin: 0 auto 1.8em; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--sky)); transition: width 0.25s linear; }
.status { justify-content: center; }

/* answers */
.answers { display: grid; grid-template-columns: repeat(auto-fit, minmax(22em, 1fr)); gap: 1.1em; margin: 1.6em 0 0; }
.answer {
  position: relative; background: var(--panel); border-left: 0.45em solid var(--purple); padding: 1.2em 1.4em 1.1em 3.6em;
  font-size: 1.45em; font-weight: 800; line-height: 1.25; min-height: 4.5em; text-align: left;
}
.answer .letter { position: absolute; left: 0.75em; top: 1em; color: var(--purple); font-weight: 900; font-size: 1.2em; }
.answer .text { display: block; }
.answer .who { display: flex; align-items: center; gap: 0.6em; margin-top: 0.7em; font-size: 0.72em; color: var(--muted); }
.answer .who .dot { width: 0.8em; height: 0.8em; border-radius: 50%; background: var(--c); }
.answer .votes { margin-left: auto; color: var(--text); font-weight: 900; }
.answer .pts { color: var(--green); font-weight: 900; }
.answer.top { border-left-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.answer.top .letter::after { content: ' 👑'; }
.answer.picked { box-shadow: 0 0 0 3px var(--pink); }
.answer .hostbtns { position: absolute; right: 0.6em; top: 0.5em; display: flex; gap: 0.4em; font-size: 0.55em; }
.answer .hostbtns button { background: rgba(0, 0, 0, 0.5); border: 1px solid var(--line); padding: 0.3em 0.6em; font-weight: 800; }
.answer .hostbtns button.on { background: var(--pink); color: #2a0028; border-color: var(--pink); }
.reveal .answer { animation: pop 0.45s ease both; }
@keyframes pop { from { transform: scale(0.94); opacity: 0; } to { transform: none; opacity: 1; } }

/* scores and the end */
.board { list-style: none; padding: 0; margin: 1.4em auto 0; max-width: 46em; display: grid; gap: 0.55em; counter-reset: pos; }
.board li { display: grid; grid-template-columns: 2.4em 1fr auto; align-items: center; gap: 0.8em; background: var(--panel); padding: 0.75em 1.1em; font-size: 1.45em; font-weight: 800; border-left: 0.35em solid var(--c); }
.board li::before { counter-increment: pos; content: counter(pos); color: var(--muted); font-weight: 900; }
.board li:first-child { box-shadow: 0 0 0 2px var(--gold); }
.board .score { font-variant-numeric: tabular-nums; color: var(--green); }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 1.2em; margin: 1.6em 0 2.2em; }
.podium .step { width: 13em; text-align: center; }
.podium .block { background: var(--panel); border-top: 0.4em solid var(--c); padding: 1em 0.6em; font-weight: 900; }
.podium .p1 .block { height: 13em; } .podium .p2 .block { height: 9.5em; } .podium .p3 .block { height: 7em; }
.podium .place { font-size: 3em; color: var(--gold); }
.podium .nm { font-size: 1.5em; margin: 0.4em 0 0.2em; word-break: break-word; }
.best { list-style: none; padding: 0; margin: 0 auto; max-width: 60em; display: grid; gap: 0.6em; }
.best li { background: var(--panel); padding: 0.8em 1.1em; font-size: 1.2em; border-left: 0.35em solid var(--c); }
.best li b { font-size: 1.15em; }
.best li span { display: block; color: var(--muted); font-size: 0.8em; margin-top: 0.25em; }

/* the host's controls during a game */
.controls { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 0.8em; padding: 0.9em; background: rgba(0, 0, 0, 0.8); border-top: 1px solid var(--line); }

/* ---------- phones ---------- */
.phone { font-size: 17px; }
.phone .wrap { max-width: 34em; margin: 0 auto; padding: 1.1em 1.1em 3em; }
.phone header { display: flex; align-items: center; gap: 0.6em; margin-bottom: 1.2em; }
.phone header img { width: 2.4em; height: 2.4em; }
.phone header h1 { font-size: 1.25em; margin: 0; font-weight: 900; text-transform: uppercase; }
.phone header h1 span { color: var(--green); }
.phone header .me { margin-left: auto; display: flex; align-items: center; gap: 0.4em; font-weight: 800; font-size: 0.9em; }
.phone header .me i { width: 0.8em; height: 0.8em; border-radius: 50%; background: var(--c); }
.card { background: var(--panel); border-top: 4px solid var(--green); padding: 1.3em; margin-bottom: 1em; }
.card h2 { margin: 0 0 0.4em; font-size: 1.35em; font-weight: 900; }
.card p { margin: 0 0 0.8em; line-height: 1.45; }
.card .field { margin-bottom: 1em; }
.card .btn { width: 100%; font-size: 1.05em; }
.phone .client { font-size: 1.35em; font-weight: 900; line-height: 1.2; margin: 0 0 0.3em; }
.phone .ask { color: var(--pink); font-weight: 900; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.85em; margin: 0 0 1em; }
.phone textarea { min-height: 6.5em; resize: vertical; font-size: 1.15em; }
.count { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.85em; margin: 0.4em 0 0.9em; }
.count .over { color: var(--red); font-weight: 800; }
.phone .clockline { display: flex; justify-content: space-between; align-items: center; font-weight: 800; margin-bottom: 0.8em; }
.phone .clockline .t { font-size: 1.4em; font-variant-numeric: tabular-nums; }
.vote-list { display: grid; gap: 0.6em; }
.vote-list button { text-align: left; background: #0d0d0d; border: 2px solid var(--line); padding: 0.95em 1em; font-weight: 700; font-size: 1.05em; line-height: 1.3; }
.vote-list button.chosen { border-color: var(--green); background: rgba(68, 214, 44, 0.12); }
.vote-list button.mine { opacity: 0.45; cursor: default; }
.vote-list button.mine::after { content: ' (yours)'; color: var(--muted); font-weight: 600; }
.bigline { font-size: 2.2em; font-weight: 900; color: var(--green); margin: 0.1em 0 0.2em; }
.sent { color: var(--green); font-weight: 800; }

@media (max-width: 900px) {
  .lobby { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .stage { padding: 1.4em 1.2em 7em; }
  .topbar { flex-wrap: wrap; }
}
