/* ===========================================================================
   MENU — hero, the synthwave backdrop, stats strip and the game cards.
   Each card carries a live CSS miniature of its game in a little screen.
   =========================================================================== */

#view-menu {
  position: relative;
  min-height: 100vh;
}

/* --- Backdrop canvas (drawn by main.js) --- */
.backdrop {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

body:not([data-view="menu"]) .backdrop {
  opacity: 0.35;
}

/* ===========================
   HERO
   =========================== */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: calc(var(--nav-h) + 72px + var(--safe-top)) var(--gutter) 46px;
}

.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  border-radius: var(--r-full);
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 22px;
  animation: fade-up 0.7s var(--ease) both;
}

.hero__kicker-dot {
  display: inline-flex;
  gap: 3px;
}

.hero__kicker-dot i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 8px var(--c);
  animation: dot-pulse 2.4s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.15s);
}

@keyframes dot-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.1); }
}

.hero__title {
  font-size: clamp(2.9rem, 10vw, 6.6rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: var(--ink);
  animation: fade-up 0.8s var(--ease) 0.05s both;
}

.hero__title .accent {
  display: inline-block;
  background: linear-gradient(90deg,
      var(--game-reaction), var(--game-typing), var(--game-platformer), var(--game-trading),
      var(--game-aim), var(--game-bughunt), var(--game-rhythm), var(--game-keyboard), var(--game-reaction));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: hue-flow 9s linear infinite;
  padding: 0 0.04em 0.1em 0;
  margin-bottom: -0.1em;
}

@keyframes hue-flow {
  to { background-position: -300% 0; }
}

.hero-subtitle {
  margin-top: 18px;
  font-size: clamp(1rem, 2.3vw, 1.2rem);
  color: var(--ink-2);
  min-height: 1.8em;
  animation: fade-up 0.8s var(--ease) 0.12s both;
}

.pop-text {
  display: inline-block;
  animation: pop-fade 3.2s var(--ease) infinite;
}

@keyframes pop-fade {
  0%   { opacity: 0; transform: translateY(10px); filter: blur(6px); }
  12%  { opacity: 1; transform: translateY(0); filter: blur(0); }
  82%  { opacity: 1; transform: translateY(0); filter: blur(0); }
  100% { opacity: 0; transform: translateY(-8px); filter: blur(6px); }
}

/* --- Stats strip --- */
.hero-stats {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 30px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fade-up 0.8s var(--ease) 0.2s both;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 108px;
  padding: 10px 18px;
  border-radius: var(--r-md);
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hero-stat b {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.hero-stat span {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.hero-note {
  margin-top: 18px;
  font-size: 0.84rem;
  color: var(--ink-3);
  max-width: 52ch;
  animation: fade-up 0.8s var(--ease) 0.26s both;
}

/* --- Install the app (shown by js/core/pwa.js where it can be) --- */
.install-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  padding: 9px 18px 9px 14px;
  border-radius: var(--r-full);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--glass);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fade-up 0.8s var(--ease) 0.3s both;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
              box-shadow var(--t-base) var(--ease);
}

.install-chip[hidden] { display: none; }

.install-chip svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.install-chip small {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

.install-chip:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--accent) 60%, transparent);
}

.link-button {
  margin-left: 6px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-button:hover {
  color: var(--ink);
}

/* ===========================
   CARD GRID
   =========================== */
.games-section {
  padding: 10px var(--gutter) 110px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  max-width: var(--container);
  margin: 0 auto;
  perspective: 1200px;
}

@media (max-width: 1080px) {
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

.game-card[hidden] { display: none; }

/* --- Category chips over the grid (added by js/main.js) --- */
.card-filters {
  display: flex;
  gap: 8px;
  max-width: var(--container);
  margin: 0 auto 18px;
  padding: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  animation: fade-up 0.6s var(--ease) both;
}

.card-filters::-webkit-scrollbar { display: none; }

.card-filters button {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 15px;
  border-radius: var(--r-full);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--glass);
  border: 1px solid var(--line-strong);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.card-filters button:hover { color: var(--ink); border-color: var(--ink-3); }

.card-filters button small {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink-3);
}

.card-filters button[aria-pressed="true"] {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 6px 18px -6px var(--accent);
}

.card-filters button[aria-pressed="true"] small { color: inherit; opacity: 0.75; }

.game-card {
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 10px;
  border-radius: var(--r-lg);
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease), box-shadow var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease);
  animation: card-in 0.7s var(--ease) both;
  animation-delay: calc(0.25s + var(--i, 0) * 0.06s);
  will-change: transform;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(30px) rotateX(10deg); }
  to   { opacity: 1; transform: translateY(0) rotateX(0); }
}

