/* Stratos Néon — mise en page (thème arcade sombre / néon) */
:root {
  --bg: #07040f;
  --panel: #120a24;
  --text: #e6e2f5;
  --muted: #a99fc6;
  --cyan: #3ff6ff;
  --pink: #ff3fd0;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(ellipse at 50% -10%, #2a0a4a 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1000px; margin: 0 auto; padding: 12px 16px;
}
.topbar h1 {
  margin: 0; font-size: 1.3rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--cyan); text-shadow: 0 0 8px rgba(63, 246, 255, .6);
}
.topbar h1 span { color: var(--pink); text-shadow: 0 0 8px rgba(255, 63, 208, .6); }
.back, #btn-fs {
  color: var(--text); text-decoration: none; font: inherit; font-size: .9rem;
  background: var(--panel); border: 1px solid #3a2a5e; border-radius: 6px; padding: 6px 12px; cursor: pointer;
}
.back:hover, #btn-fs:hover, .back:focus-visible, #btn-fs:focus-visible { border-color: var(--cyan); outline: none; }

main { max-width: 1000px; margin: 0 auto; padding: 0 16px 24px; }

.stage {
  position: relative; aspect-ratio: 16 / 9; margin: 0 auto;
  /* l'écran de jeu tient toujours dans la hauteur de la fenêtre (mobile à l'horizontale) */
  width: min(100%, calc((100vh - 64px) * 16 / 9));
  width: min(100%, calc((100svh - 64px) * 16 / 9));
  border: 2px solid var(--pink); border-radius: 6px; overflow: hidden; background: #000;
  box-shadow: 0 0 18px rgba(255, 63, 208, .35), 0 0 40px rgba(63, 246, 255, .12);
}
#screen {
  display: block; width: 100%; height: 100%; object-fit: contain;
  image-rendering: pixelated; image-rendering: crisp-edges;
  touch-action: none; outline: none; cursor: crosshair;
}
/* légères scanlines façon écran cathodique */
.stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .14) 0 1px, transparent 1px 3px);
}
.stage:fullscreen { border: 0; border-radius: 0; width: 100vw; height: 100vh; max-width: none; aspect-ratio: auto; }
@media (max-height: 500px) { .topbar { padding: 6px 16px; } .topbar h1 { font-size: 1rem; } }

/* Commandes tactiles : visibles seulement sur écran tactile */
.touch { display: none; }
@media (pointer: coarse) {
  .touch { display: block; position: absolute; inset: 0; pointer-events: none; z-index: 2; }
  .touch button {
    position: absolute; pointer-events: auto; touch-action: none; user-select: none; -webkit-user-select: none;
    border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45);
    background: rgba(18, 10, 36, .45); color: #fff; font: 700 11px/1 system-ui, sans-serif; letter-spacing: .05em;
  }
  .touch button.on { background: rgba(63, 246, 255, .45); border-color: var(--cyan); }
  .b-fire { right: 3%; bottom: 14%; width: 17%; aspect-ratio: 1; }
  .b-missile { right: 22%; bottom: 6%; width: 12%; aspect-ratio: 1; }
  .b-roll { right: 5%; bottom: 46%; width: 12%; aspect-ratio: 1; font-size: 9px !important; }
  .b-boost { right: 20%; bottom: 36%; width: 10%; aspect-ratio: 1; }
  .b-pause { right: 2%; top: 16%; width: 7%; aspect-ratio: 1; }
}

.help {
  margin-top: 20px; background: var(--panel); border: 1px solid #2a1d48; border-radius: 8px; padding: 16px 20px;
}
.help h2 { margin: 0 0 8px; font-size: 1.05rem; color: var(--cyan); }
.help p { margin: 0 0 10px; color: var(--muted); }
.keys { margin: 0; padding-left: 18px; color: var(--text); }
.keys li { margin: 4px 0; }
kbd {
  display: inline-block; padding: 1px 6px; border: 1px solid #4a3a72; border-bottom-width: 2px; border-radius: 4px;
  background: #1b1233; font: .85em ui-monospace, Consolas, monospace; color: #fff;
}
.credits { margin-top: 12px; }
.credits summary { cursor: pointer; color: var(--pink); }
.noscript { color: #ff8a8a; text-align: center; }
.foot { text-align: center; color: #6f6590; font-size: .85rem; padding: 0 16px 24px; }
