/* Games hub */
.games-intro { padding: 10px 0 6px; }
.games-intro h1 {
  margin: 0 0 6px; font-family: var(--display); font-size: clamp(2rem, 6vw, 3rem); font-weight: 650; letter-spacing: -0.03em;
}
.games-intro p { margin: 0; color: var(--muted); max-width: 34rem; }
.games-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin: 22px 0 56px;
}
.game-card {
  display: flex; flex-direction: column; overflow: hidden; border-radius: 26px;
  background: var(--card); border: 1.5px solid var(--line); box-shadow: var(--shadow);
  transition: transform 0.3s var(--spring), box-shadow 0.3s var(--ease);
}
a.game-card:hover { transform: translateY(-4px) rotate(-0.4deg); }
a.game-card:active { transform: scale(0.98); }
a.game-card:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.game-art { display: block; aspect-ratio: 4 / 3; background: var(--bg-soft); overflow: hidden; }
.game-art svg { width: 100%; height: 100%; display: block; }
.ga-bg { fill: var(--bg-soft); }
.ga-n { fill: #fff; font: 700 17px "Fredoka", sans-serif; text-anchor: middle; }
.ga-slot { fill: var(--line); opacity: .7; }
.ga-ball { animation: ga-bob 1.6s ease-in-out infinite; transform-box: fill-box; }
@keyframes ga-bob { 50% { transform: translateY(-10px); } }
.game-info { display: flex; flex-direction: column; gap: 6px; padding: 16px 20px 20px; }
.game-tag {
  align-self: flex-start; padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 800;
  background: var(--games-soft); color: var(--games);
}
.game-name { font-family: var(--display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; color: var(--ink); }
.game-desc { color: var(--muted); font-size: 0.95rem; line-height: 1.45; }
.game-play {
  align-self: flex-start; margin-top: 8px; padding: 8px 18px; border-radius: 999px;
  background: var(--brand); color: #fff; font-weight: 800; box-shadow: 0 8px 18px rgba(107, 77, 255, 0.28);
}
.game-soon { justify-content: center; min-height: 180px; border-style: dashed; box-shadow: none; background: transparent; }
.game-soon .game-name { font-size: 1.2rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .ga-ball { animation: none; } }

/* Accounts + leaderboards on the hub */
.games-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.games-intro-text { min-width: 0; }
.games-acct[hidden] { display: none; }
.game-card .game-art { display: block; }
.game-card:hover .game-art svg { transform: scale(1.03); }
.game-art svg { transition: transform 0.4s var(--spring); }
a.game-name { color: var(--ink); text-decoration: none; }
a.game-name:hover { color: var(--brand); }
.game-progress { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 800; font-size: 0.85rem; }
.game-progress[hidden], .game-top[hidden], .game-lb[hidden] { display: none; }
.game-bar { flex: 0 0 90px; height: 8px; border-radius: 99px; background: var(--bg-soft); border: 1px solid var(--line); overflow: hidden; }
.game-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--games), var(--hardware)); }
.game-top { margin-top: 4px; padding: 10px 12px; border-radius: 18px; background: var(--bg-soft); border: 1.5px solid var(--line); }
.game-top-h { display: block; font: 700 0.8rem var(--display); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 6px; }
.game-top-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.game-top-list li { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 0.92rem; }
.game-top-list li.me .game-top-n { color: var(--brand); }
.game-top-r { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 700 0.78rem var(--display); color: #fff; background: var(--muted); flex: none; }
.game-top-r.r1 { background: linear-gradient(135deg, #ffd24d, #ff9f1a); }
.game-top-r.r2 { background: linear-gradient(135deg, #c9d2e6, #8f9bb8); }
.game-top-r.r3 { background: linear-gradient(135deg, #ffb27a, #d9773a); }
.game-top-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-top-s { font-family: var(--display); font-variant-numeric: tabular-nums; }
.game-top-empty { color: var(--muted); font-weight: 700; }
.game-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.game-actions .game-play { margin-top: 0; text-decoration: none; }
.game-lb {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px 7px 10px; border-radius: 999px; cursor: pointer;
  background: var(--chip); color: var(--ink); border: 1.5px solid var(--line); font: 800 0.95rem var(--sans);
}
.game-lb svg { width: 18px; height: 18px; color: #f0a020; }
.game-lb:focus-visible, .game-play:focus-visible, a.game-name:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
