:root {
  --bg: #03050b;
  --panel: rgba(8, 13, 24, 0.84);
  --line: rgba(124, 236, 255, 0.35);
}

body {
  font-family: "VT323", monospace;
  background: radial-gradient(circle at 15% 10%, #122740 0%, #03060e 44%, #020309 100%);
}

.pixel {
  font-family: "Press Start 2P", monospace;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.crt {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 24px 40px rgba(0, 0, 0, 0.52), inset 0 0 40px rgba(56, 221, 255, 0.08);
}

.crt::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 3px);
  opacity: 0.18;
}

.fighter-pick {
  transition: background-color 0.14s ease, border-color 0.14s ease;
}

.arena-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#arena-canvas {
  z-index: 1;
}

#demo-canvas {
  z-index: 2;
}

.spectator-chip {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.24);
  border-radius: 6px;
  padding: 4px 8px;
  display: inline-block;
}

.rotate-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  background: radial-gradient(circle at 50% 30%, rgba(43, 98, 159, 0.28), rgba(3, 5, 10, 0.96));
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.rotate-overlay__card {
  border: 1px solid rgba(124, 236, 255, 0.35);
  background: rgba(8, 13, 24, 0.88);
  border-radius: 10px;
  padding: 14px;
  max-width: 420px;
  text-align: center;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(2, 5, 10, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.auth-card {
  width: min(520px, 94vw);
  border: 1px solid rgba(124, 236, 255, 0.35);
  background: rgba(8, 13, 24, 0.94);
  border-radius: 10px;
  padding: 12px;
}

@media (max-width: 1024px) and (orientation: portrait) {
  .rotate-overlay {
    display: flex;
  }
}

@keyframes hpCriticalBlink {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 rgba(255, 88, 88, 0);
  }
  50% {
    opacity: 0.45;
    box-shadow: 0 0 12px rgba(255, 88, 88, 0.85);
  }
}

.hp-bar {
  margin-top: 4px;
  height: 8px;
  width: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.hp-bar-fill {
  height: 8px;
  border-radius: 999px;
}

.hp-critical {
  animation: hpCriticalBlink 0.8s steps(2, end) infinite;
}
