@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

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

:root {
  --bg: #0d0221;
  --cyan: #22d3ee;
  --purple: #8b5cf6;
  --pink: #ec4899;
  --green: #10b981;
}

body {
  background: var(--bg);
  color: #e0e0ff;
  font-family: 'Inter', system-ui, sans-serif;
  overflow: hidden;
  height: 100vh;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.game-container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

canvas {
  display: block;
  background: var(--bg);
}

/* HUD */
.hud {
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
}

.hud-score {
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* Screens */
.screen-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 26, 0.92);
  z-index: 50;
  padding: 24px;
  text-align: center;
  gap: 16px;
}

.screen-overlay.hidden { display: none; }

.screen-title {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.screen-emoji { font-size: 4rem; line-height: 1; }

.screen-text {
  color: #888;
  font-size: 0.9rem;
  max-width: 300px;
}

.screen-score {
  font-size: 2rem;
  font-weight: 800;
  color: var(--green);
}

.new-best {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--pink);
  animation: pulse 0.5s ease-in-out infinite alternate;
}

@keyframes pulse {
  from { opacity: 0.6; transform: scale(1); }
  to { opacity: 1; transform: scale(1.1); }
}

.btn {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(180, 77, 255, 0.4);
}

.btn:hover { transform: scale(1.05); }
.btn:active { transform: scale(0.97); }

.btn-secondary {
  background: transparent;
  border: 1px solid #444;
  box-shadow: none;
  font-size: 0.75rem;
  padding: 10px 24px;
}

.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.back-btn {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 60;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #666;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s;
}

.back-btn:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
