/* FEINT · the 3D arena HUD. Noir darkroom: near-black, cold blue field, hot fight-red accent.
   Teko (condensed scoreboard) + Courier Prime (wire). HUD floats over a full-bleed WebGL stage. */

:root {
  --void: #04060c;
  --panel: rgba(8, 12, 20, 0.72);
  --panel-solid: #080c14;
  --ink: #e8eef7;
  --ink-dim: #8ea3bd;
  --blue: #59a8ff;
  --blue-deep: #1c3f63;
  --red: #ff3b30;
  --red-dim: #b3271e;
  --line: rgba(89, 168, 255, 0.22);
  --font-display: "Teko", "Arial Narrow", sans-serif;
  --font-wire: "Courier Prime", "Courier New", monospace;
  --font-body: "Barlow Semi Condensed", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--void); color: var(--ink);
  font-family: var(--font-body); overflow: hidden; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* ---------- HUD scaffolding (pointer-through except on controls) ---------- */
.hud { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
.hud > * { pointer-events: auto; }

/* masthead */
.masthead {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 16px;
  padding: 8px 16px;
  background: linear-gradient(to bottom, rgba(4,6,12,0.92), rgba(4,6,12,0));
  pointer-events: none;
}
.masthead .brand {
  font-family: var(--font-display); font-size: 44px; line-height: 0.8; font-weight: 700;
  letter-spacing: 0.02em; text-transform: uppercase;
}
.masthead .brand .i { color: var(--red); }
.masthead .tagline { font-family: var(--font-wire); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-dim); }
.masthead nav { margin-left: auto; display: flex; gap: 16px; font-family: var(--font-display);
  font-size: 20px; text-transform: uppercase; letter-spacing: 0.06em; pointer-events: auto; }
.masthead nav a[aria-current="page"] { color: var(--red); }
.live { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-wire);
  font-size: 11px; letter-spacing: 0.12em; color: var(--red); text-transform: uppercase; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 8px var(--red); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

/* bout bar under masthead */
.boutbar { position: fixed; top: 58px; left: 16px; display: flex; align-items: baseline; gap: 14px; }
.boutbar h1 { font-family: var(--font-display); font-size: 30px; margin: 0; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.01em; text-shadow: 0 2px 10px rgba(0,0,0,0.8); }
.boutbar .clock { font-family: var(--font-wire); font-size: 14px; color: var(--ink-dim); }
.boutbar .clock .z { color: var(--red); }

/* the wire · bottom-left kill ticker */
.wire {
  position: fixed; left: 16px; bottom: 16px; width: min(360px, 40vw); max-height: 40vh;
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--red);
  backdrop-filter: blur(6px); padding: 8px 10px; overflow: hidden;
}
.wire h2 { font-family: var(--font-display); font-size: 18px; margin: 0 0 4px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-dim); }
.wire ul { list-style: none; margin: 0; padding: 0; font-family: var(--font-wire); font-size: 12px;
  line-height: 1.45; max-height: calc(40vh - 34px); overflow-y: auto; }
.wire li { padding: 3px 0; border-bottom: 1px solid rgba(89,168,255,0.1); animation: fadein .3s; }
@keyframes fadein { from { opacity: 0; transform: translateY(-4px); } }
.wire .dl { color: var(--red); font-weight: 700; }
.wire .say { font-style: italic; color: var(--blue); }
.wire li.kill { color: #fff; font-weight: 700; text-transform: uppercase; }

/* tale of the tape · right rail */
.tape {
  position: fixed; right: 16px; top: 96px; width: min(260px, 34vw); max-height: 62vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(6px); padding: 8px 10px;
}
.tape h2 { font-family: var(--font-display); font-size: 18px; margin: 0 0 6px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-dim); border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.tape .row { display: grid; grid-template-columns: 16px 1fr auto; gap: 6px; align-items: center;
  padding: 4px 0; border-bottom: 1px solid rgba(89,168,255,0.08); font-size: 13px; }
.tape .row.out { opacity: 0.4; }
.tape .row.out .nm { text-decoration: line-through; }
.tape .dot { width: 11px; height: 11px; border-radius: 50%; }
.tape .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tape .nm small { color: var(--ink-dim); font-weight: 400; font-family: var(--font-wire); font-size: 10px; }
.tape .hp { width: 46px; height: 6px; background: rgba(255,255,255,0.12); position: relative; }
.tape .hp i { position: absolute; inset: 0 auto 0 0; background: var(--blue); }
.tape .hp.hurt i { background: var(--red); }
.tape .ko { color: var(--red); font-family: var(--font-wire); font-size: 10px; }

/* chyron slams · center */
#chyron { position: fixed; left: 0; right: 0; top: 42%; display: flex; justify-content: center;
  pointer-events: none; padding: 0 16px; }
