* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 30%, #2c5e33 0%, #17401f 60%, #0c2a14 100%);
  font-family: "Segoe UI", system-ui, sans-serif;
  overflow: hidden;
}

.game-wrap {
  position: relative;
  padding: 14px;
  width: min(96vw, 960px);
}

.hud {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(0, 0, 0, 0.45);
  color: #ffe08a;
  padding: 10px 18px;
  border-radius: 12px 12px 0 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.4px;
  flex-wrap: wrap;
}

.hud .stat {
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.hud .stat-score { color: #fff; }
.hud .stat-combo { color: #7dd3fc; }
.hud .stat-ammo { color: #ffe66d; }
.hud .stat-high { margin-left: auto; color: #ff9e6d; }

#combo { display: inline-block; min-width: 26px; }

#time.low {
  color: #ff5c5c;
  animation: pulse 0.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.mute-btn {
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  color: #ffe08a;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.mute-btn:hover { background: rgba(255, 255, 255, 0.22); }
.mute-btn.off { color: #aaa; opacity: 0.7; }

canvas {
  display: block;
  width: 100%;
  height: auto;
  background: linear-gradient(to bottom, #7ec8ff 0%, #aee3ff 45%, #8edb6a 46%, #62b347 100%);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  cursor: crosshair;
  touch-action: none;
}

.overlay {
  position: absolute;
  inset: 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 30, 12, 0.72);
  backdrop-filter: blur(4px);
  transition: opacity 0.25s ease;
}

.overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.panel {
  text-align: center;
  background: #fff8e7;
  padding: 30px 38px;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  max-width: 480px;
}

.panel h1 {
  font-size: 34px;
  color: #8a4b08;
  margin-bottom: 12px;
}

.panel p {
  color: #4a4a4a;
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 20px;
}

#startBtn {
  font-size: 20px;
  font-weight: 700;
  padding: 12px 44px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffd94d, #f5a623);
  color: #5a3800;
  cursor: pointer;
  box-shadow: 0 6px 0 #c77f00, 0 10px 18px rgba(0, 0, 0, 0.3);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

#startBtn:hover { filter: brightness(1.05); }

#startBtn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #c77f00;
}
