/* ============ Bomb Arena — arcade style ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(1200px 700px at 50% 20%, #232b52 0%, #12162e 55%, #0a0d1d 100%);
  font-family: 'Trebuchet MS', Verdana, sans-serif;
  color: #e8ecff;
  padding: 16px;
}

#game-wrap { display: flex; flex-direction: column; gap: 12px; }

/* ---------- HUD ---------- */
#hud {
  width: 606px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 10px 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
}
#hud-title {
  font-size: 15px;
  color: #ffd32a;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
  margin-right: 4px;
  white-space: nowrap;
}
.hud-item { color: #aab3e0; white-space: nowrap; }
.hud-item b {
  color: #fff;
  font-size: 15px;
  margin-left: 4px;
  display: inline-block;
  min-width: 14px;
  text-align: left;
}
#hud-lives { font-size: 14px; }
.icon-btn {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  font-size: 16px;
  padding: 6px 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.16); }

/* ---------- Canvas ---------- */
#canvas-wrap {
  position: relative;
  width: 606px;
  height: 526px;
  border: 3px solid #323b66;
  border-radius: 14px;
  overflow: hidden;
  background: #0a0d1d;
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.5),
    0 0 34px rgba(90, 120, 255, 0.18);
}
#game { display: block; width: 600px; height: 520px; }

#footer {
  text-align: center;
  font-size: 12px;
  color: #7c86b8;
  letter-spacing: 0.5px;
}

/* ---------- Overlays ---------- */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(8, 10, 24, 0.86);
  backdrop-filter: blur(3px);
  text-align: center;
}
.hidden { display: none !important; }

.game-title {
  font-size: 58px;
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: 6px;
  color: #ffd32a;
  text-shadow: 0 5px 0 #c2410c, 0 10px 24px rgba(0, 0, 0, 0.6);
}
.subtitle { color: #aab3e0; letter-spacing: 1px; margin-top: -6px; }

.panel-title {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #fff;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.45);
}
.panel-title.green { color: #2ed573; }
.panel-title.red { color: #ff4d4d; }
.hint { color: #aab3e0; font-size: 14px; }

/* ---------- Buttons ---------- */
.arcade-btn {
  min-width: 240px;
  padding: 13px 30px;
  font: 800 17px/1 'Trebuchet MS', Verdana, sans-serif;
  letter-spacing: 2px;
  color: #181205;
  background: linear-gradient(180deg, #ffe259 0%, #ffb142 100%);
  border: none;
  border-radius: 12px;
  border-bottom: 5px solid #c96a1b;
  cursor: pointer;
  transition: transform 0.07s ease, border-bottom-width 0.07s ease, filter 0.15s;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}
.arcade-btn:hover { filter: brightness(1.08); }
.arcade-btn:active { transform: translateY(3px); border-bottom-width: 2px; }
.arcade-btn.secondary {
  background: linear-gradient(180deg, #9aa5ff, #6d7aff);
  border-bottom-color: #3c48b8;
  color: #0d1030;
}

/* ---------- Menu bomb ---------- */
.menu-bomb {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #6b7280 0%, #23262f 45%, #0b0c12 100%);
  position: relative;
  margin-bottom: 8px;
  animation: bounce 1.1s ease-in-out infinite;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}
.menu-bomb::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  width: 3px;
  height: 12px;
  background: #c8883c;
  transform: translateX(-50%);
}
.menu-bomb::after {
  content: '';
  position: absolute;
  top: -18px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #ffd32a 40%, #ff9f1a 70%, transparent 100%);
  transform: translateX(-50%);
  animation: spark 0.35s steps(2) infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes spark {
  0% { opacity: 1; }
  100% { opacity: 0.3; }
}

/* ---------- Misc ---------- */
kbd {
  background: #232a4d;
  border: 1px solid #3b4470;
  border-bottom-width: 3px;
  border-radius: 6px;
  padding: 2px 7px;
  font-family: inherit;
  font-size: 12px;
  color: #fff;
}
.final-score {
  font-size: 16px;
  letter-spacing: 2px;
  color: #aab3e0;
}
.final-score span {
  display: block;
  font-size: 44px;
  font-weight: 900;
  color: #ffd32a;
  margin-top: 6px;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.4);
}
.help-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 18px 22px;
  max-width: 430px;
  text-align: left;
  font-size: 14px;
  line-height: 1.9;
}
.help-box hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin: 10px 0;
}
.tag {
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 12px;
  color: #fff;
}
.tag.red { background: #ff4757; }
.tag.orange { background: #ffa502; color: #2b1600; }
.tag.green { background: #2ed573; color: #062812; }