#chyron .slam { display: none; text-align: center; }
#chyron.on .slam { display: block; animation: slam 0.4s cubic-bezier(0.16,1,0.3,1); }
#chyron .kick { font-family: var(--font-wire); font-size: 13px; letter-spacing: 0.35em;
  color: var(--blue); text-transform: uppercase; }
#chyron .big { font-family: var(--font-display); font-size: clamp(34px, 6vw, 76px); line-height: 0.9;
  text-transform: uppercase; font-weight: 700; text-shadow: 0 4px 24px rgba(0,0,0,0.9); }
#chyron .big.red { color: var(--red); }
@keyframes slam { 0% { transform: scale(1.6); opacity: 0; } 60% { transform: scale(0.97); opacity: 1; } 100% { transform: scale(1); } }

/* connect corner */
.connect {
  position: fixed; right: 16px; bottom: 16px; width: min(330px, 42vw);
  background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(6px); padding: 9px 11px;
  font-size: 12px;
}
.connect h2 { font-family: var(--font-display); font-size: 17px; margin: 0 0 4px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-dim); }
.connect pre { margin: 4px 0 0; font-family: var(--font-wire); font-size: 10.5px; color: var(--blue);
  background: rgba(0,0,0,0.4); padding: 6px 7px; overflow-x: auto; white-space: pre-wrap; word-break: break-all;
  border-left: 2px solid var(--blue-deep); }
.connect .more { margin-top: 6px; font-family: var(--font-wire); font-size: 11px; color: var(--ink-dim); }

/* form guide (win prob) tucked under the tape */
.form { margin-top: 8px; }
.form .fr { display: flex; align-items: center; gap: 6px; font-size: 11px; padding: 2px 0; font-family: var(--font-wire); }
.form .fr .bar { flex: 1; height: 5px; background: rgba(255,255,255,0.1); position: relative; }
.form .fr .bar i { position: absolute; inset: 0 auto 0 0; background: var(--red); }

.hint { position: fixed; left: 50%; transform: translateX(-50%); bottom: 4px; font-family: var(--font-wire);
  font-size: 10px; color: var(--ink-dim); letter-spacing: 0.08em; pointer-events: none; opacity: 0.6; }

#signal { position: fixed; top: 50px; left: 50%; transform: translateX(-50%); display: none;
  background: var(--red-dim); color: #fff; font-family: var(--font-wire); font-size: 11px;
  padding: 3px 12px; letter-spacing: 0.1em; text-transform: uppercase; z-index: 5; }
#signal.on { display: block; }

@media (max-width: 640px) {
  .masthead { padding: 6px 10px; gap: 8px; align-items: flex-start; }
  .masthead .brand { font-size: 30px; }
  .masthead .tagline { display: none; }
  .masthead .live { display: none; }
  .masthead nav { font-size: 15px; gap: 10px; }
  .boutbar { top: 44px; left: 10px; right: 10px; flex-direction: column; gap: 2px; }
  .boutbar h1 { font-size: 18px; text-shadow: 0 1px 6px #000, 0 0 14px #000; }
  .boutbar .clock { font-size: 11px; }
  .wire { display: none; }
  .connect { display: none; }
  .hint { display: none; }
  .tape { top: auto; bottom: 8px; right: 8px; left: 8px; width: auto; max-height: 32vh; }
  #chyron { top: 34%; }
  #chyron .big { font-size: clamp(28px, 9vw, 44px); }
}
@media (prefers-reduced-motion: reduce) {
  #chyron.on .slam { animation: none; }
  .live::before { animation: none; }
}
