/* Same dark arcade look as the games' own pages. */
:root {
  --bg: #101418;
  --panel: rgba(20, 26, 32, 0.92);
  --line: #2c353e;
  --fg: #e8ecef;
  --muted: #9aa6b1;
  --accent: #f2c230;
  --display: "Press Start 2P", ui-monospace, monospace;
  --body: "IBM Plex Sans", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { background: #000; color: var(--fg); font-family: var(--body); font-size: 15px; overflow: hidden; }
iframe.game { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
iframe.game[hidden] { display: none; }

.badge {
  position: fixed; top: max(10px, env(safe-area-inset-top, 0px)); left: max(10px, env(safe-area-inset-left, 0px));
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px;
  display: flex; flex-direction: column; gap: 4px; max-width: max(150px, calc(50vw - 66.667vh - 20px)); z-index: 2;
}
.badge .brand { font-family: var(--display); font-size: 9px; color: var(--muted); letter-spacing: 0.06em; }
.badge .now { font-family: var(--display); font-size: 12px; color: var(--accent); }
.badge .next { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.badge .who { font-size: 13px; color: var(--muted); }

.panel {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: max(14px, env(safe-area-inset-bottom, 0px));
  width: min(440px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 16px; display: flex; flex-direction: column; gap: 10px; z-index: 2;
}
.panel[hidden] { display: none; }
.panel h2 { font-family: var(--display); font-size: 13px; color: var(--accent); margin: 0; line-height: 1.5; }
.panel p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
.panel form { display: flex; gap: 8px; }
.panel input {
  flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 6px;
  border: 1px solid var(--line); background: #0b0f12; color: var(--fg);
}
.panel input.age { flex: 0 0 64px; text-align: center; }
button {
  font-family: var(--display); font-size: 11px; padding: 10px 14px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--accent); background: var(--accent); color: #101418;
}
button.quiet { background: transparent; color: var(--fg); border-color: var(--line); }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.cover {
  position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; background: var(--bg); text-align: center; padding: 24px; z-index: 1;
}
.cover[hidden] { display: none; }
.cover .label { font-family: var(--display); font-size: 11px; color: var(--muted); }
.cover .title { font-family: var(--display); font-size: clamp(16px, 4vw, 28px); color: var(--accent); line-height: 1.4; }
.cover .blurb { color: var(--muted); max-width: 40ch; }
.dots::after { content: ''; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
@media (prefers-reduced-motion: reduce) { .dots::after { animation: none; content: '...'; } }

.corner {
  position: fixed; top: max(10px, env(safe-area-inset-top, 0px)); right: max(10px, env(safe-area-inset-right, 0px));
  display: flex; gap: 8px; z-index: 2;
}
.toast {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 3;
  background: var(--panel); border: 1px solid var(--accent); border-radius: 8px; padding: 14px 18px;
  font-family: var(--display); font-size: 12px; color: var(--accent); line-height: 1.6; text-align: center; pointer-events: none;
}
.toast[hidden] { display: none; }
button:disabled { opacity: 0.4; cursor: default; }

/* Moving between the online server and a LAN party. */
.movebar {
  position: fixed; top: max(10px, env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 4;
  width: min(520px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--accent); border-radius: 8px;
  padding: 12px 14px; display: flex; gap: 12px; align-items: center; justify-content: space-between;
  font-size: 14px; color: var(--fg);
}
