/* =============================================================
   TypZoo — Game Hub Stylesheet
   ============================================================= */

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

html, body {
  min-height: 100vh;
  font-family: 'Nunito', system-ui, sans-serif;
  background: #0f172a;
  color: white;
  user-select: none;
  -webkit-user-select: none;
  overflow-x: hidden;
}

/* ── Animated background ── */
.hub-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 85%, rgba(212, 168, 67, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 15%, rgba(59, 130, 246, 0.15) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 70%),
    linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f2027 100%);
  z-index: 0;
  pointer-events: none;
}

/* ── Page wrapper ── */
.hub-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  padding: 3rem 1.5rem 5rem;
  max-width: 960px;
  margin: 0 auto;
}

/* ── Header ── */
.hub-header {
  text-align: center;
  animation: floatBob 3.5s ease-in-out infinite;
}

.hub-logo {
  font-size: 4.5rem;
  line-height: 1;
  margin-bottom: 0.2rem;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.5));
}

.hub-title {
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 40%, #fde68a 70%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 20px rgba(251, 191, 36, 0.30));
}

.hub-sub {
  margin-top: 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
}

/* ── Game grid ── */
.game-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

/* ── Game card ── */
.game-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem 1.35rem 1.25rem;
  background: rgba(255, 255, 255, 0.055);
  border: 1.5px solid rgba(255, 255, 255, 0.11);
  border-radius: 1.25rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease,
              transform 0.18s ease, box-shadow 0.18s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.game-card:hover {
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(251, 191, 36, 0.12);
}

.game-card:focus-visible {
  outline: 3px solid #fbbf24;
  outline-offset: 3px;
}

.card-emoji {
  font-size: 2.8rem;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.35));
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.card-title {
  font-size: 1.3rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.92);
}

.card-desc {
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.45;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.3rem;
}

.card-tag {
  font-size: 0.7rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
}

.card-play {
  align-self: flex-end;
  font-size: 0.85rem;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 0.18s ease;
}

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

/* ── Ko-fi button ── */
.kofi-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.25rem;
  background: rgba(74, 222, 128, 0.10);
  border: 1px solid rgba(74, 222, 128, 0.30);
  border-radius: 50px;
  color: rgba(255, 255, 255, 0.55);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  user-select: none;
}
.kofi-btn:hover {
  background: rgba(74, 222, 128, 0.22);
  border-color: rgba(74, 222, 128, 0.60);
  color: rgba(255, 255, 255, 0.90);
}
.kofi-cup {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ── Copyright bar ── */
#copyright-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.20);
  padding: 0.35rem 1rem;
  z-index: 9999;
  pointer-events: none;
  user-select: none;
}

/* ── Animation ── */
@keyframes floatBob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
