/* Gawkin web — "Blood Sport" night palette (mirrors the iOS Theme). */
:root {
  --bg: #13090c; --bg2: #1a0b10; --ink: #fff5f2; --red: #ff4d5a; --gold: #ffc857;
  --dim: rgba(255, 245, 242, 0.55); --card: #221318;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; background: var(--bg); color: var(--ink);
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased;
}
body { display: flex; flex-direction: column; min-height: 100dvh; }
a { color: var(--red); }

/* top bar */
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.wordmark { font-weight: 800; letter-spacing: 2px; font-size: 20px; flex: 1; text-align: center; }
.back { background: none; border: 0; color: var(--ink); font-size: 16px; font-weight: 700; cursor: pointer; padding: 6px; }
.name {
  background: var(--card); border: 1px solid rgba(255, 77, 90, 0.35); color: var(--ink);
  border-radius: 999px; padding: 8px 14px; font-size: 14px; width: 130px; outline: none;
}
.name:focus { border-color: var(--red); }

/* stage holds the views; views fill it */
.stage { position: relative; flex: 1; display: flex; min-height: 0; padding: 0 12px 12px; }
.view { flex: 1; display: flex; flex-direction: column; min-height: 0; }

/* HOME */
.home { align-items: center; justify-content: center; gap: 14px; text-align: center; }
.tagline { font-size: clamp(30px, 8vw, 54px); font-weight: 900; margin: 0; }
.sub { color: var(--dim); margin: 0 0 10px; font-size: 15px; }
.bestchip { color: var(--gold); font-weight: 700; font-size: 14px; min-height: 18px; }
.hint { color: var(--dim); font-size: 12px; margin-top: 8px; }

/* live panes */
.panes { flex: 1; display: grid; gap: 10px; grid-template-columns: 1fr 1fr; min-height: 0; }
@media (max-width: 720px) { .panes { grid-template-columns: 1fr; } }
.pane {
  position: relative; background: #000; border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(255, 245, 242, 0.08); min-height: 200px;
}
.pane.solo { flex: 1; }
.pane video { width: 100%; height: 100%; object-fit: cover; display: block; transform: scaleX(-1); }
.tag {
  position: absolute; left: 10px; bottom: 10px; font-size: 12px; font-weight: 700;
  background: rgba(0, 0, 0, 0.45); padding: 4px 10px; border-radius: 999px;
}
.meterwrap {
  position: absolute; right: 10px; bottom: 10px; width: 90px; height: 6px;
  background: rgba(255, 255, 255, 0.18); border-radius: 999px; overflow: hidden;
}
.meter { height: 100%; width: 0%; background: var(--red); transition: width 80ms linear; }
.livestatus { color: var(--dim); font-size: 14px; text-align: center; padding: 10px 0 4px; min-height: 18px; }

/* solo timer */
.solotimer {
  position: absolute; top: 12px; left: 0; right: 0; text-align: center;
  font-size: clamp(48px, 13vw, 96px); font-weight: 900; font-variant-numeric: tabular-nums;
  text-shadow: 0 0 30px rgba(0, 0, 0, 0.7); pointer-events: none;
}

/* shared countdown overlay */
.countdown {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: clamp(90px, 22vw, 200px); font-weight: 900; color: var(--ink);
  text-shadow: 0 0 50px rgba(255, 77, 90, 0.6); pointer-events: none; z-index: 5;
}

/* live result overlay */
.result {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 14px; background: rgba(7, 3, 5, 0.82); backdrop-filter: blur(4px); z-index: 6;
}
.resultTitle { font-size: clamp(40px, 10vw, 84px); font-weight: 900; color: var(--gold); }
.resultSub { color: var(--dim); font-size: 16px; }

/* records */
.boardtitle { text-align: center; font-weight: 800; margin: 6px 0 12px; }
.boardtabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; }
.tab {
  background: rgba(255, 245, 242, 0.06); border: 0; color: var(--dim); border-radius: 999px;
  padding: 8px 16px; font-weight: 700; font-size: 13px; cursor: pointer;
}
.tab.active { background: var(--red); color: var(--bg); }
.boardlist { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; }
.boardlist .row {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: rgba(255, 245, 242, 0.05); border-radius: 12px;
}
.boardlist .row.me { background: rgba(255, 77, 90, 0.18); }
.boardlist .rank { width: 28px; font-weight: 800; color: var(--dim); }
.boardlist .who { flex: 1; font-weight: 600; }
.boardlist .sc { font-weight: 800; color: var(--red); font-variant-numeric: tabular-nums; }
.muted { color: var(--dim); text-align: center; padding: 24px; }

/* buttons */
.btn {
  background: var(--red); color: var(--bg); border: 0; border-radius: 14px; font-weight: 800;
  padding: 12px 22px; font-size: 16px; cursor: pointer; transition: transform 0.1s ease;
}
.btn:hover { transform: scale(1.03); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn.big { font-size: 20px; letter-spacing: 1px; padding: 14px 44px; }
.btn.ghost { background: rgba(255, 245, 242, 0.08); color: var(--ink); }
