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

html, body {
  width: 100%; height: 100%;
  background: #1a1a2e;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  overflow: hidden;
}

#game-wrapper {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #87CEEB;
}

/* --- HUD --- */
#hud {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  padding: 12px 24px;
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0,0,0,.6);
  pointer-events: none;
}
#hud.hidden { display: none; }
#hud-left, #hud-right { display: flex; gap: 24px; align-items: center; }

/* --- Overlays --- */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  backdrop-filter: blur(4px);
}
.overlay.hidden { display: none; }

.overlay-content {
  text-align: center;
  color: #fff;
  max-width: 560px;
  padding: 36px;
}
.overlay-content h1 {
  font-size: 48px;
  margin-bottom: 14px;
  text-shadow: 0 0 24px rgba(255,100,100,.6);
}
.overlay-content p {
  font-size: 18px;
  margin-bottom: 18px;
  line-height: 1.6;
}
.controls-hint {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.controls-hint span {
  background: rgba(255,255,255,.12);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 16px;
}

button {
  background: linear-gradient(135deg, #ff4757, #ff6b81);
  color: #fff;
  border: none;
  padding: 16px 48px;
  font-size: 22px;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 20px rgba(255,75,87,.4);
}
button:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(255,75,87,.65);
}
.win h1 { color: #ffe66d; }
.score-text { font-size: 26px; color: #ffe66d; }
