* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #1b1d22;
  color: #f4f4f4;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#game-wrap {
  position: relative;
  width: 800px;
  height: 600px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  overflow: hidden;
}

canvas {
  display: block;
  background: #78c850;
}

#hud {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: opacity 0.2s ease;
}

.overlay.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.panel {
  background: #2a2d33;
  padding: 32px 40px;
  border-radius: 16px;
  text-align: center;
  max-width: 440px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.panel h1 {
  margin: 0 0 16px;
  font-size: 42px;
  letter-spacing: 1px;
}

.panel p {
  margin: 8px 0;
  font-size: 16px;
  line-height: 1.4;
}

.panel .keys {
  margin-top: 18px;
  opacity: 0.85;
}

.panel .prompt {
  margin-top: 20px;
  font-size: 18px;
  color: #ffd24d;
}

.bomb { filter: drop-shadow(0 0 4px #ff4d4d); }
