/* party.css — the grid aesthetic: phosphor green on near-black, CRT vibes,
   and a touch of gold for the birthday finale. */

:root {
  --green: #39ff6e;
  --green-dim: #1d9a43;
  --gold: #ffd966;
  --bg: #04070a;
  --panel: #07130c;
  --line: #123b24;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--green);
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  overflow: hidden;
}

/* ---- CRT overlay ---------------------------------------------------- */
.crt {
  position: fixed; inset: 0; pointer-events: none; z-index: 50;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.22) 0px, rgba(0,0,0,0.22) 1px, transparent 1px, transparent 3px);
  mix-blend-mode: multiply;
  animation: flicker 4s infinite;
}
@keyframes flicker {
  0%, 100% { opacity: 0.9; }
  92% { opacity: 0.9; }
  93% { opacity: 0.75; }
  94% { opacity: 0.95; }
}

/* ---- header / footer ------------------------------------------------ */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 14px;
  font-size: 11px; letter-spacing: 1px;
  color: var(--green-dim);
  background: rgba(4, 7, 10, 0.85);
  border-bottom: 1px solid var(--line);
  text-transform: uppercase;
  text-shadow: 0 0 6px rgba(57, 255, 110, 0.5);
}

/* ---- scenes ---------------------------------------------------------- */
main { position: fixed; inset: 34px 0 10px 0; z-index: 10; }
.scene { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; }
.scene.active { display: flex; }

.big {
  font-size: clamp(28px, 9vw, 110px);
  font-weight: 800;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(57, 255, 110, 0.7), 0 0 60px rgba(57, 255, 110, 0.35);
}
.big.gold {
  color: var(--gold);
  text-shadow: 0 0 18px rgba(255, 217, 102, 0.7), 0 0 60px rgba(255, 217, 102, 0.3);
}
.sub { color: var(--green-dim); letter-spacing: 3px; font-size: 13px; text-transform: uppercase; }
.dim { color: var(--green-dim); font-size: 13px; letter-spacing: 1px; }
.msg { color: var(--gold); font-size: clamp(14px, 2.6vw, 26px); max-width: 34em; line-height: 1.6; }
.cursor-line { font-size: 16px; letter-spacing: 2px; }
.cursor { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---- terminal log ----------------------------------------------------- */
.log {
  width: min(94vw, 980px);
  height: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 14px 16px;
  overflow: hidden;
  font-size: clamp(10px, 1.6vw, 13px);
  line-height: 1.55;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-all;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.7), 0 0 24px rgba(57,255,110,0.08);
}
.log .warn { color: #ffb347; }
.log .ok   { color: var(--green-dim); }
.log .gold { color: var(--gold); }
.log .dim  { color: #2e6b45; }

/* ---- transfers -------------------------------------------------------- */
.transfer-wrap {
  width: min(96vw, 1100px); height: 82%;
  display: grid; grid-template-rows: 1fr auto; gap: 10px;
}
.stage-title {
  font-size: clamp(13px, 2.4vw, 20px); letter-spacing: 2px;
  color: var(--gold); text-shadow: 0 0 10px rgba(255,217,102,0.5);
  text-transform: uppercase; min-height: 1.4em;
}
.bars { display: flex; flex-direction: column; gap: 7px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) 64px; gap: 10px; align-items: center; font-size: 11px; }
.bar-label { text-align: right; color: var(--green-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 12px; background: #06150d; border: 1px solid var(--line); position: relative; }
.bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--green-dim), var(--green));
  box-shadow: 0 0 8px rgba(57,255,110,0.6);
  transition: width 0.4s linear;
}
.bar-fill.done { background: var(--gold); box-shadow: 0 0 8px rgba(255,217,102,0.7); }
.bar-pct { color: var(--green); text-align: right; font-size: 11px; }

/* ---- reveal / music / done ------------------------------------------- */
.reveal-inner, .music-inner, .done-inner {
  position: relative; z-index: 5;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
}
#confetti, #confetti2, #confetti3, #viz { position: absolute; inset: 0; width: 100%; height: 100%; }
#viz { z-index: 1; opacity: 0.9; }
.mini-bar { width: min(70vw, 520px); height: 8px; border: 1px solid var(--line); }
#music-fill { height: 100%; width: 0%; background: var(--gold); box-shadow: 0 0 10px rgba(255,217,102,0.6); }

/* ---- unmute banner (browsers demand a human hand before audio) ---------- */
.unmute {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  padding: 10px 14px;
  background: rgba(4, 7, 10, 0.92);
  border-top: 1px solid var(--gold);
}
.unmute.hidden { display: none; }
.unmute-btn {
  font-family: inherit; font-size: 13px; letter-spacing: 2px;
  color: var(--gold); background: none;
  border: 1px solid var(--gold);
  padding: 8px 18px; cursor: pointer; text-transform: uppercase;
  text-shadow: 0 0 12px rgba(255, 217, 102, 0.6);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  50% { transform: scale(1.06); box-shadow: 0 0 30px rgba(255, 217, 102, 0.35); }
}
