:root {
  --bg-a: #0c1438;
  --bg-b: #1b2f63;
  --bg-c: #0f4c4b;
  --line: rgba(255, 255, 255, 0.16);
  --text: #f8fbff;
  --muted: rgba(248, 251, 255, 0.72);
  --gold: #f5c842;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(1200px 680px at 95% -20%, rgba(245, 200, 66, 0.2), transparent 55%),
    radial-gradient(900px 520px at -15% 120%, rgba(76, 201, 240, 0.18), transparent 60%),
    linear-gradient(140deg, var(--bg-a) 0%, var(--bg-b) 48%, var(--bg-c) 100%);
}

.hub-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 14px;
  padding-bottom: calc(24px + max(env(safe-area-inset-bottom, 0px), 34px));
}

.hub-card {
  width: min(1120px, 100%);
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  backdrop-filter: blur(14px);
  padding: 30px 24px 24px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hub-logo {
  width: 98px;
  display: block;
  margin: 0 auto 10px;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.35));
}

.hub-kicker {
  margin: 0;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.76);
}

.hub-title {
  margin: 6px 0 10px;
  text-align: center;
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: .4px;
  line-height: 1.06;
}

.hub-sub {
  margin: 0 auto 22px;
  max-width: 760px;
  text-align: center;
  color: var(--muted);
  line-height: 1.45;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.game-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 190px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.18);
  padding: 14px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(140% 100% at 0% 0%, rgba(255,255,255,0.09), transparent 58%),
    linear-gradient(160deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
}

.game-tile::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% -20%;
  height: 70%;
  background: radial-gradient(closest-side, rgba(245,200,66,0.18), transparent 74%);
  pointer-events: none;
}

.game-live {
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.game-live:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 200, 66, 0.7);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.33);
}

.game-logo {
  width: 108px;
  height: 108px;
  border-radius: 24px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.game-logo-shell {
  width: 108px;
  height: 108px;
  position: relative;
}

.game-logo-shell .game-logo {
  position: absolute;
  inset: 0;
}

.game-logo-img {
  display: block;
}

.game-icon-wrap {
  width: 100%;
  display: grid;
  place-items: center;
  flex: 1;
}

.game-logo-fallback {
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 30px;
  color: #fff;
}

.game-badge {
  align-self: flex-start;
  font-size: 11px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  padding: 4px 10px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(10, 18, 42, 0.48);
}

.game-live .game-badge {
  border-color: rgba(245, 200, 66, 0.52);
  color: var(--gold);
}

.game-soon {
  opacity: 0.86;
  filter: saturate(.85);
}

.hub-empty {
  grid-column: 1 / -1;
  border: 1px dashed rgba(255,255,255,.28);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 980px) {
  .games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .hub-card {
    border-radius: 20px;
    padding: 20px 14px 16px;
  }
  .hub-title {
    font-size: 32px;
  }
  .games-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .game-tile {
    min-height: 168px;
    padding: 12px;
  }
  .game-logo {
    width: 92px;
    height: 92px;
    border-radius: 20px;
  }
  .game-logo-shell {
    width: 92px;
    height: 92px;
  }
}
