:root {
  --bg: #05070d;
  --panel: #0b1120;
  --line: #1a2438;
  --text: #e8eef5;
  --muted: #7f8ba0;
  --green: #39ff88;
  --cyan: #00e5ff;
  --red: #ff2a46;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1000px 500px at 50% -10%, #0c1a33, var(--bg) 65%) fixed;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.wrap { width: min(980px, 100%); padding: 16px; }

.board {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 18px;
  margin-bottom: 12px;
}
.team { display: flex; align-items: center; gap: 12px; min-width: 0; }
.team.bugs { justify-content: flex-end; }
.name { font-weight: 900; font-style: italic; letter-spacing: 2px; font-size: clamp(13px, 2.4vw, 18px); white-space: nowrap; }
.you .name { color: var(--cyan); }
.bugs .name { color: var(--red); }
.dots { display: flex; gap: 5px; flex-wrap: wrap; }
.dots i { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid #3a4660; display: inline-block; }
.dots i.g { background: var(--green); border-color: var(--green); box-shadow: 0 0 8px var(--green); }
.dots i.m { background: var(--red); border-color: var(--red); }
.score { font-size: clamp(26px, 5vw, 40px); font-weight: 900; font-variant-numeric: tabular-nums; display: flex; gap: 10px; align-items: center; }
.score i { color: var(--muted); font-style: normal; font-weight: 300; }

.stage { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
canvas { display: block; width: 100%; height: auto; touch-action: none; cursor: crosshair; background: #04060b; }

.banner {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(.6);
  font-size: clamp(40px, 10vw, 96px); font-weight: 900; font-style: italic; letter-spacing: 2px;
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .25s cubic-bezier(.2, 1.6, .4, 1);
  text-shadow: 0 0 30px currentColor; white-space: nowrap;
}
.banner.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.banner.good { color: var(--green); }
.banner.bad { color: var(--red); }
.banner.info { color: var(--cyan); font-size: clamp(22px, 5vw, 44px); }

.overlay {
  position: absolute; inset: 0;
  background: rgba(5, 7, 13, .86);
  backdrop-filter: blur(4px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 24px; gap: 10px;
}
.overlay.hidden { display: none; }
.overlay h1 { margin: 0; font-size: clamp(40px, 8vw, 76px); line-height: .95; font-weight: 900; font-style: italic; letter-spacing: -1px; }
.overlay h1 em { color: var(--cyan); -webkit-text-stroke: 0; }
.overlay h2 { margin: 0; font-size: clamp(32px, 6vw, 56px); font-weight: 900; font-style: italic; }
.lead { color: #c3cddb; max-width: 520px; line-height: 1.5; margin: 6px 0; }
.how { list-style: none; padding: 0; margin: 4px 0 10px; max-width: 560px; text-align: left; color: var(--muted); font-size: 14px; line-height: 1.55; }
.how li { margin: 6px 0; }
.how b { color: var(--text); }
kbd { font-family: ui-monospace, Menlo, monospace; font-size: 12px; border: 1px solid #3a4660; border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; color: var(--text); }
.stats { display: grid; grid-template-columns: repeat(3, auto); gap: 8px 22px; margin: 8px 0 14px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: var(--muted); }
.stats b { display: block; font-size: 24px; color: var(--text); font-family: Inter, sans-serif; }

button {
  font: inherit; color: var(--text); background: #111a2e; border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 18px; cursor: pointer;
}
button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
button.primary { background: var(--cyan); color: #00121a; border-color: var(--cyan); font-weight: 800; font-size: 17px; padding: 12px 30px; box-shadow: 0 0 24px rgba(0, 229, 255, .35); }
button.primary:hover { box-shadow: 0 0 34px rgba(0, 229, 255, .6); }
button.ghost { background: transparent; }

.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; color: var(--muted); font-family: ui-monospace, Menlo, monospace; font-size: 13px; letter-spacing: 1px; }
.credit { color: var(--muted); font-size: 13px; margin: 6px 0 28px; }
.credit a { color: var(--cyan); }

@media (max-width: 600px) {
  .wrap { padding: 10px; }
  .board { padding: 10px 12px; gap: 8px; }
  .dots i { width: 8px; height: 8px; }
  .how { font-size: 13px; }
}