.game-card.is-tilting {
  transition: transform 0.08s linear, box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}

.game-card:hover,
.game-card:focus-visible {
  border-color: color-mix(in srgb, var(--game-accent) 60%, transparent);
  box-shadow: 0 24px 60px -24px var(--game-glow), 0 0 0 1px var(--game-faint);
}

/* Glare that follows the pointer */
.game-card__glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(400px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.16), transparent 45%);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease);
  mix-blend-mode: overlay;
}

.game-card:hover .game-card__glare { opacity: 1; }

/* --- The little screen --- */
.game-card__screen {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: calc(var(--r-lg) - 6px);
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--game-accent) 26%, transparent), transparent 65%),
    linear-gradient(180deg, var(--arena-bg-2), var(--arena-bg));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transform: translateZ(30px);
  isolation: isolate;
  container-type: inline-size;
}

.game-card__screen::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px);
}

.game-card__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 8px 6px;
  transform: translateZ(20px);
  flex: 1;
}

.game-card__top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.game-card__index {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--game-accent);
}

[data-theme="light"] .game-card__index {
  color: color-mix(in srgb, var(--game-accent) 70%, #000);
}

.game-card__title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.game-card__tagline {
  font-size: 0.85rem;
  color: var(--ink-2);
  line-height: 1.45;
}

.game-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}

