@charset "UTF-8";
/* ===== Arcade finishing touches =====
   Only loaded by /arcade, after polish.css (which has the details every page shares:
   progress bar, back to top, toast, confetti canvas, section glow, spotlight, tips).
   This file is the arcade's own look: picker cards, per-game colours, scanlines and
   the score flash. Nothing here changes how a game plays. arcade.js adds the best
   scores and the high-score / win celebrations.
   Per-game accent colour is --ga (r,g,b) so rgba(var(--ga), .4) just works. */

/* ---------- hero: blinking prompt + game picker ---------- */

.insert-coin {
  margin: -1rem 0 1.8rem;
  font: 700 0.78rem/1 "Consolas", "Courier New", ui-monospace, monospace;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--accent);
  animation: coin-blink 1.2s steps(1) infinite;
}

@keyframes coin-blink {
  0%, 62%   { opacity: 1; }
  63%, 100% { opacity: 0.12; }
}

.arcade-picks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 1020px;
  margin: 0 auto;
}

@media (max-width: 940px) {
  .arcade-picks { grid-template-columns: repeat(2, 1fr); max-width: 560px; }
}

@media (max-width: 480px) {
  .arcade-picks { grid-template-columns: 1fr; max-width: 420px; }
}

.pg {
  --ga: 255, 159, 46;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 1.35rem 1rem 1.15rem;
  overflow: hidden;
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.28s var(--ease-out), border-color 0.25s var(--ease),
              box-shadow 0.3s var(--ease);
}

/* the spotlight: a soft pool of the game's colour that follows the pointer (polish.js sets --mx/--my) */
.pg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--ga), 0.22), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}

.pg:hover,
.pg:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(var(--ga), 0.7);
  box-shadow: 0 16px 40px -16px rgba(var(--ga), 0.6);
}

.pg:hover::before,
.pg:focus-visible::before { opacity: 1; }

.pg:active { transform: translateY(-1px); }

.pg-snake  { --ga: 255, 159, 46; }
.pg-mines  { --ga: 54, 232, 255; }
.pg-ps     { --ga: 255, 217, 58; }
.pg-rd     { --ga: 255, 77, 77; }

.pg-ico {
  position: relative;
  font-size: 2.3rem;
  line-height: 1.1;
  transition: transform 0.4s var(--ease-out);
}

.pg:hover .pg-ico { transform: rotate(-10deg) scale(1.18); }

.pg-name { position: relative; font-size: 1.15rem; font-weight: 700; }
.pg-sub  { position: relative; font-size: 0.85rem; color: var(--muted); }

.pg-best {
  position: relative;
  margin-top: 0.6rem;
  padding: 0.18rem 0.8rem;
  border-radius: 999px;
  background: rgba(var(--ga), 0.14);
  color: rgb(var(--ga));
  font: 600 0.74rem/1.4 "Consolas", "Courier New", ui-monospace, monospace;
  letter-spacing: 0.06em;
}

.pg-play {
  position: relative;
  height: 0;
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(var(--ga));
  opacity: 0;
  transition: opacity 0.25s var(--ease), height 0.25s var(--ease);
}

.pg:hover .pg-play,
.pg:focus-visible .pg-play { height: 1.4rem; margin-top: 0.4rem; opacity: 1; }

/* ---------- each game gets its own colour ---------- */

#snake    { --ga: 255, 159, 46; }
#mines    { --ga: 54, 232, 255; }
#packseal { --ga: 255, 217, 58; }
#ragdoll  { --ga: 255, 77, 77; }

#snake .num, #mines .num, #packseal .num, #ragdoll .num { color: rgb(var(--ga)); }

#snake h2::after    { content: "🐍"; }
#mines h2::after    { content: "🦭"; }
#packseal h2::after { content: "🐟"; }
#ragdoll h2::after  { content: "💥"; }

/* ---------- old arcade screen: faint scanlines + darker corners ---------- */

.snake-wrap::after,
.ps-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse at center, transparent 58%, rgba(0,0,0,0.34) 100%),
    repeating-linear-gradient(0deg, rgba(0,0,0,0.17) 0 1px, transparent 1px 3px);
  pointer-events: none;
}

/* the start / game over cards sit above the scanlines so their text stays crisp */
.snake-overlay,
.ps-overlay { z-index: 2; }

/* ---------- numbers that react ---------- */

.stat-pop  { animation: stat-pop 0.45s ease-out; }
.stat-gold { animation: stat-gold 1.6s ease-out; }

@keyframes stat-pop {
  0%   { color: var(--accent); text-shadow: 0 0 14px rgba(255,159,46,0.95); }
  100% { text-shadow: 0 0 0 rgba(255,159,46,0); }
}

@keyframes stat-gold {
  0%, 35% { color: #ffd93a; text-shadow: 0 0 22px rgba(255,217,58,1); }
  100%    { text-shadow: 0 0 0 rgba(255,217,58,0); }
}

/* ---------- calm mode and reduced motion: keep the frame, drop the motion and the glow ---------- */

html.calm .insert-coin,
html.calm .stat-pop,
html.calm .stat-gold { animation: none; }

html.calm .stat-pop,
html.calm .stat-gold { text-shadow: none; }

html.calm .pg,
html.calm .pg-ico,
html.calm .pg-play,
html.calm .pg::before { transition: none; }

html.calm .pg:hover,
html.calm .pg:focus-visible,
html.calm .pg:hover .pg-ico { transform: none; }

html.calm .pg:hover,
html.calm .pg:focus-visible { box-shadow: none; }       /* the soft coloured glow under the card */

html.calm .pg::before,
html.calm .snake-wrap::after,
html.calm .ps-wrap::after { display: none; }             /* spotlight + scanline overlays */

@media (prefers-reduced-motion: reduce) {
  .insert-coin,
  .stat-pop,
  .stat-gold { animation: none; }

  .pg, .pg-ico, .pg-play { transition: none; }

  .pg:hover, .pg:focus-visible, .pg:hover .pg-ico { transform: none; }
}
