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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #12101d;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #fff;
}

canvas { display: block; }

/* --- Heads-up display (score + hints) --- */
#hud {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 6;
  pointer-events: none;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

#stars {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1px;
}

#message {
  margin-top: 6px;
  font-size: 15px;
  opacity: 0.85;
}

/* --- Start / win / lose overlay --- */
#overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 20, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

#overlay.hidden { display: none; }

#overlay-inner {
  text-align: center;
  padding: 32px 48px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.45);
  max-width: 90vw;
}

#overlay-inner h1 {
  font-size: 46px;
  margin-bottom: 12px;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #ff5252, #ffb142, #ffe66d, #4cd137, #48dbfb, #a55eea);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

#overlay-inner h1 span { margin-left: 8px; }

#overlay-inner p {
  font-size: 18px;
  margin-bottom: 8px;
}

#overlay-inner .hint {
  margin-top: 14px;
  font-size: 14px;
  opacity: 0.8;
}

#crosshair {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 22px;
  color: rgba(255, 255, 255, 0.7);
  pointer-events: none;
  z-index: 5;
}
