:root {
  color-scheme: dark;
  --ink: #100619;
  --paper: #f7e3eb;
  --muted: #d2b9cd;
  --accent: #f1a6ce;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--ink);
  color: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.lobby {
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 96px 24px 56px;
  background:
    linear-gradient(90deg, #100619f2, #100619df 35%, #1c102e61),
    radial-gradient(ellipse at 70% 92%, #532765, transparent 66%),
    url('../landing/gameplay/temple-runner-vortex.jpg') center center / cover;
}

.arcade-link {
  position: absolute;
  top: max(24px, env(safe-area-inset-top));
  left: max(24px, env(safe-area-inset-left));
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font: 12px ui-monospace, monospace;
}

.arcade-link:hover { color: var(--accent); }
.lobby-copy { text-align: center; }
h1 {
  margin: 0;
  font-size: clamp(2.9rem, 8vw, 8rem);
  line-height: .88;
  letter-spacing: -.065em;
}
h1 em { color: var(--accent); font-family: Georgia, serif; font-weight: 400; }
.lobby-copy p { color: var(--muted); margin: 22px 0; line-height: 1.6; }
.lobby-copy .controls { margin: 15px 0 0; font-size: .82rem; color: var(--muted); }
kbd {
  padding: 0 3px;
  border-radius: 2px;
  border: 1px solid #e4c5db66;
  color: var(--paper);
}
.start {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  min-height: 48px;
  padding: 0 19px;
  border: 0;
  border-radius: 4px;
  background: var(--accent);
  color: #22102a;
  font-weight: 700;
}
.start:hover { background: #ffd0e6; }

#gameOverlay {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1;
  overflow: hidden;
  background: var(--ink);
}
#gameOverlay.active { display: block; }
#gameCanvas { display: block; width: 100%; height: 100%; }
.game-hud {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  left: max(12px, env(safe-area-inset-left));
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  pointer-events: none;
}
.game-stats, .game-actions { display: flex; gap: 8px; }
.game-stats {
  min-height: 44px;
  align-items: center;
  flex-wrap: wrap;
  font: 12px ui-monospace, monospace;
}
.game-actions button {
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid #e4c5db66;
  border-radius: 4px;
  background: #160d22;
  color: var(--paper);
  white-space: nowrap;
  pointer-events: auto;
}
.game-actions button:hover { border-color: var(--accent); }
#gameCenterMessage {
  position: absolute;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(340px, 86vw);
  padding: 26px 18px;
  border: 1px solid #f4a8d858;
  border-radius: 8px;
  background: #180b24ef;
  text-align: center;
  line-height: 1.7;
  pointer-events: none;
}
#gameMessageTitle { display: block; font-size: 1.4rem; }
#gameMessageText { color: var(--muted); font-size: .9rem; }
#gameCenterMessage.hidden { display: none; }
.touch-controls { display: none; }

@media (any-pointer: coarse) {
  .touch-controls { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(2, 1fr); touch-action: none; }
}
