/* The game menu (index.html). Shared styles live in common.css. */

.hub { gap: 10px; }
.hub .top { padding-top: 4px; }

.player-chip {
  align-self: center;
  max-width: 100%;
  font-size: 1rem;
  padding: 5px 14px;
}
.player-chip small { color: var(--ink-soft); font-weight: 500; margin-left: 4px; }

.games {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 8px;
}

.game-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: 2px;
  padding: 10px 8px 10px;
  border: 3px solid var(--line);
  border-radius: 22px;
  background: var(--c, #fff);
  box-shadow: 0 5px 0 rgba(59,42,77,.25);
  color: inherit;
  text-decoration: none;
  text-align: center;
  animation: cardIn .45s ease-out backwards;
}
.game-card:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(59,42,77,.25); }
.game-card:nth-child(2) { animation-delay: .05s; }
.game-card:nth-child(3) { animation-delay: .1s; }
.game-card:nth-child(4) { animation-delay: .15s; }
.game-card:nth-child(5) { animation-delay: .2s; }
.game-card:nth-child(6) { animation-delay: .25s; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
}

.game-card h2 { margin: 2px 0 0; font-size: 1.08rem; line-height: 1.1; }
.game-card p { margin: 0; font-size: .8rem; line-height: 1.2; color: var(--ink-soft); font-weight: 500; }
.game-card .stat {
  margin-top: 4px;
  background: rgba(255,255,255,.75);
  border-radius: 999px;
  padding: 1px 10px;
  font-size: .8rem; font-weight: 600;
  white-space: nowrap;
}
.game-card .stat.new { background: var(--pink); color: #fff; }

/* ---------- Little pictures on each card ---------- */
.art { position: relative; width: 92px; height: 70px; flex: none; }
.art svg { position: absolute; }
.art .e { position: absolute; line-height: 1; }
.game-card:hover .art, .game-card:focus-visible .art { animation: wiggle 1s ease-in-out infinite; }

/* Pet Puzzle: a mini board */
.art-puzzle .mini {
  position: absolute; left: 14px; top: 2px; width: 64px; height: 64px;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
  border: 3px solid var(--line); border-radius: 8px; overflow: hidden;
}
.art-puzzle .mini i { display: block; position: relative; }
.art-puzzle .mini i:nth-child(1), .art-puzzle .mini i:nth-child(2), .art-puzzle .mini i:nth-child(4) { background: #8fd3ff; }
.art-puzzle .mini i:nth-child(3), .art-puzzle .mini i:nth-child(6) { background: #ff8a8a; }
.art-puzzle .mini i:nth-child(5), .art-puzzle .mini i:nth-child(7), .art-puzzle .mini i:nth-child(8), .art-puzzle .mini i:nth-child(9) { background: #9be89b; }
.art-puzzle .mini svg { position: absolute; inset: 6%; width: 88%; height: 88%; }

/* Rugby vs Biggie: two counters */
.art-connect .ctr {
  position: absolute; width: 50px; height: 50px; border-radius: 50%;
  border: 3px solid var(--line);
  display: grid; place-items: center;
}
.art-connect .ctr svg { position: static; width: 38px; height: 38px; }
.art-connect .r { left: 2px; top: 16px; background: #e8955a; }
.art-connect .b { right: 2px; top: 4px; background: #b9c0c7; }
.art-connect .e { left: 38px; top: 26px; font-size: 1.1rem; }

/* Bone Dig */
.art-bones .soil {
  position: absolute; left: 6px; right: 6px; bottom: 0; height: 30px;
  background: #b07a4f; border: 3px solid var(--line); border-radius: 12px 12px 10px 10px;
}
.art-bones .grass { position: absolute; left: 6px; right: 6px; bottom: 22px; height: 12px; background: #58c26a; border: 3px solid var(--line); border-radius: 10px; }
.art-bones .bone { width: 46px; height: 46px; left: 2px; top: 6px; }
.art-bones .peek { width: 46px; height: 46px; right: 4px; top: 6px; }

/* Memory Match: two cards */
.art-memory .card {
  position: absolute; top: 4px; width: 44px; height: 60px;
  border: 3px solid var(--line); border-radius: 9px;
  display: grid; place-items: center;
}
.art-memory .c1 { left: 6px; background: #fff; transform: rotate(-10deg); }
.art-memory .c2 { right: 6px; background: var(--pink); transform: rotate(9deg); }
.art-memory .card svg { position: static; width: 36px; height: 36px; }
.art-memory .c2 svg { fill: rgba(255,255,255,.8); width: 26px; height: 26px; }

/* Zoomies: Rugby with speed lines */
.art-zoomies svg { width: 60px; height: 60px; right: 6px; top: 4px; transform: rotate(-8deg); }
.art-zoomies .e { left: 2px; top: 22px; font-size: 1.6rem; transform: scaleX(-1); }

/* Where's Biggie: ears poking out of a box */
.art-hide .ears { width: 56px; height: 56px; left: 18px; top: -4px; clip-path: inset(0 0 52% 0); }
.art-hide .box {
  position: absolute; left: 10px; right: 10px; bottom: 0; height: 40px;
  background: #d9a066; border: 3px solid var(--line); border-radius: 6px;
}
.art-hide .box::before {
  content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 0; border-left: 2px dashed rgba(59,42,77,.4);
}
.art-hide .e { right: 0; top: 2px; font-size: 1.2rem; }

@media (min-width: 640px) {
  .app.hub { max-width: 760px; }
  .games { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .game-card { padding: 16px 12px; }
  .game-card h2 { font-size: 1.25rem; }
  .game-card p { font-size: .9rem; }
  .art { transform: scale(1.15); margin: 6px 0; }
}

@media (max-width: 359px) {
  .games { gap: 8px; }
  .game-card h2 { font-size: .98rem; }
}