.game-card__best {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.game-card__best.has-best {
  color: var(--ink);
}

.game-card__best.has-best::before {
  content: '★ ';
  color: var(--game-accent);
}

[data-theme="light"] .game-card__best.has-best::before {
  color: color-mix(in srgb, var(--game-accent) 75%, #000);
}

.game-card__play {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--game-soft);
  color: var(--ink);
  flex-shrink: 0;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
              transform var(--t-base) var(--ease-spring);
}

.game-card__play svg {
  width: 15px;
  height: 15px;
}

.game-card:hover .game-card__play {
  background: var(--game-accent);
  color: #05060D;
  transform: translateX(3px) scale(1.08);
}

@media (max-width: 800px) {
  .game-card { padding: 7px; border-radius: var(--r-md); }
  .game-card__screen { border-radius: calc(var(--r-md) - 4px); }
  .game-card__meta { padding: 10px 5px 4px; }
  .game-card__title { font-size: 0.98rem; }
  .game-card__tagline { font-size: 0.78rem; }
  .game-card__play { width: 28px; height: 28px; }
}

@media (max-width: 380px) {
  .game-card__tagline { display: none; }
}

/* ===========================================================================
   PREVIEWS — a CSS miniature of each game. Pure decoration; aria-hidden.
   Everything is sized in % of the little screen so it scales with the card.
   =========================================================================== */
.pv {
  position: absolute;
  inset: 0;
  display: block;
}

.pv i,
.pv b,
.pv em,
.pv span {
  display: block;
  position: absolute;
  font-style: normal;
}

/* --- Reaction: five lights come on, then all go out --- */
.pv-reaction {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pv-reaction .gantry {
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 3.2cqw;
  padding: 3.6cqw 4.4cqw;
  border-radius: 3.5cqw;
  background: #0B0D14;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 6px 20px rgba(0, 0, 0, 0.5);
}

.pv-reaction .gantry i {
  position: relative;
  width: 9.5cqw;
  height: 9.5cqw;
  border-radius: 50%;
  background: #1C1F2A;
  animation-duration: 3.4s;
  animation-timing-function: steps(1);
  animation-iteration-count: infinite;
}

/* One keyframe set per light so they come on in turn and all go out together. */
.pv-reaction .gantry i:nth-child(1) { animation-name: pv-light-1; animation-delay: 0s; }
.pv-reaction .gantry i:nth-child(2) { animation-name: pv-light-2; animation-delay: 0s; }
.pv-reaction .gantry i:nth-child(3) { animation-name: pv-light-3; animation-delay: 0s; }
.pv-reaction .gantry i:nth-child(4) { animation-name: pv-light-4; animation-delay: 0s; }
.pv-reaction .gantry i:nth-child(5) { animation-name: pv-light-5; animation-delay: 0s; }

@keyframes pv-light-1 { 0%, 8% { background: #1C1F2A; box-shadow: none; } 10%, 70% { background: #FF2B3E; box-shadow: 0 0 12px #FF2B3E; } 72%, 100% { background: #1C1F2A; box-shadow: none; } }
@keyframes pv-light-2 { 0%, 20% { background: #1C1F2A; box-shadow: none; } 22%, 70% { background: #FF2B3E; box-shadow: 0 0 12px #FF2B3E; } 72%, 100% { background: #1C1F2A; box-shadow: none; } }
@keyframes pv-light-3 { 0%, 32% { background: #1C1F2A; box-shadow: none; } 34%, 70% { background: #FF2B3E; box-shadow: 0 0 12px #FF2B3E; } 72%, 100% { background: #1C1F2A; box-shadow: none; } }
@keyframes pv-light-4 { 0%, 44% { background: #1C1F2A; box-shadow: none; } 46%, 70% { background: #FF2B3E; box-shadow: 0 0 12px #FF2B3E; } 72%, 100% { background: #1C1F2A; box-shadow: none; } }
@keyframes pv-light-5 { 0%, 56% { background: #1C1F2A; box-shadow: none; } 58%, 70% { background: #FF2B3E; box-shadow: 0 0 12px #FF2B3E; } 72%, 100% { background: #1C1F2A; box-shadow: none; } }

.pv-reaction .go {
  left: 0;
  right: 0;
  bottom: 12%;
  text-align: center;
  font-family: var(--font-display);
  font-size: 5cqw;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: #fff;
  opacity: 0;
  animation: pv-go 3.4s steps(1) infinite;
}

@keyframes pv-go { 0%, 71% { opacity: 0; } 72%, 92% { opacity: 1; } 93%, 100% { opacity: 0; } }

/* --- Keyboard: a combo being pressed --- */
.pv-keyboard {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pv-keyboard .combo {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pv-keyboard .combo b {
  position: relative;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: #EEF1FF;
  background: linear-gradient(180deg, #2A2F45, #1A1E30);
  border-radius: 7px;
  box-shadow: 0 4px 0 #0B0D16, inset 0 1px 0 rgba(255, 255, 255, 0.12);
  animation: pv-key 2.2s var(--ease) infinite;
}

.pv-keyboard .combo b:nth-of-type(2) { animation-delay: 0.12s; }
.pv-keyboard .combo em {
  position: relative;
  color: var(--arena-ink-3);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

@keyframes pv-key {
  0%, 30% { transform: translateY(0); box-shadow: 0 4px 0 #0B0D16, inset 0 1px 0 rgba(255, 255, 255, 0.12); }
  38%, 58% { transform: translateY(4px); box-shadow: 0 0 0 #0B0D16, 0 0 18px var(--game-keyboard); background: var(--game-keyboard); color: #05060D; }
  70%, 100% { transform: translateY(0); }
}

.pv-keyboard .label {
  left: 0;
  right: 0;
  bottom: 14%;
  text-align: center;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--arena-ink-2);
}

/* --- Bug hunt: code lines, one token blinks red then green --- */
.pv-bughunt {
  padding: 12% 10%;
}

.pv-bughunt i {
  position: relative;
  height: 6%;
  margin-bottom: 5.5%;
  border-radius: 3px;
  background: rgba(130, 170, 255, 0.35);
}

.pv-bughunt i:nth-child(1) { width: 52%; background: rgba(199, 146, 234, 0.45); }
.pv-bughunt i:nth-child(2) { width: 70%; margin-left: 8%; }
.pv-bughunt i:nth-child(3) { width: 38%; margin-left: 16%; background: rgba(195, 232, 141, 0.4); }
.pv-bughunt i:nth-child(4) { width: 60%; margin-left: 8%; }
.pv-bughunt i:nth-child(5) { width: 30%; }

.pv-bughunt b {
  left: 46%;
  top: 41%;
  width: 16%;
  height: 10%;
  border-radius: 4px;
  animation: pv-bug 2.8s ease-in-out infinite;
}

@keyframes pv-bug {
  0%, 40% { background: rgba(255, 84, 104, 0.25); box-shadow: 0 0 0 1px rgba(255, 84, 104, 0.6); }
  48%, 80% { background: rgba(59, 240, 160, 0.4); box-shadow: 0 0 14px rgba(59, 240, 160, 0.7); }
  90%, 100% { background: rgba(255, 84, 104, 0.25); box-shadow: 0 0 0 1px rgba(255, 84, 104, 0.6); }
}

/* --- Typing: words fall toward a turret --- */
.pv-typing span {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  color: #EEF1FF;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255, 154, 60, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 154, 60, 0.4);
  animation: pv-fall 3.6s linear infinite;
  top: -12%;
}

.pv-typing span:nth-child(1) { left: 12%; animation-delay: -0.4s; }
.pv-typing span:nth-child(2) { left: 52%; animation-delay: -1.6s; }
.pv-typing span:nth-child(3) { left: 30%; animation-delay: -2.8s; }

@keyframes pv-fall {
  0% { transform: translateY(0); opacity: 0; }
  10% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(560%); opacity: 0; }
}

.pv-typing b {
  left: 50%;
  bottom: 6%;
  width: 18px;
  height: 12px;
  margin-left: -9px;
  border-radius: 9px 9px 2px 2px;
  background: var(--game-typing);
  box-shadow: 0 0 14px var(--game-typing);
}

.pv-typing em {
  left: 0;
  right: 0;
  bottom: 4%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 154, 60, 0.7), transparent);
}

/* --- Rhythm: a perspective highway --- */
.pv-rhythm .road {
  left: 18%;
  right: 18%;
  top: -10%;
  bottom: 0;
  display: flex;
  transform: perspective(160px) rotateX(38deg);
  transform-origin: bottom;
  background: linear-gradient(180deg, transparent, rgba(166, 107, 255, 0.18));
}

.pv-rhythm .road i {
  position: relative;
  flex: 1;
  border-left: 1px solid rgba(166, 107, 255, 0.35);
}

.pv-rhythm .road i:last-child {
  border-right: 1px solid rgba(166, 107, 255, 0.35);
}

.pv-rhythm .road i::after {
  content: '';
  position: absolute;
  left: 15%;
  right: 15%;
  height: 7%;
  border-radius: 4px;
  background: var(--game-rhythm);
  box-shadow: 0 0 10px var(--game-rhythm);
  animation: pv-note 1.6s linear infinite;
  animation-delay: calc(var(--n) * -0.4s);
}

@keyframes pv-note {
  from { top: -10%; }
  to { top: 100%; }
}

.pv-rhythm .bar {
  left: 14%;
  right: 14%;
  bottom: 14%;
  height: 2px;
  background: #fff;
  box-shadow: 0 0 12px var(--game-rhythm), 0 0 24px var(--game-rhythm);
}

/* --- Aim: targets popping --- */
.pv-aim i {
  width: 22%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 14%, var(--game-aim) 15% 34%, transparent 35% 50%, rgba(46, 216, 255, 0.5) 51% 66%, transparent 67%);
  box-shadow: 0 0 18px rgba(46, 216, 255, 0.6);
  animation: pv-pop 2.4s var(--ease) infinite;
}

.pv-aim i:nth-child(1) { left: 16%; top: 22%; }
.pv-aim i:nth-child(2) { left: 58%; top: 46%; animation-delay: -0.8s; }
.pv-aim i:nth-child(3) { left: 38%; top: 10%; animation-delay: -1.6s; width: 15%; }

@keyframes pv-pop {
  0% { transform: scale(0); opacity: 0; }
  12% { transform: scale(1); opacity: 1; }
  55% { transform: scale(0.8); opacity: 1; }
  62% { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}

.pv-aim b {
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  animation: pv-cross 2.4s var(--ease) infinite;
}

.pv-aim b::before,
.pv-aim b::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.8);
}

.pv-aim b::before { left: 50%; top: -6px; bottom: -6px; width: 1.5px; margin-left: -0.75px; }
.pv-aim b::after { top: 50%; left: -6px; right: -6px; height: 1.5px; margin-top: -0.75px; }

@keyframes pv-cross {
  0%, 10% { transform: translate(-80%, -60%); }
  30%, 45% { transform: translate(-120%, -110%); }
  60%, 75% { transform: translate(90%, 40%); }
  90%, 100% { transform: translate(-80%, -60%); }
}

/* --- Trading: candles stepping up --- */
.pv-trading {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4%;
  padding: 10% 12% 16%;
}

.pv-trading i {
  position: relative;
  width: 7%;
  border-radius: 2px;
  background: var(--arena-good);
  box-shadow: 0 0 10px rgba(59, 240, 160, 0.5);
  animation: pv-candle 2.6s var(--ease) infinite alternate;
  animation-delay: calc(var(--n) * 0.12s);
}

.pv-trading i::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -18%;
  bottom: -18%;
  width: 1px;
  background: inherit;
}

.pv-trading i.dn {
  background: var(--arena-bad);
  box-shadow: 0 0 10px rgba(255, 84, 104, 0.5);
}

@keyframes pv-candle {
  from { height: calc(var(--h) * 0.75); }
  to { height: var(--h); }
}

.pv-trading b {
  left: 8%;
  right: 8%;
  top: 30%;
  height: 0;
  border-top: 1px dashed rgba(46, 230, 166, 0.6);
}

/* --- Platformer: a pixel hero hops a spike --- */
.pv-platformer .ground {
  left: 0;
  right: 0;
  bottom: 0;
  height: 20%;
  background:
    repeating-linear-gradient(90deg, #2B2F4A 0 18px, #33385A 18px 20px),
    #2B2F4A;
  box-shadow: inset 0 3px 0 #4B5280;
}

.pv-platformer .spike {
  bottom: 20%;
  left: 52%;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 14px solid #FF5468;
  filter: drop-shadow(0 0 6px rgba(255, 84, 104, 0.8));
}

.pv-platformer .dude {
  bottom: 20%;
  left: 14%;
  width: 14px;
  height: 18px;
  background: var(--game-platformer);
  box-shadow: inset 0 5px 0 #F3E4D8, 0 0 12px rgba(255, 212, 71, 0.6);
  animation: pv-run 2.4s linear infinite, pv-hop 2.4s var(--ease) infinite;
}

@keyframes pv-run {
  from { left: 10%; }
  to { left: 86%; }
}

@keyframes pv-hop {
  0%, 40% { transform: translateY(0); }
  52% { transform: translateY(-260%); }
  64%, 100% { transform: translateY(0); }
}

.pv-platformer .trophy {
  right: 8%;
  top: 22%;
  width: 14px;
  height: 14px;
  border-radius: 0 0 7px 7px;
  background: #FFD447;
  box-shadow: 0 0 14px #FFD447;
  animation: pv-bob 1.4s ease-in-out infinite alternate;
}

@keyframes pv-bob {
  to { transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  .pv *, .pv *::before, .pv *::after {
    animation: none !important;
  }
}

/* ===========================
   Phones: the hero tightens up
   =========================== */
@media (max-width: 520px) {
  .hero { padding-top: calc(var(--nav-h) + 44px + var(--safe-top)); padding-bottom: 30px; }
  .kicker-extra { display: none; }
  .hero-stats { flex-wrap: nowrap; width: 100%; gap: 6px; margin-top: 24px; }
  .hero-stat { flex: 1; min-width: 0; padding: 9px 6px; }
  .hero-stat b { font-size: 1.15rem; }
  .hero-stat span { font-size: 0.58rem; letter-spacing: 0.06em; text-align: center; }
  .hero-note { font-size: 0.8rem; }
}
