*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: system-ui, -apple-system, sans-serif;
  background: #0a0a0a;
  color: #fafafa;
  overflow: hidden;
}

canvas {
  position: fixed;
  top: 0;
  left: 0;
}

#ui {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 10;
  pointer-events: none;
}

#score {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #0ff;
  text-shadow: 0 0 16px #0ff, 0 0 32px #0ff;
  letter-spacing: 0.05em;
}

#hiscore {
  font-size: 0.85rem;
  color: rgba(0, 255, 255, 0.4);
  align-self: center;
  letter-spacing: 0.1em;
  font-weight: 600;
}

#overlay {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(0, 0, 0, 0.82);
  z-index: 20;
  backdrop-filter: blur(6px);
}
#overlay.active { display: flex; }

#overlay h1 {
  font-size: clamp(2.2rem, 8vw, 4.5rem);
  letter-spacing: 0.22em;
  color: #0ff;
  text-shadow: 0 0 24px #0ff, 0 0 50px #0ff, 0 0 80px rgba(0,255,255,0.4);
  animation: pulseTitle 2s ease-in-out infinite;
}

@keyframes pulseTitle {
  0%, 100% { text-shadow: 0 0 24px #0ff, 0 0 50px #0ff; }
  50% { text-shadow: 0 0 40px #0ff, 0 0 80px #0ff, 0 0 120px rgba(0,255,255,0.5); }
}

.sub {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#startBtn {
  margin-top: 20px;
  padding: 14px 48px;
  background: transparent;
  border: 2px solid #0ff;
  color: #0ff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
  text-shadow: 0 0 10px #0ff;
  box-shadow: 0 0 20px rgba(0,255,255,0.25), inset 0 0 20px rgba(0,255,255,0.04);
  transition: all 0.2s ease;
}
#startBtn:hover, #startBtn:focus {
  background: rgba(0, 255, 255, 0.1);
  box-shadow: 0 0 40px rgba(0,255,255,0.55), inset 0 0 20px rgba(0,255,255,0.12);
  outline: none;
}
