/* ===== Rooftop Parkour 3D — fixed "dusk neon" theme, fullscreen =====
   No center chrome (no c-bar / c-app / gc-back) — the canvas fills the
   viewport and the HUD + touch pads float over it. Self-contained palette. */
:root {
  --pk-text: #eaf0ff;
  --pk-muted: #a8b4d8;
  --pk-panel: rgba(14, 18, 38, .7);
  --pk-line: rgba(120, 150, 230, .26);
  --pk-accent: #ff5a8a;      /* hot pink (jump / CTAs) */
  --pk-accent-2: #34e0d0;    /* cyan (coins / highlights) */
  --pk-on-accent: #26061a;
  --pk-warn: #ff6b5e;
}

html, body { height: 100%; }
body.pk-body {
  margin: 0; overflow: hidden;
  background: #0a0c1c; color: var(--pk-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* ---------- Floating HUD ---------- */
.pk-hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
.pk-hud[hidden] { display: none; }
.pk-hud > * { pointer-events: auto; }

.pk-stats {
  position: absolute; top: 12px; left: 12px;
  display: flex; gap: 8px 16px; padding: 8px 14px; border-radius: 12px;
  background: var(--pk-panel); border: 1px solid var(--pk-line); backdrop-filter: blur(6px);
  font-size: 14px; font-weight: 600;
}
.pk-stat b { color: var(--pk-accent-2); font-variant-numeric: tabular-nums; margin-left: 2px; }
.pk-stat:first-child b { color: var(--pk-text); }

.pk-mini {
  position: absolute; top: 12px; right: 12px;
  padding: 8px 14px; border-radius: 12px; cursor: pointer;
  background: var(--pk-panel); border: 1px solid var(--pk-line);
  color: var(--pk-muted); font: inherit; font-size: 13px; font-weight: 600;
}
.pk-mini:hover { color: var(--pk-text); border-color: var(--pk-accent); }

.pk-pad { position: absolute; bottom: 16px; display: flex; gap: 12px; }
.pk-pad--left { left: 16px; }
.pk-pad--right { right: 16px; }
.pk-key {
  min-width: 66px; height: 66px; padding: 0 14px; border-radius: 16px; cursor: pointer;
  background: var(--pk-panel); border: 1px solid var(--pk-line);
  color: var(--pk-text); font: inherit; font-size: 15px; font-weight: 800;
  touch-action: none; user-select: none;
  transition: transform .08s ease, background-color .12s ease;
}
.pk-key:active, .pk-key.is-down { transform: scale(.94); background: rgba(70, 90, 160, .5); }
.pk-key--jump { color: var(--pk-on-accent); background: linear-gradient(180deg, #ff7ba1, var(--pk-accent)); border-color: transparent; }
.pk-key--slide { color: #2a0a08; background: linear-gradient(180deg, #7fd8ff, #4bb3e0); border-color: transparent; }

/* ---------- Full-screen overlays (menu / game-over) ---------- */
.pk-screen {
  position: fixed; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  overflow-y: auto; overscroll-behavior: contain;
  background: radial-gradient(130% 100% at 50% 0%, rgba(40,20,60,.4), rgba(6,6,18,.9));
  backdrop-filter: blur(3px);
}
.pk-screen[hidden] { display: none; }
.pk-card {
  width: min(520px, 96vw); margin: auto; padding: 26px 26px 30px; border-radius: 20px;
  background: rgba(14, 16, 34, .92); border: 1px solid var(--pk-line);
  box-shadow: 0 24px 60px rgba(0,0,0,.55); text-align: center; color: var(--pk-text);
}
.pk-card__title { margin: 0 0 6px; font-size: clamp(28px, 6.5vw, 42px); letter-spacing: -.01em; }
.pk-card__title span { color: var(--pk-accent); }
.pk-card__big { font-size: 52px; line-height: 1; margin-bottom: 4px; }
.pk-card__lead { margin: 8px 0 14px; color: var(--pk-muted); font-size: 15px; line-height: 1.5; }
.pk-card__list { margin: 0 auto 18px; padding: 0; list-style: none; display: grid; gap: 8px; text-align: left; max-width: 430px; font-size: 13.5px; }
.pk-card__list b { color: var(--pk-accent-2); }
.pk-card__row { display: flex; gap: 12px; justify-content: center; margin-top: 20px; flex-wrap: wrap; align-items: stretch; }
.pk-card__row > * { flex: 1 1 0; min-width: 150px; display: inline-flex; align-items: center; justify-content: center; }
.pk-cta {
  padding: 14px 30px; border-radius: 14px; cursor: pointer; border: 0;
  font: inherit; font-size: 17px; font-weight: 800; color: var(--pk-on-accent); line-height: 1;
  background: linear-gradient(180deg, #ff7ba1, var(--pk-accent));
  box-shadow: 0 8px 20px rgba(255,90,138,.4); transition: transform .12s ease;
}
.pk-cta:hover { transform: translateY(-2px); }
/* Start menu: Run button + link share one centred column so they line up. */
.pk-card > .pk-cta { display: block; width: min(260px, 82%); margin: 4px auto 0; }
.pk-btn {
  padding: 14px 22px; border-radius: 14px; text-decoration: none; cursor: pointer;
  background: var(--pk-panel); border: 1px solid var(--pk-line);
  color: var(--pk-text); font: inherit; font-size: 15px; font-weight: 600; line-height: 1;
}
.pk-btn:hover { border-color: var(--pk-accent); }
.pk-link { display: block; width: min(260px, 82%); margin: 14px auto 0; text-align: center; color: var(--pk-muted); font-size: 13px; text-decoration: none; border-bottom: 1px dashed var(--pk-line); }
.pk-link:hover { color: var(--pk-text); }
kbd {
  display: inline-block; min-width: 20px; padding: 1px 6px; margin: 0 1px; border-radius: 6px;
  border: 1px solid var(--pk-line); background: rgba(255,255,255,.07);
  font: 600 12px/1.4 inherit; color: var(--pk-text);
}

@media (max-width: 560px) {
  .pk-stats { font-size: 12.5px; gap: 6px 10px; }
  .pk-key { min-width: 58px; height: 58px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .pk-key, .pk-cta { transition: none; } }
