﻿/* Space Arcade Games — games.css (game player UI) */
.game-section { margin: .6rem 0 1.4rem; }
.gm { --gm-bg: #05060f; --gm-ui: #0e1433; --gm-line: #28326a; --gm-text: #e9edff; --gm-muted: #a9b2da; --gm-accent: #5cc8ff;
  position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; color: var(--gm-text);
  background: linear-gradient(180deg, #0a0f2a, #05060f); border: 1px solid var(--gm-line); border-radius: var(--radius); padding: 10px; }
.gm.is-full { border-radius: 0; border: 0; justify-content: center; height: 100%; }
.gm-toolbar { width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 2px 10px; }
.gm-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.gm-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--gm-ui); border: 1px solid var(--gm-line); font-size: .86rem; line-height: 1.3; }
.gm-label { color: var(--gm-muted); font-weight: 600; }
.gm-val { color: #fff; font-variant-numeric: tabular-nums; font-weight: 800; }
.gm-actions { display: flex; gap: 6px; }
.gm-tbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 10px; border-radius: 10px; background: var(--gm-ui); border: 1px solid var(--gm-line); color: var(--gm-text); font: 600 .86rem var(--font); cursor: pointer; }
.gm-tbtn:hover { border-color: var(--gm-accent); color: #fff; }
.gm-tbtn svg { width: 18px; height: 18px; fill: currentColor; }
.gm-tbtn[aria-pressed="false"] { color: var(--gm-muted); }
.gm-stage { position: relative; max-width: 100%; border-radius: 10px; overflow: hidden; background: var(--gm-bg); box-shadow: 0 0 0 1px var(--gm-line), 0 12px 40px rgba(0,0,0,.5); }
.gm-canvas { display: block; width: 100%; height: 100%; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.gm-canvas:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.gm-overlay { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding: 14px; background: rgba(4, 6, 20, .72); overflow-y: auto; }
.gm-overlay.is-open { display: flex; }
.gm-panel { width: 100%; max-width: 380px; margin: auto; text-align: center; padding: 18px 18px 14px; border-radius: 14px; background: rgba(14, 20, 51, .96); border: 1px solid var(--gm-line); box-shadow: 0 16px 50px rgba(0,0,0,.5); }
.gm-kicker { margin: 0; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gm-accent); font-weight: 800; }
.gm-title { margin: .15rem 0 .45rem; font-size: 1.6rem; color: #fff; font-family: var(--font-display); }
.gm-intro { margin: 0 0 .7rem; color: #d3daff; font-size: .95rem; line-height: 1.45; }
.gm-help { list-style: none; margin: 0 0 .8rem; padding: 0; text-align: left; display: grid; gap: 5px; }
.gm-help li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px; align-items: center; margin: 0; font-size: .86rem; color: var(--gm-muted); }
.gm-help kbd { background: #1b2458; border-color: #34408a; color: #fff; font-size: .8rem; white-space: normal; text-align: center; }
.gm-best, .gm-line { margin: .2rem 0 .6rem; color: var(--gm-muted); font-size: .92rem; }
.gm-best strong { color: #fff; }
.gm-final { margin: .2rem 0; font-size: 1.1rem; color: #d3daff; }
.gm-final strong { display: block; font-size: 2.3rem; line-height: 1.1; color: #ffe66d; font-variant-numeric: tabular-nums; }
.gm-newbest { margin: .3rem 0 .6rem; color: #7cffb2; font-weight: 800; }
.gm-small { margin: .6rem 0 0; font-size: .78rem; color: var(--gm-muted); }
.gm-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: .6rem 0 .4rem; }
.gm-btn { min-height: 46px; padding: 0 20px; border-radius: 999px; border: 2px solid #3a4796; background: transparent; color: #fff; font: 800 1rem var(--font); cursor: pointer; }
.gm-btn:hover { border-color: var(--gm-accent); }
.gm-primary { background: #ffb703; border-color: #ffb703; color: #1a1300; min-width: 170px; }
.gm-primary:hover { filter: brightness(1.08); border-color: #ffb703; }
.gm-share-status { min-height: 1.2em; margin: .3rem 0 0; font-size: .86rem; color: #7cffb2; }

/* touch pad — sits BELOW the canvas so thumbs never cover the game */
.gm-pad { display: none; width: 100%; max-width: 640px; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 6px 4px; touch-action: none; -webkit-user-select: none; user-select: none; }
.gm-pad.is-on { display: flex; }
.gm-pad-left, .gm-pad-right { display: flex; gap: 12px; align-items: center; }
.gm-joy { position: relative; width: 124px; height: 124px; border-radius: 50%; background: radial-gradient(circle, #1a2256 0%, #10163a 70%); border: 2px solid #34408a; touch-action: none; }
.gm-knob { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #9fe2ff, #3a86ff); box-shadow: 0 4px 12px rgba(0,0,0,.5); pointer-events: none; }
.gm-touch-btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 82px; height: 82px; border-radius: 50%; border: 2px solid #3a4796; background: #141b47; color: #fff; font: 800 .95rem var(--font); touch-action: none; -webkit-tap-highlight-color: transparent; cursor: pointer; }
.gm-touch-btn span[aria-hidden] { font-size: 1.6rem; line-height: 1; }
.gm-btn-label { font-size: .68rem; color: var(--gm-muted); }
.gm-touch-btn.gm-act { width: 92px; height: 92px; background: radial-gradient(circle at 40% 35%, #ffcf4d, #e08e00); border-color: #ffd166; color: #1a1300; }
.gm-touch-btn.gm-alt { width: 70px; height: 70px; background: radial-gradient(circle at 40% 35%, #b197fc, #6d28d9); border-color: #c4b5fd; color: #fff; }
.gm-touch-btn.is-down { transform: scale(.94); filter: brightness(1.2); }

/* game page info blocks */
.game-meta-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .7rem; margin: .9rem 0 0; }
.game-meta-bar .tags li { font-size: .82rem; }
.controls-table { width: 100%; border-collapse: collapse; margin: .4rem 0 1rem; }
.controls-table caption { text-align: left; font-weight: 800; padding: .4rem 0; font-size: 1rem; }
.controls-table th, .controls-table td { text-align: left; padding: .5rem .7rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.controls-table th { width: 42%; font-weight: 600; }
.controls-grid { display: grid; gap: 1rem 2rem; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.info-grid { display: grid; gap: 1.4rem 2.4rem; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.info-grid > * { min-width: 0; }
.controls-table kbd { white-space: normal; }
.info-grid h2 { margin-top: .6rem; }
.steps { padding-left: 1.4em; }
.steps li { margin: .45rem 0; }
.personal-best { color: var(--muted); font-size: .95rem; }
.personal-best strong { color: var(--text); }
noscript .empty-state { margin: 1rem 0; }
