/* Hub page: intro, nickname card, grid of game cards. */

.page-hub .top { width: 100%; max-width: 1200px; margin: 0 auto; }  /* header lines up with the content */
.hub { width: 100%; max-width: 1200px; margin: 0 auto; flex: 1; display: flex; flex-direction: column; gap: 32px; }
.hub-intro { padding-top: 24px; }
.hub-intro h1 { font-size: 44px; letter-spacing: -0.03em; }
.hub-intro p { font-size: 17px; }

.hub-join { padding: 36px 40px; display: flex; flex-direction: column; gap: 24px; max-width: 640px; }
.hub-join h2 { font-size: 26px; }

.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }

.game-card {
  display: flex; flex-direction: column; gap: 20px; padding: 28px;
  color: inherit; text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.game-card:hover { border-color: var(--accent-text); box-shadow: var(--lift); transform: translateY(-2px); }
.game-card:focus-visible { outline-offset: 4px; }
.game-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.monogram {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 20px; font-weight: 600; letter-spacing: -0.03em;
}
.play-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border: 1px solid var(--pill-border); border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--head);
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.game-card:hover .play-chip { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.game-card h2 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; color: var(--head); }
.game-card .tagline { margin: -12px 0 0; font-size: 15px; color: var(--muted); }
.game-stats { margin: 0; display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.game-stats div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.game-stats div:last-child { border-bottom: 0; padding-bottom: 0; }
.game-stats dt { font-size: 13px; color: var(--muted); }
.game-stats dd { margin: 0; font-size: 15px; text-align: right; min-width: 0; overflow-wrap: anywhere; }

.skeleton { min-height: 300px; background: var(--surface); border: 1px dashed var(--border); border-radius: 20px; }
.hub-error { margin: 0; font-size: 14px; color: var(--mistake); }

.hub-foot {
  width: 100%; max-width: 1200px; margin: 0 auto;
  display: flex; gap: 8px; justify-content: center;
  font-size: 13px; color: var(--muted);
}

@media (max-width: 720px) {
  .hub-intro { padding-top: 8px; }
  .hub-intro h1 { font-size: 34px; }
  .hub-join { padding: 24px; }
  .games { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .game-card, .play-chip { transition: none; }
  .game-card:hover { transform: none; }
}
