* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #05060a;
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #e8ecff;
}

#wrap {
  position: relative;
}

canvas {
  display: block;
  background: radial-gradient(ellipse at 50% 0%, #131226 0%, #08070f 70%);
  border: 2px solid #43213a;
  border-radius: 6px;
  box-shadow: 0 0 30px rgba(255, 60, 60, 0.2);
  cursor: pointer;
}

#hud {
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

#overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(4, 2, 6, 0.82);
  border-radius: 6px;
  text-align: center;
  padding: 20px;
}

#overlay.hidden {
  display: none;
}

#overlayTitle {
  margin: 0;
  font-size: 32px;
  letter-spacing: 2px;
  color: #ff5a5a;
  text-shadow: 0 0 14px rgba(255, 90, 90, 0.7);
}

#overlayMsg {
  margin: 0;
  max-width: 320px;
  color: #d9c3d0;
  font-size: 14px;
}

#startBtn {
  padding: 10px 28px;
  font-size: 16px;
  font-weight: 600;
  color: #05060a;
  background: #ff5a5a;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease;
}

#startBtn:hover {
  background: #ff8080;
}

#startBtn:active {
  transform: scale(0.97);
}
