:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #07090c;
  color: #f7fbff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow: hidden;
  background: #07090c;
}

button {
  font: inherit;
}

#game-shell,
#game {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

#game {
  display: block;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(5, 7, 10, 0.92), rgba(5, 7, 10, 0.22)),
    radial-gradient(circle at 75% 30%, rgba(0, 196, 255, 0.28), transparent 30%),
    rgba(5, 7, 10, 0.7);
}

.overlay.hidden {
  display: none;
}

.panel {
  width: min(520px, 100%);
  margin-right: auto;
}

.kicker {
  margin: 0 0 10px;
  color: #64e9ff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(48px, 9vw, 104px);
  line-height: 0.92;
  letter-spacing: 0;
}

.copy {
  max-width: 48ch;
  margin: 20px 0 26px;
  color: #d8e6ef;
  font-size: 17px;
  line-height: 1.55;
}

#start-button {
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  color: #061016;
  background: #6af0ff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.35);
}

#start-button:hover {
  background: #fff36a;
}

.controls-grid {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 8px 14px;
  max-width: 420px;
  margin-top: 28px;
  color: #c5d2dc;
  font-size: 14px;
}

.controls-grid span {
  display: grid;
  min-height: 30px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
}

.controls-grid p {
  align-self: center;
  margin: 0;
}

#hud {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 4;
  opacity: 0;
  transition: opacity 160ms ease;
}

#hud.visible {
  opacity: 1;
}

.hud-row {
  position: fixed;
  display: flex;
  gap: 10px;
  padding: 14px;
}

.hud-row.top {
  top: 0;
  left: 0;
}

.hud-row.bottom {
  right: 0;
  bottom: 0;
}

.hud-row > div {
  min-width: 104px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(5, 9, 12, 0.58);
  backdrop-filter: blur(12px);
}

.controller-readout {
  min-width: 142px;
}

.label {
  display: block;
  margin-bottom: 4px;
  color: #a8bdca;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

strong {
  color: #f8fbff;
  font-size: 19px;
  letter-spacing: 0;
}

#minimap {
  position: fixed;
  right: 14px;
  top: 14px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(5, 9, 12, 0.55);
  backdrop-filter: blur(12px);
}

#message {
  position: fixed;
  left: 50%;
  top: 70px;
  width: min(520px, calc(100vw - 32px));
  transform: translateX(-50%);
  color: #fff36a;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.75);
}

#crosshair {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
}

#crosshair::before,
#crosshair::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.72);
}

#crosshair::before {
  left: 10px;
  top: 0;
  width: 2px;
  height: 22px;
}

#crosshair::after {
  left: 0;
  top: 10px;
  width: 22px;
  height: 2px;
}

@media (max-width: 760px) {
  .hud-row {
    gap: 6px;
    padding: 8px;
  }

  .hud-row.top {
    right: 0;
    flex-wrap: wrap;
  }

  .hud-row.bottom {
    left: 0;
    right: auto;
  }

  .hud-row > div {
    min-width: 72px;
    padding: 8px 9px;
  }

  .controller-readout {
    min-width: 112px;
  }

  strong {
    font-size: 15px;
  }

  #minimap {
    top: auto;
    right: 8px;
    bottom: 76px;
    width: 124px;
    height: 124px;
  }

  #message {
    top: 118px;
    font-size: 18px;
  }
}
