/* Alien Invasion — page-local styles. Site CSS stays at ?v=20261114c31. */
.ai-page { padding: 20px 0 48px; }
.ai-page .page-hero { padding: 20px 0 4px; }
.ai-page .page-hero p { max-width: 640px; }

.ai-shell {
  max-width: 480px;
  margin: 16px auto 8px;
  background: #050814;
  border: 1px solid rgba(92, 246, 255, 0.28);
  box-shadow:
    0 0 28px rgba(168, 85, 255, 0.14),
    0 0 0 1px rgba(125, 255, 58, 0.08);
  border-radius: 16px;
  overflow: hidden;
}
.ai-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  padding: 8px 12px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9aabc0;
  background: #080d18;
  border-bottom: 1px solid rgba(92, 246, 255, 0.16);
  font-variant-numeric: tabular-nums;
}
.ai-hud b { color: #5cf6ff; font-weight: 800; letter-spacing: 0.02em; }
.ai-hud-end { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.ai-lives { display: inline-flex; gap: 5px; min-height: 10px; }
.ai-life {
  width: 10px;
  height: 10px;
  background: #5cf6ff;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  box-shadow: 0 0 6px #5cf6ff;
}
.ai-mute {
  appearance: none;
  border: 1px solid rgba(92, 246, 255, 0.35);
  background: transparent;
  color: #d7deee;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 5px 10px;
  cursor: pointer;
}
.ai-mute[aria-pressed="false"] {
  border-color: rgba(125, 255, 58, 0.55);
  color: #7dffc5;
}
.ai-mute:hover { color: #5cf6ff; }

/* Closed neon frame around the play area, with a stronger glowing bottom edge. */
.ai-stage {
  position: relative;
  background: #050b16;
  border: 2px solid rgba(125, 255, 58, 0.78);
  box-shadow:
    inset 0 0 0 1px rgba(92, 246, 255, 0.22),
    0 0 16px rgba(125, 255, 58, 0.28),
    0 8px 18px rgba(125, 255, 58, 0.2);
  z-index: 1;
}
.ai-stage::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    rgba(92, 246, 255, 0.45),
    #7dffc5 22%,
    #b6ff3b 50%,
    #7dffc5 78%,
    rgba(92, 246, 255, 0.45)
  );
  box-shadow:
    0 0 8px rgba(125, 255, 58, 0.95),
    0 0 18px rgba(125, 255, 58, 0.6),
    0 4px 14px rgba(92, 246, 255, 0.35);
  pointer-events: none;
  z-index: 2;
}
#ai-game {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
  background: #050b16;
  touch-action: none;
  cursor: crosshair;
}

.ai-status {
  margin: 0;
  padding: 8px 12px 0;
  text-align: center;
  color: #9aabc0;
  font-size: 13px;
  min-height: 1.3em;
}
.ai-play {
  display: block;
  margin: 8px auto 0;
  appearance: none;
  border: 0;
  background: linear-gradient(90deg, #5cf6ff, #a855ff);
  color: #050b16;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 10px 22px;
  cursor: pointer;
  min-height: 44px;
}
.ai-play[hidden] { display: none; }
.ai-play:hover { filter: brightness(1.08); }

.ai-controls {
  display: none;
  gap: 10px;
  padding: 12px;
  background: #080d18;
  border-top: 1px solid rgba(92, 246, 255, 0.16);
}
.ai-btn {
  flex: 1;
  appearance: none;
  border: 1px solid rgba(92, 246, 255, 0.3);
  background: #121a2c;
  color: #edf4ff;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 12px;
  min-height: 52px;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.ai-btn:active, .ai-btn.is-down { background: rgba(92, 246, 255, 0.16); color: #5cf6ff; }
.ai-fire { flex: 1.35; border-color: rgba(255, 61, 138, 0.45); color: #ff9ac4; }

@media (max-width: 800px), (pointer: coarse) {
  .ai-controls { display: flex; }
}

.ai-hint {
  margin: 10px auto 28px;
  max-width: 480px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}


.game-more {
  margin: 0 auto 28px;
  max-width: 480px;
  text-align: center;
  font-size: 14px;
}
.game-more a { font-weight: 700; }

.ai-gear { margin: 8px 0 0; }
.ai-gear .section-head { margin-bottom: 16px; }

body.ai-no-scroll { overflow: hidden; overscroll-behavior: none; }

@media (max-width: 560px) {
  .ai-page { padding: 8px 0 32px; }
  .ai-page .page-hero { padding: 12px 0 0; }
  .ai-page .page-hero h1 { font-size: 28px; }
}
