/* ──────────────────────────────────────────────────────────────────────
 * HAND_AI — sticker board
 * Industrial-arcade CRT terminal: black / lime / amber, mono numbers,
 * big display type, scanline texture.
 * ────────────────────────────────────────────────────────────────────── */

:root {
  --bg:       #0a0a0a;
  --surface:  #111111;
  --border:   #1f1f1f;
  --line:     #232323;
  --lime:     #b8ff57;
  --amber:    #ffb830;
  --pink:     #ff5da2;
  --red:      #ff4545;
  --muted:    #5a5a5a;
  --text:     #e8e8e8;
  --display:  "Syne", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:     "Azeret Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body {
  height: 100%; margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  overflow: hidden;
}

/* Hide the raw <video> — we render it to canvas instead. */
#webcam {
  position: fixed; top: 0; left: 0;
  width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}

/* ─── HUD: top bar ───────────────────────────────────────────────────── */
.hud-top {
  position: fixed;
  top: 12px; left: 12px; right: 12px;
  z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: rgba(17, 17, 17, 0.86);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo { color: var(--lime); font-size: 16px; line-height: 1; }
.brand strong { font-family: var(--display); font-weight: 800; font-size: 16px; letter-spacing: 0.12em; }
.brand .subtitle { color: var(--muted); }
.hud-right { display: flex; gap: 18px; }
.link { color: var(--amber); text-decoration: none; }
.link:hover { color: var(--lime); }

/* ─── Stage ──────────────────────────────────────────────────────────── */
.stage {
  position: fixed;
  inset: 64px 12px 64px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #050505;
}
#board {
  display: block;
  width: 100%; height: 100%;
}

/* Subtle scanlines + vignette to sell the CRT vibe */
.stage::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,0.02) 0px,
      rgba(255,255,255,0.02) 1px,
      transparent 1px,
      transparent 3px
    ),
    radial-gradient(120% 80% at 50% 50%, transparent 55%, rgba(0,0,0,0.55) 100%);
}

/* ─── Boot overlay ───────────────────────────────────────────────────── */
.boot-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 10, 10, 0.92);
  z-index: 20;
}
.boot-overlay.hidden { display: none; }
.boot-card {
  width: min(520px, 92%);
  padding: 28px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(184, 255, 87, 0.05) inset, 0 24px 60px rgba(0,0,0,0.6);
}
.boot-card h1 {
  font-family: var(--display);
  font-weight: 800; letter-spacing: 0.18em;
  font-size: 28px;
  color: var(--lime);
  margin: 0 0 4px;
}
.boot-card .lede { color: var(--amber); margin: 0 0 16px; font-size: 13px; letter-spacing: 0.06em; }
.boot-list { list-style: none; padding: 0; margin: 0 0 20px; font-size: 13.5px; line-height: 1.7; }
.boot-list b { color: var(--lime); font-weight: 700; }
#boot-go {
  appearance: none;
  background: var(--lime);
  color: #0a0a0a;
  border: none; border-radius: 6px;
  padding: 10px 16px;
  font-family: var(--mono); font-weight: 600;
  font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer;
}
#boot-go:hover { background: var(--amber); }
.fine { color: var(--muted); font-size: 11.5px; margin-top: 12px; letter-spacing: 0.04em; }

/* ─── HUD: bottom telemetry bar ──────────────────────────────────────── */
.hud-bottom {
  position: fixed;
  bottom: 12px; left: 12px; right: 12px;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  padding: 10px 14px;
  background: rgba(17, 17, 17, 0.86);
  border: 1px solid var(--border);
  border-radius: 8px;
  backdrop-filter: blur(4px);
}
.hud-cell { display: flex; align-items: baseline; gap: 10px; padding: 0 14px; border-right: 1px solid var(--line); }
.hud-cell:last-child { border-right: none; }
.hud-cell .label {
  font-size: 10.5px; color: var(--muted);
  letter-spacing: 0.18em; text-transform: uppercase;
}
.hud-cell .value {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 16px;
  color: var(--lime);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  min-width: 2ch;
}
.hud-cell .value.amber { color: var(--amber); }
.hud-cell .value.pink  { color: var(--pink); }
.hud-cell .value.lime  { color: var(--lime); }
.hud-cell .value.red   { color: #ff5454; }
.hud-cell .value.dim   { color: var(--muted); }

/* ─── Smaller screens ────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .hud-top { font-size: 11px; padding: 8px 10px; }
  .brand .subtitle { display: none; }
  .hud-right { gap: 10px; }
  .hud-bottom { grid-template-columns: repeat(3, 1fr); }
  .hud-cell { padding: 4px 10px; }
  .stage { inset: 60px 8px 92px 8px; }
}
