/* ===========================================================================
   NEON RUNNER — a synthwave night run (drawn in js/games/runner.js)
   =========================================================================== */

.runner-host {
  cursor: pointer;
}

/* On a touchscreen: which half does what, shown for the first few seconds. */
.runner-zones {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 14px calc(18px + var(--safe-bottom));
  pointer-events: none;
  opacity: 0;
}

.runner-zones::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 30%;
  bottom: 12px;
  border-left: 1px dashed rgba(255, 255, 255, 0.16);
}

.runner-zones.show {
  animation: runner-zones 4.8s var(--ease) forwards;
}

@keyframes runner-zones {
  0% { opacity: 0; }
  10% { opacity: 1; }
  78% { opacity: 1; }
  100% { opacity: 0; }
}

.runner-zone {
  padding: 9px 16px;
  border-radius: var(--r-full);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--arena-ink);
  background: rgba(8, 3, 20, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.runner-zone b { color: var(--game-accent); }

.runner-picks {
  display: grid;
  justify-items: center;
  width: 100%;
}

.runner-picks .seg {
  width: 100%;
  max-width: 440px;
  flex-wrap: nowrap;
}

.runner-picks .seg button {
  flex: 1;
  padding: 6px 8px;
  line-height: 1.2;
}

@media (max-width: 420px) {
  .runner-picks .seg button { font-size: 0.8rem; padding: 6px 4px; }
  .runner-picks .seg button small { font-size: 0.58rem; }
}

/* --- Menu card preview: sun, grid, and a runner clearing a hurdle --- */
.pv-runner {
  overflow: hidden;
  background: linear-gradient(180deg, #07021A 0%, #2B0A45 52%, #6A1050 64%, #12042A 64%, #05010D 100%);
}

/* The striped sun, half-sunk in the horizon. */
.pv-runner i {
  left: 50%;
  top: 64%;
  width: 30cqw;
  height: 30cqw;
  translate: -50% -64%;
  border-radius: 50%;
  background: linear-gradient(180deg, #FFE45C, #FF8A3D 55%, #FF2E88);
  -webkit-mask-image: linear-gradient(180deg, #000 48%, transparent 48% 53%, #000 53% 61%, transparent 61% 67%, #000 67% 74%, transparent 74% 82%, #000 82%);
  mask-image: linear-gradient(180deg, #000 48%, transparent 48% 53%, #000 53% 61%, transparent 61% 67%, #000 67% 74%, transparent 74% 82%, #000 82%);
  clip-path: inset(0 0 36% 0);
  box-shadow: 0 0 8cqw rgba(255, 46, 136, 0.5);
}

/* The grid floor, in perspective, rushing toward you. */
.pv-runner span {
  left: -30%;
  right: -30%;
  top: 64%;
  bottom: -20%;
  transform-origin: top;
  transform: perspective(18cqw) rotateX(58deg);
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 46, 136, 0.7) 0 1px, transparent 1px 6cqw),
    repeating-linear-gradient(180deg, rgba(255, 46, 136, 0.7) 0 1px, transparent 1px 4cqw);
  animation: pv-runner-floor 0.5s linear infinite;
}

@keyframes pv-runner-floor {
  to { background-position: -6cqw 0, 0 0; }
}

/* The runner: a pink capsule with a cyan visor, hopping. */
.pv-runner b {
  left: 26%;
  bottom: 36%;
  width: 4cqw;
  height: 9cqw;
  border-radius: 2cqw;
  background: #FF2E88;
  box-shadow: 0 0 3cqw rgba(255, 46, 136, 0.8), inset 1.4cqw 1.2cqw 0 -0.6cqw #2ED8FF;
  transform: rotate(10deg);
  animation: pv-runner-hop 1.4s ease-in-out infinite;
}

/* Timed so the peak lands as the hurdle passes underneath (70% of the loop). */
@keyframes pv-runner-hop {
  0%, 56%, 86%, 100% { translate: 0 0; }
  68%, 74% { translate: 0 -11cqw; }
}

/* A hurdle sliding in from the right. */
.pv-runner em {
  left: 100%;
  bottom: 36%;
  width: 3cqw;
  height: 5cqw;
  border-top: 1cqw solid #FFFFFF;
  background: repeating-linear-gradient(135deg, #FFD447 0 1cqw, #1A0F2E 1cqw 2cqw);
  box-shadow: 0 0 3cqw rgba(255, 212, 71, 0.6);
  animation: pv-runner-hurdle 1.4s linear infinite;
}

@keyframes pv-runner-hurdle {
  from { translate: 0 0; }
  to { translate: -105cqw 0; }
}
