:root {
  --bg: #0a0a0f;
  --card: #171722;
  --text: #f0f0f5;
  --muted: #a0a0b8;
  --border: #2a2a3e;
  --cta: linear-gradient(135deg, #ff4d4d, #ff8c42);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.battle-shell {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 20px;
}

.battle-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.brand {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
}

.mode-tag {
  font-size: 12px;
  color: #ff8c42;
  border: 1px solid rgba(255, 140, 66, 0.4);
  border-radius: 999px;
  padding: 6px 10px;
}

.status-panel,
.hud,
.result {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
}

.status-panel h1 {
  margin: 0 0 8px;
  font-size: clamp(1.3rem, 3vw, 2rem);
}

.status-panel p { margin: 0; color: var(--muted); }

.actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  text-decoration: none;
  background: var(--cta);
  color: #fff;
  cursor: pointer;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
}

.hud {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hud-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.hud-card strong {
  font-size: 28px;
}

.arena {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
}

video, canvas {
  width: 100%;
  display: block;
  transform: scaleX(-1);
}

canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.countdown {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 72px;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.35);
}

.result h2 {
  margin: 0 0 8px;
}

.result p {
  margin: 0 0 12px;
  color: var(--muted);
}
