/* ============================================================
   VEXONA FAMILY GAME HUB — hub.css
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --font: 'Outfit', system-ui, sans-serif;
  --bg: #060c1a;
  --surface: rgba(255,255,255,0.045);
  --border: rgba(255,255,255,0.1);
  --text: #e8eef8;
  --muted: rgba(200,215,240,0.55);
  --accent-blue: #3b9eff;
  --accent-red: #ff4d4d;
  --accent-gold: #ffd060;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- Animated star bg ---- */
#starCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ---- Layout ---- */
.back-to-bodee {
  position: absolute;
  top: 24px;
  left: 32px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
  z-index: 10;
}
.back-to-bodee:hover {
  color: var(--accent-blue);
}

.hub-layout {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 32px 64px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* ---- Header ---- */
.hub-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.hub-logo {
  display: flex;
  align-items: center;
  gap: 20px;
}

.hub-logo-icon {
  font-size: 3.5rem;
  filter: drop-shadow(0 0 24px rgba(100,160,255,0.6));
  animation: floatIcon 3.6s ease-in-out infinite;
}

@keyframes floatIcon {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

.hub-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 4px;
}

.hub-title {
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 10%, #88c0ff 60%, #c3b1ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hub-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  font-weight: 400;
}

/* ---- Game Grid ---- */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

/* ---- Game Card ---- */
.game-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.22s ease,
              border-color 0.22s ease;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

.game-card:not(.game-card--locked):hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

/* Blue glow (sky typer) */
.game-card:hover .card-glow--blue { opacity: 1; }
.game-card:hover .card-glow--red  { opacity: 1; }
.game-card:hover .card-glow--gold { opacity: 1; }
.game-card:hover .card-glow--pink { opacity: 1; }
.game-card:hover .card-glow--harvest { opacity: 1; }
.game-card:hover .card-glow--cyan { opacity: 1; }
.game-card:hover .card-glow--orange { opacity: 1; }
.game-card:hover .card-glow--purple { opacity: 1; }
.game-card:hover .card-glow--green { opacity: 1; }

.card-glow {
  position: absolute;
  inset: -1px;
  border-radius: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 0;
}
.card-glow--blue {
  box-shadow: inset 0 0 0 2px rgba(59,158,255,0.7), 0 0 40px rgba(59,158,255,0.25);
  border: 2px solid rgba(59,158,255,0.7);
}
.card-glow--red {
  box-shadow: inset 0 0 0 2px rgba(255,77,77,0.7), 0 0 40px rgba(255,77,77,0.25);
  border: 2px solid rgba(255,77,77,0.7);
}
.card-glow--gold {
  box-shadow: inset 0 0 0 2px rgba(255,208,96,0.7), 0 0 40px rgba(255,208,96,0.25);
  border: 2px solid rgba(255,208,96,0.7);
}
.card-glow--pink {
  box-shadow: inset 0 0 0 2px rgba(255,77,184,0.7), 0 0 40px rgba(255,77,184,0.25);
  border: 2px solid rgba(255,77,184,0.7);
}
.card-glow--harvest {
  box-shadow: inset 0 0 0 2px rgba(245,158,11,0.75), 0 0 42px rgba(34,197,94,0.24);
  border: 2px solid rgba(245,158,11,0.72);
}
.card-glow--cyan {
  box-shadow: inset 0 0 0 2px rgba(6,182,212,0.7), 0 0 40px rgba(6,182,212,0.25);
  border: 2px solid rgba(6,182,212,0.7);
}
.card-glow--orange {
  box-shadow: inset 0 0 0 2px rgba(249,115,22,0.7), 0 0 40px rgba(249,115,22,0.25);
  border: 2px solid rgba(249,115,22,0.7);
}
.card-glow--purple {
  box-shadow: inset 0 0 0 2px rgba(168,85,247,0.7), 0 0 40px rgba(168,85,247,0.25);
  border: 2px solid rgba(168,85,247,0.7);
}
.card-glow--green {
  box-shadow: inset 0 0 0 2px rgba(74,222,128,0.7), 0 0 40px rgba(74,222,128,0.25);
  border: 2px solid rgba(74,222,128,0.7);
}

.game-card--locked {
  opacity: 0.45;
  cursor: default;
}

/* ---- Card Art Area ---- */
.card-art {
  height: 190px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

/* Sky art */
.card-art--sky {
  background: linear-gradient(180deg, #3b82f6 0%, #60a5fa 55%, #bae6fd 100%);
  overflow: hidden;
}
.card-art--sky::before, .card-art--sky::after {
  content: '';
  position: absolute;
  background: #fff;
  border-radius: 50px;
  opacity: 0.6;
}
.card-art--sky::before {
  top: 20%; left: -50px;
  width: 60px; height: 20px;
  box-shadow: 20px -10px 0 10px #fff, 40px 0 0 5px #fff;
  animation: cloudDrift 20s linear infinite;
}
.card-art--sky::after {
  top: 50%; right: -80px;
  width: 80px; height: 25px;
  box-shadow: 30px -15px 0 15px #fff, 60px -5px 0 10px #fff;
  animation: cloudDrift 25s linear infinite 5s backwards;
}
@keyframes cloudDrift {
  from { transform: translateX(-150px); }
  to { transform: translateX(350px); }
}

.art-plane {
  position: absolute;
  width: 44px;
  height: 14px;
  border-radius: 40% 60% 60% 40% / 50%;
}
.art-plane::before {
  content: '';
  position: absolute;
  top: -6px; left: 16px;
  width: 14px; height: 26px;
  border-radius: 4px;
  z-index: -1;
}
.art-plane::after {
  content: '';
  position: absolute;
  top: -8px; left: 4px;
  width: 10px; height: 12px;
  border-radius: 4px;
}

.art-plane--player {
  background: #1d4ed8;
  left: 28%;
  top: 50%;
  transform: translateY(-50%);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  animation: planeBob 2.2s ease-in-out infinite;
}
.art-plane--player::before { background: #3b82f6; }
.art-plane--player::after { background: #1e40af; }
.art-plane-cockpit {
  position: absolute;
  top: -3px; right: 12px;
  width: 12px; height: 6px;
  border-radius: 6px 6px 0 0;
}
.art-plane--player .art-plane-cockpit { background: #bfdbfe; }

.art-plane--enemy {
  background: #b91c1c;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transform: scaleX(-1) translateY(-50%);
}
.art-plane--enemy::before { background: #ef4444; }
.art-plane--enemy::after { background: #991b1b; }
.art-plane--enemy .art-plane-cockpit { background: #fca5a5; }

.art-plane--enemy1 {
  right: 12%;
  top: 30%;
  width: 36px;
  height: 12px;
  animation: planeBob 1.9s ease-in-out infinite 0.4s;
}
.art-plane--enemy1::before { width: 12px; height: 22px; top: -5px; left: 12px; }
.art-plane--enemy1::after { width: 8px; height: 10px; top: -6px; left: 3px; }

.art-plane--enemy2 {
  right: 18%;
  top: 65%;
  width: 32px;
  height: 10px;
  animation: planeBob 2.5s ease-in-out infinite 0.9s;
}
.art-plane--enemy2::before { width: 10px; height: 18px; top: -4px; left: 10px; }
.art-plane--enemy2::after { width: 6px; height: 8px; top: -5px; left: 2px; }

@keyframes planeBob {
  0%,100% { margin-top: 0; }
  50%      { margin-top: -6px; }
}

.art-word {
  position: absolute;
  right: 26%;
  top: 38%;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 8px;
  padding: 3px 10px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.1em;
  backdrop-filter: blur(4px);
}

/* Race art */
.card-art--race {
  background: linear-gradient(180deg, #1a3a1a 0%, #2d6622 60%, #3a8022 100%);
}

.art-track {
  position: absolute;
  width: 200px;
  height: 120px;
  border: 14px solid #444;
  border-radius: 50%;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5), 0 0 20px rgba(0,0,0,0.4);
}

.art-car {
  position: absolute;
  width: 22px;
  height: 12px;
  border-radius: 4px 8px 8px 4px;
}

.art-car--1 { background: #e84040; top: 30%; left: 50%; animation: carOrbit 3s linear infinite; }
.art-car--2 { background: #2e9bf0; top: 30%; left: 50%; animation: carOrbit 3s linear infinite 1s; }
.art-car--3 { background: #2ec97a; top: 30%; left: 50%; animation: carOrbit 3s linear infinite 2s; }

@keyframes carOrbit {
  from { transform: rotate(0deg) translateX(80px) rotate(90deg); }
  to   { transform: rotate(360deg) translateX(80px) rotate(90deg); }
}

/* Bridge art */
.card-art--bridge {
  background: linear-gradient(180deg, #101827 0%, #1e293b 60%, #0f172a 100%);
}
.art-bridge-line {
  position: absolute;
  top: 55%;
  left: -10%;
  width: 120%;
  height: 8px;
  background: #334155;
  border-top: 2px dashed #94a3b8;
  transform: rotate(-2deg);
}
.art-bridge-truck {
  position: absolute;
  top: 40%;
  left: 20%;
  width: 30px;
  height: 20px;
  background: #f5a623;
  border-radius: 4px;
  animation: truckDrive 3s ease-in-out infinite alternate;
}
.art-bridge-truck::after {
  content: ''; position: absolute; bottom: -4px; left: 2px; width: 8px; height: 8px; background: #111; border-radius: 50%; box-shadow: 18px 0 0 #111;
}

@keyframes truckDrive {
  from { transform: translateX(0) rotate(-2deg); }
  to   { transform: translateX(120px) rotate(-2deg); }
}

/* Runner art — platformer scene */
.card-art--runner {
  background: #6eb7f8;
  position: relative;
  overflow: hidden;
}
.art-runner-sky {
  position: absolute; top: 0; left: 0; right: 0; bottom: 24px;
}
.art-runner-ground {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 24px;
  background: #7c2d12;
  border-top: 6px solid #4ade80;
}
.art-runner-house {
  position: absolute;
  left: 20px;
  bottom: 24px;
  width: 90px;
  height: 80px;
}
.art-house-roof {
  position: absolute;
  top: 0; left: -10px; right: -10px; height: 35px;
  background: #b45309;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}
.art-house-base {
  position: absolute;
  bottom: 0; left: 0; right: 0; top: 35px;
  background: #f8fafc;
  border-radius: 4px;
}
.art-house-door {
  position: absolute;
  bottom: 0; left: 35px; width: 20px; height: 25px;
  background: #7c2d12;
  border-radius: 4px 4px 0 0;
}
.art-house-window {
  position: absolute;
  top: 45px; left: 10px; width: 16px; height: 16px;
  background: #e0f2fe; border: 2px solid #7c2d12;
}

.art-runner-char {
  position: absolute;
  left: 140px;
  bottom: 24px;
  width: 32px;
  height: 48px;
  animation: runBounce 0.4s infinite alternate ease-in-out;
  z-index: 5;
}
@keyframes runBounce {
  from { transform: translateY(0); }
  to { transform: translateY(-4px); }
}

.art-runner-head {
  position: absolute;
  top: 0; left: 6px;
  width: 20px; height: 20px;
  background: #f4c28b;
  border-radius: 50%;
  z-index: 3;
}
.art-runner-hat {
  position: absolute;
  top: -4px; left: -4px; width: 28px; height: 10px;
  background: #eab308;
  border-radius: 10px 10px 4px 4px;
}
.art-runner-body {
  position: absolute;
  top: 18px; left: 8px; width: 16px; height: 18px;
  background: #2563eb;
  border-radius: 4px;
  z-index: 2;
}
.art-runner-body::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 8px;
  background: #ef4444;
  border-radius: 4px 4px 0 0;
}
.art-runner-arm-back, .art-runner-arm-front {
  position: absolute;
  top: 20px;
  width: 6px; height: 16px;
  background: #ef4444;
  border-radius: 3px;
  transform-origin: top center;
}
.art-runner-arm-back {
  left: 6px; z-index: 1; filter: brightness(0.7);
  animation: swingBack 0.8s infinite alternate ease-in-out;
}
.art-runner-arm-front {
  left: 20px; z-index: 4;
  animation: swingFront 0.8s infinite alternate ease-in-out;
}
.art-runner-leg-back, .art-runner-leg-front {
  position: absolute;
  top: 32px;
  width: 6px; height: 16px;
  background: #2563eb;
  border-radius: 3px;
  transform-origin: top center;
}
.art-runner-leg-back {
  left: 10px; z-index: 1; filter: brightness(0.7);
  animation: swingFront 0.8s infinite alternate ease-in-out;
}
.art-runner-leg-front {
  left: 16px; z-index: 2;
  animation: swingBack 0.8s infinite alternate ease-in-out;
}
.art-runner-leg-back::after, .art-runner-leg-front::after {
  content: ''; position: absolute; bottom: -2px; left: 0; width: 8px; height: 5px; background: #111; border-radius: 2px;
}

@keyframes swingFront {
  from { transform: rotate(35deg); }
  to { transform: rotate(-35deg); }
}
@keyframes swingBack {
  from { transform: rotate(-35deg); }
  to { transform: rotate(35deg); }
}

.art-runner-gate {
  position: absolute;
  right: 55px;
  bottom: 50px;
  display: flex; gap: 8px;
  z-index: 2;
}
.art-runner-tile {
  width: 32px; height: 32px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 900;
  color: #fff; letter-spacing: 0.03em;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: 2px solid #fbbf24;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  animation: floatBlock 2.2s ease-in-out infinite;
}
.art-runner-tile.wrong { background: linear-gradient(135deg, #334155, #1e293b); border-color:#475569; }

/* Enemy blob */
.art-runner-enemy {
  position: absolute;
  bottom: 24px; right: 10px;
  width: 22px; height: 20px;
  background: #f87171;
  border-radius: 50% 50% 40% 40%;
  box-shadow: 0 3px 8px rgba(248,113,113,0.5);
  animation: enemyBob 1s ease-in-out infinite alternate;
  z-index: 2;
}
.art-runner-enemy::before {
  content: '👀';
  position: absolute;
  top: 1px; left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
}
@keyframes enemyBob {
  from { transform: translateY(0) scaleY(1); }
  to   { transform: translateY(-4px) scaleY(1.05); }
}
@keyframes floatBlock {
  from, to { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

/* ---- Abrams Tank Assault Card ---- */
.card-art--tank {
  background: linear-gradient(180deg, #78716c 0%, #44403c 70%, #292524 100%);
}
.art-tank-body {
  position: absolute;
  top: 55%; left: 50%;
  transform: translate(-50%, -50%);
  width: 70px; height: 40px;
  background: #4d7c0f;
  border-radius: 8px;
  border-bottom: 8px solid #1c1917; /* treads */
  box-shadow: inset 0 4px 0 rgba(255,255,255,0.2), 0 10px 20px rgba(0,0,0,0.5);
  animation: tankRumble 0.1s infinite alternate;
}
.art-tank-turret {
  position: absolute;
  top: -12px; left: 15px;
  width: 34px; height: 18px;
  background: #3f6212;
  border-radius: 6px 6px 0 0;
}
.art-tank-barrel {
  position: absolute;
  top: 4px; left: 30px;
  width: 45px; height: 6px;
  background: #292524;
  border-radius: 0 3px 3px 0;
  animation: barrelRecoil 2s infinite;
}
.art-tank-muzzle {
  position: absolute;
  top: 0; right: 0;
  width: 8px; height: 10px;
  background: #1c1917;
  transform: translateY(-2px);
}
.art-tank-blast {
  position: absolute;
  top: -5px; right: -30px;
  width: 20px; height: 20px;
  background: #fef08a;
  border-radius: 50%;
  box-shadow: 0 0 20px #f59e0b, inset 0 0 10px #ea580c;
  animation: blastFlash 2s infinite;
  opacity: 0;
}
.art-tank-ground {
  position: absolute;
  bottom: 0; left: 0; width: 100%; height: 20px;
  background: #292524;
}
@keyframes tankRumble {
  from { transform: translate(-50%, -50%) translateY(0); }
  to { transform: translate(-50%, -50%) translateY(1px); }
}
@keyframes barrelRecoil {
  0%, 90% { transform: translateX(0); }
  95% { transform: translateX(-8px); }
  100% { transform: translateX(0); }
}
@keyframes blastFlash {
  0%, 90% { opacity: 0; transform: scale(0.5); }
  95% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0; transform: scale(1); }
}

/* Tower art */
.card-art--tower {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 60%, #083344 100%);
}
.art-tower-base {
  position: absolute;
  bottom: 20%; left: 50%; transform: translateX(-50%);
  width: 80px; height: 10px; background: #334155; border-radius: 2px;
}
.art-tower-block {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  width: 40px; height: 24px;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.art-tower-block.block-1 { bottom: calc(20% + 10px); background: #06b6d4; }
.art-tower-block.block-2 { bottom: calc(20% + 36px); background: #0ea5e9; }
.art-tower-block.block-3 { bottom: calc(20% + 62px); background: #3b82f6; animation: floatBlock 2s ease-in-out infinite; }

/* Spelling art */
.card-art--spelling {
  background: linear-gradient(180deg, #1e1b4b 0%, #4c1d95 60%, #78350f 100%);
}
.art-podium {
  position: absolute; bottom: 0; left: 50%; width: 70px; height: 50px;
  background: linear-gradient(180deg, #b45309, #78350f);
  transform: translateX(-50%); border-radius: 4px 4px 0 0;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.2);
}
.art-mic {
  position: absolute; bottom: 50px; left: 50%;
  width: 4px; height: 28px; background: #94a3b8; transform: translateX(-50%);
}
.art-mic::after {
  content: ''; position: absolute; top: -14px; left: -7px;
  width: 18px; height: 18px; background: #cbd5e1; border-radius: 50%;
  box-shadow: inset -2px -2px 0 rgba(0,0,0,0.3);
}

/* Floating Words */
.art-spelling-words {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.art-word-float {
  position: absolute;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.15);
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  white-space: nowrap;
  animation: floatWordUp 6s linear infinite;
  opacity: 0;
}
.art-word-float--1 { left: 10%; bottom: -20px; animation-delay: 0s; }
.art-word-float--2 { left: 60%; bottom: -20px; animation-delay: 1.5s; font-size: 1rem; color: rgba(255,200,100, 0.15); }
.art-word-float--3 { left: 5%; bottom: -20px; animation-delay: 3s; font-size: 1.4rem; color: rgba(255,255,255, 0.1); }
.art-word-float--4 { left: 50%; bottom: -20px; animation-delay: 4.5s; font-size: 1.1rem; }

@keyframes floatWordUp {
  0%   { transform: translateY(0) scale(0.8); opacity: 0; }
  10%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(-120px) scale(1.1); opacity: 0; }
}

/* Math Race art */
.card-art--mathrace {
  background: linear-gradient(180deg, #1f1235 0%, #46237a 60%, #6b21a8 100%);
}
.art-race-number {
  position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 64px; font-weight: 900; color: #fff;
  text-shadow: 0 0 20px rgba(255,255,255,0.5);
  animation: pulseNum 1.5s infinite alternate;
}
.art-race-buzz {
  position: absolute;
  width: 24px; height: 24px; border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.2);
}
.art-race-buzz--1 { left: 20%; bottom: 20%; background: #06b6d4; }
.art-race-buzz--2 { right: 20%; top: 20%; background: #f43f5e; }

@keyframes pulseNum {
  from { transform: translate(-50%, -50%) scale(1); }
  to { transform: translate(-50%, -50%) scale(1.1); }
}

/* Locked art */
.card-art--locked {
  background: linear-gradient(180deg, #0e1a2a, #1a2a3a);
  flex-direction: column;
  gap: 10px;
}
.locked-icon { font-size: 2.8rem; opacity: 0.5; }
.locked-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

/* ---- Card Body ---- */
.card-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  position: relative;
  z-index: 1;
}

.card-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 3px 10px;
  border-radius: 100px;
}

.badge--blue    { background: rgba(59,158,255,0.18); color: #7ec8ff; border: 1px solid rgba(59,158,255,0.3); }
.badge--red     { background: rgba(255,77,77,0.18);  color: #ff9090; border: 1px solid rgba(255,77,77,0.3); }
.badge--gold    { background: rgba(255,208,96,0.18); color: #ffd060; border: 1px solid rgba(255,208,96,0.3); }
.badge--pink    { background: rgba(255,77,184,0.18); color: #ff90d2; border: 1px solid rgba(255,77,184,0.3); }
.badge--harvest { background: rgba(245,158,11,0.18); color: #fcd34d; border: 1px solid rgba(245,158,11,0.35); }
.badge--cyan    { background: rgba(6,182,212,0.18); color: #22d3ee; border: 1px solid rgba(6,182,212,0.3); }
.badge--orange  { background: rgba(249,115,22,0.18); color: #fdba74; border: 1px solid rgba(249,115,22,0.3); }
.badge--purple  { background: rgba(168,85,247,0.18); color: #d8b4fe; border: 1px solid rgba(168,85,247,0.3); }
.badge--green   { background: rgba(74,222,128,0.18); color: #86efac; border: 1px solid rgba(74,222,128,0.3); }
.badge--api     { background: rgba(168,85,247,0.18); color: #d8b4fe; border: 1px solid rgba(168,85,247,0.3); }
.badge--players { background: rgba(255,208,96,0.14); color: #ffd060; border: 1px solid rgba(255,208,96,0.3); }
.badge--dim     { background: rgba(255,255,255,0.07); color: var(--muted); border: 1px solid var(--border); }

.card-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.card-desc {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
  flex: 1;
}

.card-footer { margin-top: auto; padding-top: 12px; }

.card-play-btn {
  display: inline-block;
  background: linear-gradient(135deg, #2a6fe8, #5b36e8);
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 22px;
  border-radius: 100px;
  letter-spacing: 0.05em;
  transition: filter 0.18s, transform 0.18s;
}

.game-card:hover .card-play-btn {
  filter: brightness(1.15);
  transform: scale(1.04);
}

#card-racer .card-play-btn {
  background: linear-gradient(135deg, #cc2222, #e85c1a);
}

#card-bridge .card-play-btn {
  background: linear-gradient(135deg, #e0a800, #d46b08);
}

#card-runner .card-play-btn {
  background: linear-gradient(135deg, #16a34a, #f59e0b);
}

#card-tower .card-play-btn {
  background: linear-gradient(135deg, #0284c7, #06b6d4);
}

#card-spelling .card-play-btn {
  background: linear-gradient(135deg, #c2410c, #f97316);
}

#card-mathrace .card-play-btn {
  background: linear-gradient(135deg, #7e22ce, #a855f7);
}

/* Duck Hunt Duel card */
.card-art--duel {
  background: linear-gradient(180deg, #0a1e0a 0%, #143d14 55%, #1a5520 100%);
  position: relative;
  overflow: hidden;
}
.art-duck {
  font-size: 54px;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -60%);
  animation: duckFly 2s ease-in-out infinite alternate;
  filter: drop-shadow(0 4px 10px rgba(0,200,80,0.4));
}
@keyframes duckFly {
  from { transform: translate(-50%, -60%) rotate(-5deg); }
  to   { transform: translate(-50%, -70%) rotate(5deg) translateX(20px); }
}
.art-crosshair {
  position: absolute;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 3px solid;
}
.art-crosshair::before, .art-crosshair::after {
  content: ''; position: absolute;
  background: currentColor;
}
.art-crosshair::before { width: 2px; height: 14px; top: -14px; left: 50%; transform: translateX(-50%); box-shadow: 0 50px 0 currentColor; }
.art-crosshair::after  { width: 14px; height: 2px; left: -14px; top: 50%; transform: translateY(-50%); box-shadow: 50px 0 0 currentColor; }
.art-crosshair--1 { border-color: #ff4455; color: #ff4455; bottom: 28%; left: 22%; animation: chaseTarget 1.8s ease-in-out infinite; }
.art-crosshair--2 { border-color: #00ccff; color: #00ccff; bottom: 32%; right: 22%; animation: chaseTarget 1.8s ease-in-out infinite 0.4s; }
@keyframes chaseTarget {
  0%,100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(8px,-12px) scale(1.1); }
}

.card-play-btn--green {
  background: linear-gradient(135deg, #16a34a, #4ade80);
  color: #052e16;
}

/* Ramp Racer art */
.card-art--ramp {
  background: linear-gradient(180deg, #5bb8f5 0%, #87ceeb 55%, #c8e6fc 100%);
  position: relative;
  overflow: hidden;
}
.art-ramp-sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #4aa3e8 0%, #87ceeb 100%);
}
.art-ramp-plat {
  position: absolute;
  height: 28px;
  background: linear-gradient(180deg, #4caf50, #6d4c41);
  border-top: 4px solid #66bb6a;
}
.art-ramp-plat--left {
  bottom: 25%;
  left: 0;
  width: 35%;
  border-radius: 0 4px 0 0;
}
.art-ramp-plat--right {
  bottom: 25%;
  right: 0;
  width: 28%;
  border-radius: 4px 0 0 0;
}
.art-ramp-slope {
  position: absolute;
  bottom: calc(25% + 28px);
  left: 28%;
  width: 0; height: 0;
  border-left: 26px solid transparent;
  border-bottom: 30px solid #6d4c41;
  border-right: 0 solid transparent;
  filter: drop-shadow(0 -2px 0 #66bb6a);
}
.art-ramp-car {
  position: absolute;
  font-size: 28px;
  top: 32%;
  left: 45%;
  transform: rotate(-20deg);
  animation: rampCarJump 2.5s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}
@keyframes rampCarJump {
  0%   { top: 55%; left: 26%; transform: rotate(0deg); }
  20%  { top: 50%; left: 30%; transform: rotate(-15deg); }
  50%  { top: 25%; left: 50%; transform: rotate(-25deg); }
  80%  { top: 40%; left: 65%; transform: rotate(5deg); }
  100% { top: 55%; left: 26%; transform: rotate(0deg); }
}
.art-ramp-stars {
  position: absolute;
  top: 28%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  letter-spacing: 18px;
  opacity: 0.8;
  animation: rampStarPulse 2s ease-in-out infinite alternate;
}
@keyframes rampStarPulse {
  from { opacity: 0.5; transform: translateX(-50%) scale(0.9); }
  to   { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

.card-play-btn--orange {
  background: linear-gradient(135deg, #ea580c, #f97316);
}

#card-ramp .card-play-btn {
  background: linear-gradient(135deg, #ea580c, #f97316);
}

/* Nerf Arena art */
.card-art--nerf {
  background: linear-gradient(180deg, #1a0a0a 0%, #2d0f0f 55%, #1a0505 100%);
  position: relative;
  overflow: hidden;
}
.art-nerf-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, #0d0d1a 0%, #1a0a0a 100%),
    repeating-linear-gradient(90deg, rgba(255,100,30,0.03) 0px, rgba(255,100,30,0.03) 20px, transparent 20px, transparent 40px);
}
.art-nerf-gun {
  position: absolute;
  font-size: 52px;
  bottom: 8%;
  right: 10%;
  filter: drop-shadow(0 0 12px rgba(255,120,30,0.55));
  animation: gunWave 3s ease-in-out infinite;
}
@keyframes gunWave {
  0%,100% { transform: rotate(-8deg) scale(1); }
  50%      { transform: rotate(2deg) scale(1.05); }
}
.art-nerf-dart {
  position: absolute;
  width: 24px;
  height: 7px;
  border-radius: 2px 4px 4px 2px;
  background: linear-gradient(90deg, #ff8800, #ffcc00);
  box-shadow: 0 0 6px rgba(255,180,0,0.6);
}
.art-nerf-dart--1 {
  top: 38%; left: 8%;
  animation: dartFly 1.8s ease-in infinite;
}
.art-nerf-dart--2 {
  top: 55%; left: 20%;
  animation: dartFly 1.8s ease-in infinite 0.6s;
}
.art-nerf-dart--3 {
  top: 28%; left: 35%;
  animation: dartFly 1.8s ease-in infinite 1.2s;
}
@keyframes dartFly {
  0%   { transform: translateX(0) rotate(-3deg); opacity: 1; }
  100% { transform: translateX(220px) rotate(-3deg); opacity: 0; }
}
.art-nerf-target {
  position: absolute;
  font-size: 40px;
  top: 22%;
  left: 14%;
  animation: targetPop 2.2s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 8px rgba(255,60,60,0.5));
}
@keyframes targetPop {
  from { transform: scale(0.9) rotate(-5deg); }
  to   { transform: scale(1.08) rotate(3deg); }
}
#card-nerf .card-play-btn {
  background: linear-gradient(135deg, #cc2222, #e85c1a);
}

/* Chess Duel art */
.card-art--chess {
  background: linear-gradient(180deg, #1a1408 0%, #2d2210 55%, #3d2e14 100%);
  position: relative;
  overflow: hidden;
}
.art-chess-board {
  position: absolute;
  width: 120px; height: 120px;
  bottom: 10%; left: 50%; transform: translateX(-50%) perspective(300px) rotateX(35deg);
  background: repeating-conic-gradient(#d4a84c 0% 25%, #3a2e1a 0% 50%) 0 0 / 30px 30px;
  border: 2px solid rgba(255,200,80,0.3);
  border-radius: 4px;
  opacity: 0.6;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.art-chess-king {
  position: absolute;
  font-size: 52px;
  top: 20%; left: 30%;
  filter: drop-shadow(0 4px 12px rgba(255,200,80,0.5));
  animation: chessPieceBob 2.4s ease-in-out infinite;
}
.art-chess-queen {
  position: absolute;
  font-size: 44px;
  top: 26%; right: 22%;
  filter: drop-shadow(0 4px 12px rgba(255,200,80,0.4));
  animation: chessPieceBob 2.4s ease-in-out infinite 0.6s;
}
.art-chess-pawn {
  position: absolute;
  font-size: 28px;
  filter: drop-shadow(0 2px 8px rgba(255,200,80,0.3));
}
.art-chess-pawn--1 {
  bottom: 38%; left: 18%;
  animation: chessPieceBob 2s ease-in-out infinite 1s;
}
.art-chess-pawn--2 {
  bottom: 38%; right: 16%;
  animation: chessPieceBob 2s ease-in-out infinite 1.4s;
}
@keyframes chessPieceBob {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-8px); }
}
#card-chess .card-play-btn {
  background: linear-gradient(135deg, #d4a017, #b8860b);
}
.card-play-btn--gold {
  background: linear-gradient(135deg, #d4a017, #b8860b) !important;
  color: #1a1200;
}

/* Foosball Frenzy art */
.card-art--foosball {
  background: linear-gradient(180deg, #1a3a1a 0%, #2d6b2d 55%, #1e4a1e 100%);
  position: relative;
  overflow: hidden;
}
.art-foos-field {
  position: absolute;
  inset: 15% 10%;
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 4px;
}
.art-foos-center {
  position: absolute;
  width: 40px; height: 40px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 50%;
}
.art-foos-rod {
  position: absolute;
  width: 3px;
  top: 12%; bottom: 12%;
  background: rgba(180,180,180,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
}
.art-foos-rod--1 { left: 35%; animation: foosSlide 1.8s ease-in-out infinite; }
.art-foos-rod--2 { left: 62%; animation: foosSlide 2.2s ease-in-out infinite 0.5s; }
@keyframes foosSlide {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.art-foos-fig {
  width: 14px; height: 22px;
  border-radius: 3px;
}
.art-foos-fig--red { background: #e74c3c; border: 1px solid #c0392b; }
.art-foos-fig--blue { background: #3498db; border: 1px solid #2980b9; }
.art-foos-ball {
  position: absolute;
  font-size: 20px;
  top: 45%; left: 47%;
  animation: foosBall 2s ease-in-out infinite;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}
@keyframes foosBall {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(15px, -8px); }
  50% { transform: translate(-5px, 10px); }
  75% { transform: translate(-12px, -5px); }
}
#card-foosball .card-play-btn {
  background: linear-gradient(135deg, #38a169, #2f855a);
}

/* ---- 8-Ball Pool ---- */
.card-glow--teal { background: radial-gradient(circle at 50% 40%, rgba(0,200,150,0.18), transparent 70%); }
.badge--teal { background: rgba(0,200,150,0.15); color: #44ddaa; }
.card-play-btn--teal { background: linear-gradient(135deg, #00c896, #00896a); }
.card-art--pool {
  background: #2a1508;
}
.art-pool-felt {
  position: absolute; inset: 12%; border-radius: 4px;
  background: linear-gradient(135deg, #1e7a3a, #145a28);
  border: 2px solid #0e4a1e;
}
.art-pool-pocket {
  position: absolute; width: 16px; height: 16px;
  border-radius: 50%; background: #0a0a0a;
  box-shadow: 0 0 6px rgba(0,0,0,0.8);
}
.art-pool-pocket--tl { top: 10%; left: 10%; }
.art-pool-pocket--tr { top: 10%; right: 10%; }
.art-pool-pocket--bl { bottom: 10%; left: 10%; }
.art-pool-pocket--br { bottom: 10%; right: 10%; }
.art-pool-ball {
  position: absolute; width: 14px; height: 14px;
  border-radius: 50%;
  box-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}
.art-pool-ball--1 { background: #f5d800; top: 38%; left: 55%; }
.art-pool-ball--2 { background: #003db5; top: 48%; left: 60%; }
.art-pool-ball--3 { background: #d40000; top: 30%; left: 62%; }
.art-pool-ball--8 { background: #1a1a1a; top: 42%; left: 58%; box-shadow: 0 0 8px rgba(0,0,0,0.7); }
.art-pool-cue {
  position: absolute; top: 45%; left: 18%; width: 36%; height: 3px;
  background: linear-gradient(90deg, #eee 0%, #c9a84c 8%, #a67b30 80%, #2a1a0a 100%);
  border-radius: 1px;
  transform-origin: right center;
  animation: cueAim 3s ease-in-out infinite;
}
@keyframes cueAim {
  0%, 100% { transform: rotate(0deg) translateX(-5px); }
  30% { transform: rotate(-3deg) translateX(-20px); }
  35% { transform: rotate(-3deg) translateX(0); }
  60% { transform: rotate(4deg) translateX(-15px); }
  65% { transform: rotate(4deg) translateX(0); }
}

/* ---- Connect 4 ---- */
.card-art--connect4 {
  background: linear-gradient(180deg, #102a66 0%, #1a4fd6 55%, #133a9e 100%);
  position: relative;
  overflow: hidden;
}
.art-c4-board {
  position: absolute;
  width: 144px; height: 124px;
  bottom: 10%; left: 50%; transform: translateX(-50%);
  background: #1a4fd6;
  border: 3px solid #3b73ff;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  padding: 4px;
  gap: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  box-sizing: border-box;
}
.art-c4-hole {
  width: 15px; height: 15px;
  border-radius: 50%;
  background: #0f204a;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.8);
  box-sizing: border-box;
}
.art-c4-hole.red { background: #ff4d4d; box-shadow: inset 0 -2px 4px rgba(0,0,0,0.4); }
.art-c4-hole.yellow { background: #ffd060; box-shadow: inset 0 -2px 4px rgba(0,0,0,0.4); }

/* Animation for dropping pieces */
.art-c4-drop-piece {
  position: absolute;
  width: 15px; height: 15px;
  border-radius: 50%;
  left: 64px; /* Align to center hole */
  top: -20px;
  background: #ff4d4d;
  animation: c4Drop 2.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}
@keyframes c4Drop {
  0%   { transform: translateY(-30px); opacity: 1; }
  20%  { transform: translateY(40px); opacity: 1; }
  80%  { transform: translateY(40px); opacity: 1; }
  90%  { transform: translateY(40px); opacity: 0; }
  100% { transform: translateY(-30px); opacity: 0; }
}

/* ---- Footer ---- */
.hub-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

/* ---- Tiny Turbo Racers card art ---- */
.card-art--turboracer {
  background: linear-gradient(180deg, #0d1117 0%, #1a1a2e 40%, #16213e 100%);
  position: relative;
  overflow: hidden;
}

/* Animated asphalt road */
.art-tr-road {
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 55%;
  background: linear-gradient(180deg, #1c1c1c 0%, #2a2a2a 100%);
  border-top: 3px solid #555;
}

/* Center dashed lane stripes */
.art-tr-stripe {
  position: absolute;
  bottom: 22%;
  height: 6px;
  width: 50px;
  background: #ffd700;
  border-radius: 3px;
  animation: stripeScroll 0.7s linear infinite;
}
.art-tr-stripe--1 { left: 5%;  animation-delay: 0s; }
.art-tr-stripe--2 { left: 38%; animation-delay: -0.23s; }
.art-tr-stripe--3 { left: 70%; animation-delay: -0.46s; }

@keyframes stripeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-80px); }
}

/* Racing cars */
.art-tr-car {
  position: absolute;
  font-size: 34px;
  bottom: 30%;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6));
}
.art-tr-car--1 {
  left: 15%;
  animation: carRace1 2.4s ease-in-out infinite alternate;
}
.art-tr-car--2 {
  left: 50%;
  font-size: 28px;
  animation: carRace2 2.4s ease-in-out infinite alternate 0.8s;
}

@keyframes carRace1 {
  from { left: 12%; transform: translateY(0) rotate(-1deg); }
  to   { left: 30%; transform: translateY(-3px) rotate(1deg); }
}
@keyframes carRace2 {
  from { left: 48%; transform: translateY(0); }
  to   { left: 60%; transform: translateY(-2px); }
}

/* Speed lines */
.art-tr-speed {
  position: absolute;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: speedLine 0.5s linear infinite;
}
.art-tr-speed--1 { top: 35%; left: 0; width: 60%; animation-delay: 0s; }
.art-tr-speed--2 { top: 55%; left: 10%; width: 45%; animation-delay: -0.25s; }
@keyframes speedLine {
  from { transform: translateX(-100%); opacity: 0; }
  50%  { opacity: 1; }
  to   { transform: translateX(200%); opacity: 0; }
}

/* Checkered flag */
.art-tr-flag {
  position: absolute;
  top: 10%;
  right: 10%;
  font-size: 42px;
  animation: flagWave 1.5s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 12px rgba(255,220,50,0.5));
}
@keyframes flagWave {
  from { transform: rotate(-8deg) scale(1); }
  to   { transform: rotate(8deg) scale(1.05); }
}

/* Featured card — spans full width on large screens */
.game-card--featured {
  grid-column: 1 / -1;
}
.game-card--featured .card-art {
  height: 220px;
}
.game-card--featured .card-body {
  padding: 22px 28px 26px;
}
.game-card--featured .card-title {
  font-size: 1.65rem;
}
.game-card--featured .card-desc {
  font-size: 0.95rem;
  max-width: 680px;
}

#card-turboracers .card-play-btn {
  background: linear-gradient(135deg, #cc2222, #e85c1a);
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .hub-layout { padding: 28px 16px 48px; gap: 32px; }
  .hub-grid   { grid-template-columns: 1fr; }
  .hub-logo   { flex-direction: column; gap: 10px; text-align: center; }
  .game-card--featured { grid-column: 1; }
}
/* ---- WIP Section ---- */
.hub-wip {
  margin-top: 24px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 24px;
  overflow: hidden;
  backdrop-filter: blur(12px);
  padding: 8px 32px;
}

.hub-wip-summary {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  padding: 24px 0;
  list-style: none; /* Hide default arrow in some browsers */
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
}

.hub-wip-summary::-webkit-details-marker {
  display: none;
}

.hub-wip-summary:hover {
  color: var(--text);
}

.hub-wip .wip-icon {
  font-size: 1.5rem;
  filter: grayscale(0.5);
  transition: filter 0.2s;
}

.hub-wip-summary:hover .wip-icon {
  filter: grayscale(0);
}

.hub-wip[open] .hub-wip-summary {
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.hub-wip[open] {
  padding-bottom: 32px;
}
