:root {
  --bg: #0d1321;
  --panel: #1d2d44;
  --accent: #ffcc00;
  --danger: #ff5a5f;
  --safe: #2ec4b6;
  --text: #f5f7fa;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  background: radial-gradient(circle at top, #1b2a41, #0d1321 60%);
  color: var(--text);
}

.game-shell {
  max-width: 1020px;
  margin: 20px auto;
  padding: 12px;
}

.hud {
  background: rgba(13, 19, 33, 0.85);
  border: 2px solid #2c3e57;
  border-radius: 14px;
  display: grid;
  grid-template-columns: repeat(6, minmax(80px, 1fr));
  gap: 8px;
  padding: 10px;
  margin-bottom: 10px;
}

.stat {
  background: rgba(29, 45, 68, 0.9);
  border-radius: 10px;
  padding: 8px;
  text-align: center;
}

.label {
  display: block;
  font-size: 0.75rem;
  color: #9fc1e5;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#game {
  width: 100%;
  max-width: 960px;
  height: auto;
  display: block;
  border: 3px solid #2c3e57;
  border-radius: 14px;
  background: #101b2d;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.35);
}

.controls {
  margin-top: 10px;
  background: rgba(13, 19, 33, 0.85);
  border: 2px solid #2c3e57;
  border-radius: 14px;
  padding: 10px 14px;
  line-height: 1.35;
}

.controls p {
  margin: 6px 0;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.panel {
  width: min(90vw, 520px);
  text-align: center;
  background: linear-gradient(160deg, #1d2d44, #243b5a);
  border: 2px solid #3a5c82;
  border-radius: 16px;
  padding: 24px;
}

.panel h1 {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--accent);
}

button {
  margin-top: 8px;
  padding: 12px 20px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffcc00, #ff9f1c);
  color: #1f1f1f;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.hint {
  margin-top: 12px;
  color: #d8e4f2;
  font-size: 0.9rem;
}

.pause-badge {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: rgba(255, 204, 0, 0.95);
  color: #1a1a1a;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
}

.hidden {
  display: none;
}
