:root {
  --bg-top: #121a2b;
  --bg-bottom: #060910;
  --text: #edf4ff;
  --muted: #9db0d0;
  --accent: #7ef0b5;
  --line: rgba(171, 197, 255, 0.18);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Noto Sans KR", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(82, 112, 204, 0.18), transparent 28%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

#game-canvas {
  display: block;
  width: 100vw;
  height: 100vh;
}

.hud,
.result-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(2, 5, 11, 0.76);
  backdrop-filter: blur(14px);
}

.hud.hidden,
.result-overlay.hidden {
  display: none;
}

.hud-card,
.result-card {
  width: min(620px, calc(100vw - 32px));
  padding: 30px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: rgba(10, 14, 24, 0.96);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.42);
}

.hud-eyebrow,
.result-label {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hud-card h1,
.result-card h2 {
  margin: 12px 0 0;
  font-family: "Black Ops One", system-ui;
  line-height: 1;
}

.hud-card h1 {
  font-size: clamp(2.7rem, 9vw, 4.8rem);
}

.result-card h2 {
  font-size: clamp(2rem, 7vw, 3.4rem);
}

.hud-copy,
.result-text {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.settings-grid-result {
  margin-top: 20px;
}

.setting-field {
  display: grid;
  gap: 8px;
}

.setting-field span {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.setting-field select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font: inherit;
}

.setting-field option {
  color: #0d1422;
}

.start-button {
  margin-top: 24px;
  padding: 14px 18px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent) 0%, #65b9ff 100%);
  color: #07111d;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.hud-top {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  pointer-events: none;
}

.badge {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 12, 21, 0.72);
  color: var(--muted);
  font-size: 0.92rem;
  backdrop-filter: blur(8px);
}

.badge.warning {
  border-color: rgba(255, 138, 138, 0.6);
  background: rgba(72, 14, 22, 0.82);
  color: #ffd3d7;
  animation: pulse-warning 0.85s infinite alternate;
}

@keyframes pulse-warning {
  from {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(255, 88, 110, 0);
  }

  to {
    transform: scale(1.04);
    box-shadow: 0 0 18px rgba(255, 88, 110, 0.28);
  }
}

.crosshair {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 9;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.crosshair::before,
.crosshair::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.crosshair::before {
  left: 9px;
  top: 1px;
  width: 2px;
  height: 18px;
}

.crosshair::after {
  left: 1px;
  top: 9px;
  width: 18px;
  height: 2px;
}

.underwater-overlay {
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at center, rgba(180, 225, 255, 0.1), transparent 45%),
    linear-gradient(180deg, rgba(20, 88, 132, 0.08), rgba(4, 24, 44, 0.34));
  backdrop-filter: blur(0px) saturate(1);
  transition:
    opacity 0.18s ease,
    backdrop-filter 0.18s ease,
    background 0.18s ease;
}

@media (max-width: 720px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
}
