:root {
  color-scheme: dark;
  font:
    14px system-ui,
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #090e18;
  color: #f6f7fc;
  overflow: hidden;
}
#game {
  display: block;
  width: 100vw;
  height: 100vh;
}
#panel {
  z-index: 6;
  position: absolute;
  top: 18px;
  left: 18px;
  max-width: min(480px, calc(100vw - 36px));
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding: 16px;
  background: #111827ed;
  border: 1px solid #394255;
  border-radius: 12px;
  box-shadow: 0 10px 30px #0006;
}
h1 {
  font-size: 23px;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
}
small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #b2bacc;
}
label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0;
}
input {
  border: 1px solid #53627a;
  border-radius: 5px;
  background: #070e1c;
  color: #fff;
  padding: 8px;
  width: 210px;
}
.actions {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}
#host-bots input {
  width: auto;
}
button {
  cursor: pointer;
  border: 0;
  border-radius: 5px;
  background: #4d8dff;
  color: #fff;
  padding: 9px 12px;
  font-weight: 600;
}
button:hover {
  background: #72a4ff;
}
#status {
  color: #b4c5e3;
  min-height: 1.4em;
  margin: 8px 0;
}
#help {
  font-size: 12px;
  color: #9ca9bc;
  line-height: 1.5;
}
#room {
  font-size: 14px;
  background: #1f3448;
  padding: 8px;
  border-radius: 4px;
}
#crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  font-weight: 200;
  color: #fff8;
  pointer-events: none;
}
#hud {
  z-index: 7;
  position: absolute;
  bottom: 18px;
  left: 18px;
  right: 18px;
  display: flex;
  gap: 16px;
  pointer-events: none;
  color: #dbe5ff;
  text-shadow: 0 1px 3px #000;
}

#ball-actions {
  border-top: 1px solid #394255;
  margin-top: 10px;
  padding-top: 8px;
}
#ball-state {
  font-weight: 600;
  color: #ffda7d;
}
.audio-controls {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 12px;
  color: #cad9e5;
}
.audio-controls label {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 3px 0;
}
.audio-controls input[type='range'] {
  width: 110px;
  accent-color: #74f3de;
}
.audio-controls input[type='checkbox'] {
  width: 17px;
  height: 17px;
  accent-color: #74f3de;
}
#objective-callout {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff2c0;
  font-size: clamp(19px, 3.5vw, 35px);
  font-weight: 900;
  letter-spacing: 0.15em;
  text-shadow:
    0 2px 13px #091827,
    0 0 30px #daa04d;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms;
}
#objective-callout.active {
  opacity: 1;
}

#match-scoreboard {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin: 12px 0 7px;
  padding: 9px 2px;
  background: #0c1423;
  border: 1px solid #45536e;
  border-radius: 6px;
  gap: 8px;
}
.team-score {
  font-size: 18px;
  font-weight: 700;
}
.team-score strong {
  font-size: 26px;
  padding-left: 6px;
}
#team-a {
  color: #4da8ff;
}
#team-b {
  color: #f36b69;
}
.match-center {
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.match-center strong {
  font-size: 26px;
  display: block;
}
.match-center small {
  color: #b5c8df;
  font-size: 12px;
  display: block;
}
#match-phase {
  text-align: center;
  color: #ffe5a0;
  font-weight: 700;
  letter-spacing: 0.04em;
}
#match-info {
  color: #d7e4f9;
  font-size: 12px;
  margin: 7px 0;
}
#break-clock {
  color: #ffb46d;
  margin-left: 6px;
}

#map-layout {
  border-top: 1px solid #43516b;
  margin-top: 10px;
  padding-top: 9px;
  font-size: 12px;
  color: #bcd6ec;
}
#map-layout strong {
  display: block;
  letter-spacing: 0.05em;
  color: #dbe9f8;
  margin-bottom: 5px;
}
#map-layout span {
  display: inline-block;
  margin-right: 10px;
}
#map-layout em {
  font-style: normal;
  color: #f1cc9e;
  font-size: 11px;
}

