/* M1: Flappy Spaceship — game-specific styles
 * Base tokens, button styles, .hint, keyframes live in /_shared/style.css
 */

html, body { overflow: hidden; }

#app {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 30%, var(--bg-glow) 0%, var(--bg-mid) 35%, var(--bg-deep) 75%);
  overflow: hidden;
}

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

/* ============== HUD ============== */
.hud {
  position: absolute;
  top: max(env(safe-area-inset-top), 14px);
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  pointer-events: none;
  z-index: 5;
  font-family: var(--font-mono);
}

.hud-score {
  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-unit {
  font-size: 14px;
  color: var(--ink-dim);
  margin-left: 4px;
  font-weight: 400;
}

.hud-best {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--ink-dim);
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.85);
  font-family: var(--font-display);
}
.hud-best span {
  color: var(--phosphor);
  margin-left: 6px;
  font-weight: 600;
}

/* ============== 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.72);
  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); }

.brand-logo {
  width: 140px;
  height: auto;
  margin-bottom: 24px;
  margin-top: 24px;
  filter: drop-shadow(0 0 18px rgba(182, 255, 46, 0.25));
}

.title {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 0 12px;
  color: var(--ink);
  text-shadow: 0 0 18px rgba(182, 255, 46, 0.35);
}

.subtitle {
  font-size: 16px;
  color: var(--ink-dim);
  margin: 0 0 36px;
  letter-spacing: 0.01em;
  line-height: 1.45;
}

.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 on game over */
.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);
}

@media (min-width: 600px) and (orientation: landscape) {
  .title { font-size: 36px; }
  .subtitle { margin-bottom: 24px; }
  .screen-inner { max-width: 380px; }
}
