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

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  min-height: 100%;
  background:
    radial-gradient(circle at 18% 12%, rgba(82, 118, 164, 0.24), transparent 24rem),
    linear-gradient(180deg, #080b13 0%, #131722 58%, #283227 100%);
}

.game-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.hud {
  position: absolute;
  top: 16px;
  left: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(92px, 1fr));
  gap: 8px;
  width: min(584px, calc(100vw - 32px));
  pointer-events: none;
}

.hud div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(4, 8, 14, 0.58);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
}

.hud span,
.hud strong {
  display: block;
  white-space: nowrap;
}

.hud span {
  color: rgba(244, 247, 251, 0.66);
  font-size: 11px;
  line-height: 1.1;
}

.hud strong {
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 720;
}

.restart {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  width: 132px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: #f4f7fb;
  color: #10131a;
  font: inherit;
  font-weight: 760;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.36);
  cursor: pointer;
}

.restart:hover {
  background: #dce8f5;
}

.target-scoreboard {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: min(560px, max(220px, calc(100vw - 632px)));
  pointer-events: none;
}

.target-scoreboard span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(4, 8, 14, 0.58);
  color: rgba(244, 247, 251, 0.78);
  font-size: 12px;
  line-height: 1;
  font-weight: 720;
  backdrop-filter: blur(10px);
}

.target-scoreboard span.destroyed {
  color: rgba(244, 247, 251, 0.38);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(97, 222, 255, 0.86);
}

.controls {
  position: absolute;
  left: 16px;
  bottom: 16px;
  width: min(260px, calc(100vw - 32px));
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(4, 8, 14, 0.58);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
  pointer-events: none;
}

.controls dl {
  display: grid;
  gap: 5px;
  margin: 0;
}

.controls div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  align-items: baseline;
}

.controls dt,
.controls dd {
  margin: 0;
  font-size: 12px;
  line-height: 1.2;
}

.controls dt {
  color: #f4f7fb;
  font-weight: 760;
}

.controls dd {
  color: rgba(244, 247, 251, 0.72);
  font-weight: 620;
}

@media (max-width: 520px) {
  .hud {
    grid-template-columns: 1fr;
    width: 150px;
  }

  .hud div {
    padding: 8px 10px;
  }

  .hud strong {
    font-size: 16px;
  }

  .target-scoreboard {
    max-width: calc(100vw - 190px);
    gap: 4px;
  }

  .target-scoreboard span {
    min-height: 24px;
    padding: 4px 6px;
    font-size: 10px;
  }

  .controls {
    bottom: 12px;
    left: 12px;
    width: min(226px, calc(100vw - 24px));
    padding: 8px 10px;
  }

  .controls div {
    grid-template-columns: 78px 1fr;
    gap: 8px;
  }

  .controls dt,
  .controls dd {
    font-size: 11px;
  }
}
