/* The arcade's front door. Deliberately its own stylesheet rather than
   McTretris's: the lobby belongs to the arcade, not to any one game. */
@import url("/fonts.css");

:root {
  --bg: #10121f;
  --panel: #181c2e;
  --line: #2a3048;
  --ink: #eef1ff;
  --muted: #8b93b5;
  --lime: #c0ef76;
  --cyan: #64dfef;
  --gold: #ffe17d;
  color-scheme: dark;
}
/* Panning only. This, not the viewport meta, is what actually refuses
   double-tap and pinch zoom - iOS has ignored user-scalable since iOS 10.
   Play surfaces narrow this further to `none` where a drag must not scroll. */
html,
body {
  touch-action: pan-x pan-y;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(
      120% 70% at 50% 0%,
      rgba(100, 223, 239, 0.12),
      transparent 60%
    ),
    var(--bg);
  color: var(--ink);
  font-family:
    "Space Grotesk",
    system-ui,
    -apple-system,
    sans-serif;
}
main {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px 32px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 560px;
  margin: 0 auto;
  padding: 12px 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.brand-mark {
  width: 22px;
  height: 22px;
}
.icon-button {
  width: 38px;
  height: 38px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-size: 16px;
}

.hero {
  padding: 12px 0 20px;
  text-align: center;
}
.eyebrow {
  color: var(--cyan);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
}
.hero h1 {
  margin: 4px 0 8px;
  font-size: clamp(40px, 15vw, 64px);
  line-height: 0.95;
  letter-spacing: -1px;
}
.tagline {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}
.family-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--panel);
  border: 1px solid var(--cyan);
  border-radius: 999px;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}

/* One card per game: what it is, who holds the record, and a way in. */
.games {
  display: grid;
  gap: 14px;
}
.game-card {
  display: block;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: inherit;
  text-decoration: none;
  transition:
    border-color 0.15s,
    transform 0.12s;
}
.game-card:active {
  transform: scale(0.99);
}
.game-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.game-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 12px;
  background: linear-gradient(160deg, #222840, #161a2b);
  border: 1px solid var(--line);
  font-size: 22px;
}
.game-name {
  flex: 1;
  font-size: 19px;
  font-weight: 700;
}
.game-name small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.game-go {
  color: var(--cyan);
  font-size: 20px;
}

/* The McTrent Master strip: the point of the whole arcade. */
.master {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 12px;
  background: #12162480;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.master .crown {
  color: var(--gold);
  font-size: 16px;
}
.master-who {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
}
.master-who small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.master-score {
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--lime);
}
.master.empty .master-who {
  color: var(--muted);
  font-weight: 400;
}
.master.loading {
  opacity: 0.5;
}

.lobby-footer {
  padding-top: 24px;
  text-align: center;
}
.quiet {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1px;
}

dialog {
  width: min(92vw, 380px);
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
}
dialog::backdrop {
  background: #05060cd0;
}
dialog h2 {
  margin: 6px 0 8px;
  font-size: 24px;
}
dialog p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}
.close {
  float: right;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 16px;
}
.primary,
.secondary {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
}
.primary {
  background: var(--lime);
  color: #101526;
}
.secondary {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
.input-label {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
input {
  width: 100%;
  margin-top: 6px;
  padding: 13px;
  background: #11142400;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* 16px or iOS zooms the page on focus */
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: 88vw;
  margin: 0;
  padding: 12px 18px;
  background: var(--panel);
  border: 1px solid var(--cyan);
  border-radius: 12px;
  font-size: 14px;
  text-align: center;
}
