:root {
  color-scheme: dark;
  --bg: #090d12;
  --panel: rgba(16, 22, 29, 0.92);
  --line: rgba(137, 219, 255, 0.2);
  --text: #f4fbff;
  --muted: #a7c0ce;
  --cyan: #6bdcff;
  --acid: #b7ff5a;
  --red: #ff5e67;
  --gold: #ffd166;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 0%, rgba(107, 220, 255, 0.18), transparent 30%),
    radial-gradient(circle at 85% 10%, rgba(183, 255, 90, 0.11), transparent 28%),
    linear-gradient(180deg, #101723 0%, #080a0e 100%);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

.game-shell {
  width: min(1320px, 100vw);
  height: min(900px, 100dvh);
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  padding: 12px;
}

.topbar,
.controls {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
}

.topbar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}

.topbar div {
  min-height: 48px;
  display: grid;
  align-content: center;
  border-radius: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.045);
}

.topbar span {
  color: var(--muted);
  font-size: 12px;
}

.topbar strong {
  font-size: 26px;
  line-height: 1;
}

.stage-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #05070a;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
  border: 2px solid rgba(107, 220, 255, 0.52);
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 18px rgba(107, 220, 255, 0.28);
}

.crosshair::before,
.crosshair::after {
  content: "";
  position: absolute;
  background: rgba(107, 220, 255, 0.76);
}

.crosshair::before {
  left: 50%;
  top: -8px;
  bottom: -8px;
  width: 2px;
  transform: translateX(-50%);
}

.crosshair::after {
  top: 50%;
  left: -8px;
  right: -8px;
  height: 2px;
  transform: translateY(-50%);
}

.banner {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(5, 8, 12, 0.66);
  color: var(--text);
  font-size: clamp(34px, 8vw, 82px);
  font-weight: 900;
  text-align: center;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.85);
}

.banner.hidden { display: none; }

.controls {
  min-height: 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px;
}

.controls span {
  min-height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 760px) {
  body { overflow: auto; }
  .game-shell { height: 100dvh; padding: 8px; }
  .topbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .topbar strong { font-size: 21px; }
  .controls { max-height: 112px; overflow: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
