/* M3: Wormhole Runner — game-specific styles */

html, body { overflow: hidden; }

#app {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 50%, #1a0f3a 0%, #0a0820 35%, var(--bg-deep) 80%);
  overflow: hidden;
}

#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* ============== HUD (same shape as M2) ============== */
.hud {
  position: absolute;
  top: max(env(safe-area-inset-top), 14px);
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 5;
}
.hud-score {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-shadow: 0 0 14px rgba(0, 0, 0, 0.85), 0 0 28px rgba(0, 0, 0, 0.6);
  background: rgba(3, 2, 10, 0.32);
  padding: 4px 14px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hud-combo {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--phosphor);
  letter-spacing: 0.04em;
  text-shadow: 0 0 14px rgba(182, 255, 46, 0.6);
  animation: comboPulse 0.6s ease-out;
}
.hud-combo.hidden { display: none; }
@keyframes comboPulse {
  0% { transform: translateX(-50%) scale(1.4); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}
.hud-shields { position: absolute; top: 8px; right: 16px; display: flex; gap: 6px; }
.shield-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--phosphor);
  box-shadow: 0 0 10px rgba(182, 255, 46, 0.65);
  transition: opacity 0.2s ease, background 0.2s ease, transform 0.3s ease;
}
.shield-dot.broken {
  background: rgba(244, 241, 234, 0.18);
  box-shadow: none;
  transform: scale(0.7);
}

/* ============== Screens ============== */
.screen {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background: rgba(3, 2, 10, 0.74);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn 0.35s ease both;
}
.hidden { display: none !important; }
.screen-inner { text-align: center; max-width: 360px; width: 100%; position: relative; }
.back-home {
  position: absolute;
  top: -20px;
  left: 0;
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(244, 241, 234, 0.02);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.back-home:active { color: var(--phosphor); border-color: var(--phosphor); }
.game-num {
  font-family: var(--font-mono);
  font-size: 38px;
  font-weight: 700;
  color: var(--phosphor);
  letter-spacing: -0.02em;
  margin-top: 20px;
  margin-bottom: 12px;
  text-shadow: 0 0 18px rgba(182, 255, 46, 0.4);
}
.title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 0 18px;
  color: var(--ink);
  text-shadow: 0 0 18px rgba(182, 255, 46, 0.3);
  line-height: 1.05;
}
.subtitle {
  font-size: 15px;
  color: var(--ink-dim);
  margin: 0 0 36px;
  letter-spacing: 0.01em;
  line-height: 1.6;
}
.over-label { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.32em; color: var(--danger); margin: 0 0 28px; }
.cta-register { padding: 14px 16px; text-align: center; }
.cta-register .cta-line-1 { display: block; font-size: 17px; font-weight: 700; letter-spacing: 0.01em; margin-bottom: 4px; }
.cta-register .cta-line-2 { display: block; font-size: 12px; font-weight: 500; letter-spacing: 0.02em; opacity: 0.78; }
.score-row { display: flex; gap: 16px; justify-content: center; margin-bottom: 32px; }
.score-block { flex: 1; padding: 16px 12px; border: 1px solid var(--hairline); border-radius: 4px; background: rgba(244, 241, 234, 0.02); }
.score-block-label { font-family: var(--font-display); font-size: 11px; letter-spacing: 0.04em; color: var(--ink-dim); margin: 0 0 8px; font-weight: 500; }
.score-block-value { font-family: var(--font-mono); font-size: 32px; font-weight: 600; margin: 0; color: var(--ink); }
.score-block:first-child .score-block-value { color: var(--phosphor); }
