* {
  box-sizing: border-box;
}

:root {
  --husky-purple: #4b2e83;
  --husky-gold: #e8e3d3;
  --husky-purple-dark: #2e1a52;
  --duck-green: #154733;
  --duck-yellow: #fee123;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: radial-gradient(circle at top, #3a2360, #1a0f2e 70%);
  color: var(--husky-gold);
  font-family: "Trebuchet MS", "Segoe UI", Verdana, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
}

#game-wrap {
  position: relative;
  width: 960px;
  max-width: 100vw;
}

#hud {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 10px;
  background: var(--husky-purple-dark);
  border: 3px solid var(--duck-yellow);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  padding: 10px;
  box-shadow: 0 0 20px rgba(232, 227, 211, 0.15);
}

.hud-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  min-width: 90px;
  background: #0b0614;
  border: 2px solid var(--duck-yellow);
  border-radius: 4px;
  padding: 6px 8px;
}

.hud-label {
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 2px;
  color: var(--duck-yellow);
  opacity: 0.9;
}

.hud-value {
  font-family: "Courier New", monospace;
  font-size: 22px;
  font-weight: bold;
  color: var(--husky-gold);
  text-shadow: 0 0 6px rgba(232, 227, 211, 0.4);
}

#ammo-icons {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.shell {
  width: 10px;
  height: 18px;
  background: var(--duck-yellow);
  border-radius: 2px 2px 4px 4px;
  border: 1px solid #a88f00;
}

.shell.spent {
  background: #5a5040;
  border-color: #3a3428;
}

#game-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 960 / 600;
  background: #87ceeb;
  border: 3px solid var(--duck-yellow);
  border-radius: 0 0 10px 10px;
  cursor: none;
}

#overlay {
  position: absolute;
  inset: 0;
  top: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 5, 20, 0.72);
  border-radius: 0 0 10px 10px;
}

#overlay.hidden {
  display: none;
}

#overlay-panel {
  text-align: center;
  max-width: 520px;
  padding: 30px 36px;
  background: linear-gradient(180deg, var(--husky-purple), var(--husky-purple-dark));
  border: 3px solid var(--duck-yellow);
  border-radius: 14px;
  box-shadow: 0 0 40px rgba(0,0,0,0.5);
}

#overlay-title {
  margin: 0;
  font-size: 42px;
  letter-spacing: 3px;
  color: var(--duck-yellow);
  text-shadow: 2px 2px 0 var(--duck-green);
}

#overlay-subtitle {
  margin: 4px 0 16px;
  font-size: 16px;
  color: var(--husky-gold);
  font-weight: normal;
  letter-spacing: 1px;
}

#overlay-text {
  font-size: 14px;
  line-height: 1.5;
  color: #e8e3d3;
  opacity: 0.9;
}

#overlay-button {
  margin-top: 10px;
  padding: 12px 32px;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 1px;
  color: var(--husky-purple-dark);
  background: var(--duck-yellow);
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

#overlay-button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(254, 225, 35, 0.6);
}

.overlay-hint {
  margin-top: 14px;
  font-size: 12px;
  opacity: 0.6;
}

#music-toggle-button {
  display: block;
  margin: 12px auto 0;
  padding: 6px 18px;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--husky-gold);
  background: transparent;
  border: 1px solid rgba(232, 227, 211, 0.5);
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
  opacity: 0.85;
}

#music-toggle-button:hover {
  background: rgba(232, 227, 211, 0.12);
  opacity: 1;
}
