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

html, body {
  height: 100%;
  overflow: hidden;
  background: #05010f;
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #fff;
}

#game {
  position: fixed;
  inset: 0;
  display: block;
  cursor: crosshair;
}

/* HUD */
.hud {
  position: fixed;
  top: 24px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  z-index: 10;
}

.hud-item {
  background: rgba(10, 5, 25, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 18px;
  border-radius: 12px;
  letter-spacing: 2px;
}

.hud-label {
  font-size: 10px;
  opacity: 0.6;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 2px;
}

.hud-value {
  font-size: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 20px currentColor;
}

#score { color: #00f0ff; }
#combo { color: #ff2e97; }
#best  { color: #ffd500; }

.combo-active {
  animation: pulse 0.3s ease;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* Screens */
.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: radial-gradient(ellipse at center, rgba(20, 5, 45, 0.85) 0%, rgba(5, 1, 15, 0.98) 70%);
  z-index: 100;
  text-align: center;
  padding: 20px;
  transition: opacity 0.3s ease;
}

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

.title {
  font-size: clamp(48px, 12vw, 120px);
  font-weight: 900;
  letter-spacing: 8px;
  background: linear-gradient(90deg, #00f0ff, #ff2e97, #ffd500, #00f0ff);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 3s linear infinite;
  text-shadow: 0 0 60px rgba(255, 46, 151, 0.5);
  margin-bottom: 10px;
}

@keyframes shimmer {
  0% { background-position: 0% 0%; }
  100% { background-position: 300% 0%; }
}

.subtitle {
  font-size: 14px;
  letter-spacing: 6px;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 40px;
}

.instructions {
  max-width: 500px;
  line-height: 1.8;
  opacity: 0.85;
  margin-bottom: 40px;
  font-size: 15px;
}

.key {
  display: inline-block;
  padding: 3px 12px;
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid #00f0ff;
  border-radius: 6px;
  color: #00f0ff;
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 13px;
}

.btn {
  background: transparent;
  border: 2px solid #00f0ff;
  color: #00f0ff;
  padding: 16px 48px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 4px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  background: #00f0ff;
  color: #05010f;
  box-shadow: 0 0 40px #00f0ff, 0 0 80px rgba(0, 240, 255, 0.4);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.final-score {
  font-size: 72px;
  font-weight: 900;
  color: #00f0ff;
  text-shadow: 0 0 40px #00f0ff;
  font-variant-numeric: tabular-nums;
  margin: 10px 0;
}

.final-label {
  font-size: 12px;
  letter-spacing: 6px;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 30px;
}

.new-best {
  color: #ffd500;
  text-shadow: 0 0 30px #ffd500;
  letter-spacing: 4px;
  font-weight: 800;
  margin-bottom: 20px;
  animation: pulse 0.6s ease infinite alternate;
}

/* Mobile hint */
.mobile-hint {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.4;
  z-index: 10;
  pointer-events: none;
}