/* Setech Arcade - one stylesheet for every page. Dark by design: the games
   are dark, and the screen should be the brightest thing on the page. */
:root {
  color-scheme: dark;
  --bg: #0b0c10;
  --panel: #14161d;
  --panel-2: #1b1e27;
  --line: #2a2f3b;
  --text: #e8e4d8;
  --muted: #a3a9b4;
  --accent: #f0b33c;      /* amber, as the game's title */
  --accent-ink: #1a1305;
  --teal: #5fc4d3;
  --danger: #e8705f;
  --focus: #8fd6ff;
  --radius: 10px;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--sans);
  -webkit-text-size-adjust: 100%;
}
a { color: var(--teal); text-underline-offset: 2px; }
a:hover { color: #8fdbe6; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; }
.skip-link:focus { left: 16px; z-index: 10; background: var(--panel); padding: 8px 12px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ---- header: the name and a band of four colour stripes ---- */
.site-header { border-bottom: 1px solid var(--line); background: #0e1016; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand {
  font: 700 18px/1 var(--mono);
  letter-spacing: 0.22em;
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
  padding: 8px 0;
}
.brand span { color: var(--accent); }
.stripes { height: 6px; display: grid; grid-template-rows: repeat(4, 1fr); }
.stripes i:nth-child(1) { background: #f0b33c; }
.stripes i:nth-child(2) { background: #e2763a; }
.stripes i:nth-child(3) { background: #b8384a; }
.stripes i:nth-child(4) { background: #5b3f8f; }
.site-nav a { font-family: var(--mono); font-size: 14px; letter-spacing: 0.06em; }

main { padding: 32px 0 48px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h1 { font: 700 clamp(26px, 5vw, 40px)/1.15 var(--mono); letter-spacing: 0.04em; }
h2 { font: 700 20px/1.25 var(--mono); letter-spacing: 0.03em; }
h3 { font-size: 16px; }
.lede { color: var(--muted); max-width: 68ch; font-size: 17px; }
.muted { color: var(--muted); }

/* ---- buttons ---- */
.button, button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 16px;
  font: 600 15px/1.2 var(--sans);
  color: var(--text); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 8px;
  text-decoration: none; cursor: pointer;
}
.button:hover, button:hover { border-color: #4a5263; color: var(--text); }
.button.primary, button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.button.primary:hover, button.primary:hover { background: #f6c460; }
button:disabled { opacity: 0.55; cursor: progress; }
button.danger { color: var(--danger); }
button.quiet { min-height: 36px; padding: 6px 12px; font-size: 13px; color: var(--muted); background: transparent; }

/* ---- index: game cards ---- */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 24px; margin-top: 28px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card .shot { display: block; background: #000; aspect-ratio: 336 / 240; }
.card .shot img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.card .body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card p { margin: 0; }
.card .status { font: 13px/1.3 var(--mono); color: var(--teal); letter-spacing: 0.04em; }
.card .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.card .actions .links { display: flex; gap: 14px; align-items: center; font-size: 14px; }

/* ---- play page ---- */
.player { margin: 20px 0 12px; background: #000; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.player:fullscreen { border: 0; border-radius: 0; display: flex; flex-direction: column; justify-content: center; }
.stage { position: relative; display: grid; place-items: center; padding: 12px 0; min-height: 240px; outline: none; }
.player:fullscreen .stage { flex: 1; padding: 0; }
.stage:focus-visible { box-shadow: inset 0 0 0 3px var(--focus); }
#screen { display: block; image-rendering: pixelated; image-rendering: crisp-edges; background: #000; }
.start {
  position: absolute; inset: 0; margin: auto; width: fit-content; height: fit-content;
  font: 700 18px/1.2 var(--mono); letter-spacing: 0.06em;
  padding: 14px 22px; min-height: 52px;
  box-shadow: 0 0 0 6px rgb(0 0 0 / 0.6);
}
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.status-line { margin: 8px 0 0; color: var(--muted); font-size: 14px; min-height: 1.4em; }
.note { background: #2a2110; border: 1px solid #6b5220; color: #f5deb0; border-radius: 8px; padding: 10px 14px; margin: 12px 0 0; font-size: 15px; }

/* touch controls: shown on touch screens only */
.touch { display: none; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 16px 16px; user-select: none; -webkit-user-select: none; touch-action: none; }
@media (pointer: coarse) { .touch { display: flex; } }
.touch-label { flex-basis: 100%; order: -1; margin: 0; text-align: center; color: var(--muted); font-size: 13px; }
.touch { flex-wrap: wrap; }
.pad { display: grid; grid-template-columns: repeat(3, 58px); grid-template-rows: repeat(3, 58px); gap: 6px; }
.pad button { font-size: 20px; min-height: 0; padding: 0; border-radius: 12px; background: #1d212b; }
.pad .up { grid-area: 1 / 2; } .pad .left { grid-area: 2 / 1; } .pad .right { grid-area: 2 / 3; } .pad .down { grid-area: 3 / 2; }
#touch-fire { width: 104px; height: 104px; border-radius: 50%; background: #6b2230; border-color: #9a3446; font: 700 18px/1 var(--mono); letter-spacing: 0.08em; }

.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 32px; }
@media (max-width: 820px) { .columns { grid-template-columns: 1fr; } }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
kbd { font: 13px/1 var(--mono); background: #232733; border: 1px solid #39404f; border-bottom-width: 2px; border-radius: 5px; padding: 2px 6px; white-space: nowrap; }
.table-scroll { overflow-x: auto; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; padding: 24px 0 40px; }
.site-footer .wrap { display: flex; gap: 8px 24px; flex-wrap: wrap; justify-content: space-between; }

.prose { max-width: 75ch; }
.prose h2 { margin-top: 32px; }
.prose pre { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow-x: auto; font-size: 13px; white-space: pre-wrap; }
