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

body {
  overflow: hidden;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: 'Courier New', monospace;
}

#game {
  position: relative;
  width: 100vw;
  height: 100vh;
  max-width: 800px;
  max-height: 700px;
  overflow: hidden;
  background: #0a0a1a;
}

/* Star canvas (background) */
#starCanvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* HUD */
#hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.6);
  color: #0f0;
  font-size: 0.95rem;
  font-weight: bold;
  text-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(0, 255, 0, 0.15);
}

#hud div {
  display: flex;
  align-items: center;
  gap: 4px;
}

#highScore {
  color: #ffd43b;
  text-shadow: 0 0 8px rgba(255, 212, 59, 0.3);
}

/* Game canvas */
#gameCanvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: none;
  display: block;
}

/* Overlay */
#overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  transition: opacity 0.4s ease;
}

#overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

#overlayBox {
  background: linear-gradient(145deg, #0a0a2a, #050515);
  border: 2px solid rgba(0, 255, 0, 0.3);
  border-radius: 24px;
  padding: 36px 44px;
  text-align: center;
  color: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 255, 0, 0.05);
  max-width: 400px;
  width: 90%;
}

#overlayTitle {
  font-size: 2rem;
  margin-bottom: 6px;
  letter-spacing: 3px;
  text-shadow: 0 0 30px rgba(0, 255, 0, 0.2);
}

#overlayDesc {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

#overlayExtra {
  font-size: 1rem;
  margin: 10px 0;
  min-height: 24px;
  color: #ffd43b;
  font-weight: bold;
}

#overlayBtn {
  background: #0a0;
  color: #fff;
  border: none;
  padding: 14px 50px;
  border-radius: 14px;
  font-size: 1.3rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 12px 0;
  font-family: inherit;
  letter-spacing: 1px;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

#overlayBtn:hover {
  background: #0c0;
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 255, 0, 0.5);
}

#overlayBtn:active {
  transform: translateY(0);
}

#controlsHint {
  display: flex;
  justify-content: center;
  gap: 14px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.25);
  margin-top: 6px;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 500px) {
  #hud {
    font-size: 0.75rem;
    padding: 6px 10px;
  }

  #overlayBox {
    padding: 24px 20px;
  }

  #overlayTitle {
    font-size: 1.4rem;
  }

  #overlayBtn {
    padding: 12px 36px;
    font-size: 1.1rem;
  }
}
