/* ── Reset ───────────────────────────────────────── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #000;
  overflow: hidden;
  font-family: "Courier New", monospace;
}

canvas {
  display: block;
}

/* ── HUD — bottom bar ────────────────────────────── */
#hud {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  background: rgba(0, 0, 0, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  padding: 5px 8px;
  gap: 0;
  user-select: none;
  -webkit-overflow-scrolling: touch;
}

#hud::-webkit-scrollbar { display: none; }

.hud-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0 8px;
  flex-shrink: 0;
}

.hud-label {
  font-size: 7px;
  letter-spacing: 0.12em;
  color: #555;
  text-transform: uppercase;
}

.hud-buttons {
  display: flex;
  align-items: center;
  gap: 3px;
}

.hud-divider {
  width: 1px;
  height: 30px;
  background: rgba(255, 255, 255, 0.10);
  flex-shrink: 0;
}

/* ── Buttons ─────────────────────────────────────── */
.hud-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #aaa;
  font-family: "Courier New", monospace;
  font-size: 10px;
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
  min-width: 32px;
  min-height: 28px;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  white-space: nowrap;
}

.hud-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.30);
}

.hud-btn:active {
  background: rgba(255, 255, 255, 0.22);
}

.hud-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.hud-btn.active {
  background: rgba(124, 252, 0, 0.15);
  border-color: #7cfc00;
  color: #7cfc00;
}

/* ── Back to menu (link styled as a HUD button) ─── */
a.hud-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}

#back {
  padding-left: 6px;
  color: #ddd;
  border-color: rgba(255, 255, 255, 0.3);
}

#back:hover,
#back:focus-visible {
  color: #7cfc00;
  border-color: #7cfc00;
  outline: none;
}