#hud {
  flex-wrap: wrap;
  align-items: center;
  row-gap: 6px;
}
#hud meter {
  height: 12px;
  width: 100px;
  vertical-align: middle;
  accent-color: #6cdfdb;
}
#traversal-mode {
  font-weight: 700;
  color: #ffe8aa;
}
.energy-label {
  font-variant-numeric: tabular-nums;
}
.thrust-bar {
  position: relative;
  display: inline-block;
}
.thrust-bar::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 2px;
  bottom: 2px;
  width: 2px;
  background: #15212d;
  pointer-events: none;
}

#combat-health {
  color: #fcbaaa;
  font-weight: 700;
}
#combat-ammo {
  color: #e4f2ae;
  font-weight: 700;
}
#combat-respawn {
  color: #ff7676;
  font-weight: 700;
}

/* R012 original CSS-only overlays; no external graphics or media. */
button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  background: #475268;
}
#hud .combat-resource {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
#health-meter {
  width: 85px;
  height: 9px;
  accent-color: #ff8b7b;
}
#scope-overlay {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: radial-gradient(circle, transparent 0 28vmin, #050b14ee 30vmin);
}
#scope-overlay span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #c8e6e1;
  font: 42px monospace;
  text-shadow: 0 0 2px #000;
}
body.scoped #crosshair {
  opacity: 0;
}
body.scoped #help,
body.scoped #map-layout {
  display: none;
}
#death-overlay {
  z-index: 9;
}
#hitmarker,
#kill-confirm,
#respawn-banner,
#objective-callout {
  z-index: 8;
}
#shield-meter {
  width: 85px;
  height: 9px;
  accent-color: #70d7ff;
}
#shield-meter::-webkit-progress-value {
  background: #70d7ff;
}
#health-meter::-webkit-progress-value {
  background: #ff8b7b;
}
#reload-meter {
  width: 82px;
  height: 9px;
  accent-color: #7be7d6;
}
#combat-stance {
  color: #f5dda0;
  font-weight: 700;
}
#combat-event-text {
  color: #b5f1df;
  min-width: 70px;
}
#kill-feed {
  position: absolute;
  right: 18px;
  top: 20px;
  color: #f1e2c4;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-shadow: 0 2px 8px #000;
}
#damage-vignette {
  pointer-events: none;
  position: fixed;
  inset: 0;
  box-shadow: inset 0 0 130px 45px #d2253dbb;
  opacity: 0;
  transition: opacity 190ms ease;
}
#damage-vignette.active {
  opacity: 1;
}
#hitmarker {
  pointer-events: none;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  opacity: 0;
  transition: opacity 90ms linear;
}
#hitmarker.active {
  opacity: 1;
}
#hitmarker i {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 4px;
  height: 12px;
  background: #fdf5b0;
  border-radius: 1px;
  transform-origin: 50% 2px;
  box-shadow: 0 0 7px #ff9;
}
#hitmarker i:nth-child(1) {
  transform: rotate(45deg) translateY(-15px);
}
#hitmarker i:nth-child(2) {
  transform: rotate(135deg) translateY(-15px);
}
#hitmarker i:nth-child(3) {
  transform: rotate(225deg) translateY(-15px);
}
#hitmarker i:nth-child(4) {
  transform: rotate(315deg) translateY(-15px);
}
#kill-confirm,
#respawn-banner {
  position: absolute;
  top: 57%;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 900;
  letter-spacing: 0.15em;
  pointer-events: none;
  text-shadow: 0 2px 14px #000;
  opacity: 0;
  transition: opacity 130ms;
}
#kill-confirm {
  color: #ffdd82;
}
#respawn-banner {
  color: #82efcd;
}
#kill-confirm.active,
#respawn-banner.active {
  opacity: 1;
}
#death-overlay {
  position: absolute;
  inset: 0;
  background: #100a15b5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  pointer-events: none;
  text-shadow: 0 2px 12px #000;
  z-index: 3;
  gap: 10px;
}
#death-overlay[hidden] {
  display: none;
}
#death-overlay strong {
  color: #ffd0cb;
  font-size: clamp(29px, 5vw, 57px);
  letter-spacing: 0.12em;
}
#death-overlay span {
  font-size: 14px;
  color: #fce8d8;
}
@media (prefers-reduced-motion: reduce) {
  #damage-vignette,
  #hitmarker,
  #kill-confirm,
  #respawn-banner {
    transition: none;
  }
}
