/* ADA Fight Night HUD */

:root {
  --ada: #38bdf8;
  --usd: #4ade80;
  --gold: #facc15;
  --bg-panel: rgba(8, 12, 24, 0.82);
  --stroke: rgba(120, 160, 255, 0.14);
  --text: #cbd5e1;
  --text-dim: #64748b;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; background: #04060d; }
body { font-family: var(--sans); color: var(--text); }
#arena { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }

.hud {
  position: fixed; top: 14px; left: 14px; right: 14px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  z-index: 10; pointer-events: none;
}

.corner {
  flex: 1; max-width: 380px; padding: 12px 16px;
  background: var(--bg-panel); border: 1px solid var(--stroke); border-radius: 12px;
  backdrop-filter: blur(10px);
}
.corner-usd { text-align: right; }
.fighter-name { font-family: var(--mono); font-size: 20px; font-weight: 800; letter-spacing: 0.06em; }
.corner-ada .fighter-name { color: var(--ada); text-shadow: 0 0 14px rgba(56,189,248,0.5); }
.corner-usd .fighter-name { color: var(--usd); text-shadow: 0 0 14px rgba(74,222,128,0.5); }
.rec { font-size: 12px; color: var(--text-dim); font-weight: 600; }

.hp-bar { height: 14px; margin-top: 8px; border-radius: 999px; background: rgba(148,163,184,0.12); overflow: hidden; border: 1px solid var(--stroke); }
.hp-fill { height: 100%; width: 100%; border-radius: 999px; transition: width 0.35s; }
.hp-ada { background: linear-gradient(90deg, #0ea5e9, var(--ada)); box-shadow: 0 0 14px rgba(56,189,248,0.6); }
.hp-usd { background: linear-gradient(90deg, var(--usd), #22c55e); float: right; box-shadow: 0 0 14px rgba(74,222,128,0.6); }
.hp-fill.hurt { background: linear-gradient(90deg, #f87171, #ef4444); }

.kd-dots { margin-top: 6px; font-size: 11px; letter-spacing: 0.2em; color: #f87171; min-height: 14px; }
.corner-usd .kd-dots { text-align: right; }

.center-card {
  padding: 10px 22px; text-align: center;
  background: var(--bg-panel); border: 1px solid var(--stroke); border-radius: 12px;
  backdrop-filter: blur(10px);
}
.bout-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em; color: var(--gold); font-weight: 800; }
.round-label { font-family: var(--mono); font-size: 15px; font-weight: 800; color: #e2e8f0; margin-top: 3px; }
.clock { font-family: var(--mono); font-size: 26px; font-weight: 800; color: #f1f5f9; }
.delay-badge { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--text-dim); margin-top: 2px; }

.banner {
  position: fixed; top: 34%; left: 50%; transform: translate(-50%, -50%);
  font-family: var(--mono); font-size: 54px; font-weight: 900; letter-spacing: 0.08em;
  color: var(--gold); text-shadow: 0 0 30px rgba(250,204,21,0.8), 0 4px 24px rgba(0,0,0,0.8);
  z-index: 20; text-align: center; animation: bannerPop 0.4s ease-out;
  pointer-events: none;
}
@keyframes bannerPop { from { transform: translate(-50%, -50%) scale(1.6); opacity: 0; } }

.ref-count {
  position: fixed; top: 46%; left: 50%; transform: translate(-50%, -50%);
  font-family: var(--mono); font-size: 110px; font-weight: 900;
  color: #f87171; text-shadow: 0 0 40px rgba(248,113,113,0.8);
  z-index: 20; pointer-events: none; animation: bannerPop 0.25s ease-out;
}

.fight-log {
  position: fixed; left: 14px; bottom: 14px; width: 300px; max-height: 30vh;
  padding: 12px 14px; overflow: hidden; z-index: 10;
  background: var(--bg-panel); border: 1px solid var(--stroke); border-radius: 12px;
  backdrop-filter: blur(10px);
}
.log-head { font-size: 10px; letter-spacing: 0.18em; color: var(--text-dim); font-weight: 700; margin-bottom: 8px; }
#log-list { list-style: none; display: flex; flex-direction: column; gap: 4px; font-family: var(--mono); font-size: 12px; }
#log-list li { padding: 3px 8px; border-radius: 6px; background: rgba(148,163,184,0.05); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-ada { color: var(--ada); }
.log-usd { color: var(--usd); }
.log-sys { color: var(--text-dim); }
.log-big { color: var(--gold); background: rgba(250,204,21,0.1) !important; font-weight: 700; }

.controls {
  position: fixed; right: 14px; bottom: 14px; display: flex; gap: 6px; padding: 8px; z-index: 10;
  background: var(--bg-panel); border: 1px solid var(--stroke); border-radius: 12px;
}
.controls button, .controls .btn {
  font-family: var(--sans); font-size: 13px; color: var(--text); text-decoration: none;
  background: rgba(148,163,184,0.08); border: 1px solid var(--stroke);
  border-radius: 8px; padding: 8px 12px; cursor: pointer; display: inline-block;
}
.controls button:hover, .controls .btn:hover { background: rgba(56,189,248,0.12); }

.modal-backdrop { position: fixed; inset: 0; background: rgba(3,5,12,0.65); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { width: min(480px, 92vw); max-height: 88vh; overflow-y: auto; background: rgba(10,14,28,0.96); border: 1px solid var(--stroke); border-radius: 16px; padding: 20px 22px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 16px; color: #e2e8f0; margin-bottom: 10px; }
.modal-head button { background: none; border: none; color: var(--text-dim); font-size: 14px; cursor: pointer; }
.modal-p { font-size: 13px; margin: 10px 0; color: var(--text); }
.c-ada { color: var(--ada); } .c-usd { color: var(--usd); }
.strike-table { width: 100%; border-collapse: collapse; font-size: 12px; font-family: var(--mono); }
.strike-table th, .strike-table td { text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--stroke); }
.strike-table th { color: var(--text-dim); font-size: 10px; letter-spacing: 0.14em; }
.modal-ok { width: 100%; margin-top: 14px; padding: 12px; font-size: 14px; font-weight: 700; color: var(--ada); background: rgba(56,189,248,0.08); border: 1px solid rgba(56,189,248,0.5); border-radius: 10px; cursor: pointer; }

@media (max-width: 800px) {
  .fighter-name { font-size: 15px; }
  .clock { font-size: 20px; }
  .banner { font-size: 34px; }
  .fight-log { width: 220px; }
}
