/* ==========================================================================
   Game picker (hub landing page)
   ========================================================================== */
body.hub {
  background:
    radial-gradient(1000px 700px at 10% 0%, #2d1a78 0%, transparent 60%),
    radial-gradient(900px 700px at 95% 100%, #0e4c5c 0%, transparent 60%),
    #120b2e;
  background-attachment: fixed;
}
#hub {
  position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 44px 20px 40px;
  display: flex; flex-direction: column; align-items: center; gap: 30px; text-align: center;
}

.hub-head { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hub-logo { display: inline-flex; align-items: baseline; gap: 0.18em; font-size: clamp(64px, 12vw, 128px); line-height: 1; transform: rotate(-3deg); user-select: none; margin-bottom: 0.18em; }
.hub-logo .hl-1 {
  font-weight: 700; color: var(--cyan); letter-spacing: 0.01em;
  text-shadow: 0 0.05em 0 #1fa9b3, 0 0.1em 0 #0b3b4f, 0 0.18em 0.25em rgba(0, 0, 0, 0.45);
}
.hub-logo .hl-2 {
  font-family: 'Pacifico', var(--font); font-weight: 400; font-size: 0.92em; color: var(--yellow);
  text-shadow: 0 0.05em 0 var(--pink), 0 0.1em 0 #8a2bd0, 0 0.18em 0.25em rgba(0, 0, 0, 0.45);
}
.hub-tag { margin: 0; font-size: clamp(18px, 2.3vw, 24px); color: var(--muted); max-width: 640px; line-height: 1.35; }

.game-grid { width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); grid-gap: 22px; }
.game-card {
  position: relative; display: flex; flex-direction: column; text-align: left; text-decoration: none; color: #fff;
  background: var(--card); border-radius: 30px; overflow: hidden; box-shadow: inset 0 0 0 2px var(--line), 0 18px 40px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s cubic-bezier(.2, 1.4, .4, 1), box-shadow 0.18s;
}
a.game-card:hover, a.game-card:focus { transform: translateY(-6px) rotate(-0.6deg); box-shadow: inset 0 0 0 3px var(--yellow), 0 26px 50px rgba(0, 0, 0, 0.35); outline: none; }
a.game-card:focus-visible { box-shadow: inset 0 0 0 4px #fff, 0 26px 50px rgba(0, 0, 0, 0.35); }
.gc-body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; flex: 1; }
.gc-title { font-size: 28px; font-weight: 700; line-height: 1.1; display: flex; align-items: center; gap: 10px; }
.gc-new { font-size: 14px; font-weight: 700; color: var(--deep); background: var(--green); padding: 3px 10px; border-radius: 999px; letter-spacing: 0.04em; text-transform: uppercase; }
.gc-tag { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.4; flex: 1; }
.gc-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.gc-meta span { font-size: 14px; font-weight: 600; color: #fff; background: var(--card-2); border-radius: 999px; padding: 4px 12px; }
.gc-play { align-self: flex-start; margin-top: 6px; font-size: 20px; padding: 12px 26px; }

/* Card art */
.art { position: relative; height: 190px; overflow: hidden; }
.art-who { background: radial-gradient(circle at 30% 30%, #6a3fd6, #2a1466 70%); }
.art-who::before { content: ''; position: absolute; top: -50%; right: -50%; bottom: -50%; left: -50%; background: repeating-conic-gradient(rgba(255, 255, 255, .06) 0deg 12deg, transparent 12deg 24deg); animation: spin 50s linear infinite; }
.art-who-q { position: absolute; right: 26px; top: 6px; font-size: 120px; font-weight: 700; color: var(--pink); text-shadow: 0 6px 0 var(--yellow), 0 12px 0 #8a2bd0; transform: rotate(12deg); }
.art-who-chars { position: absolute; left: 22px; bottom: 10px; display: flex; gap: 4px; }
.art-who-chars > div { width: 104px; height: 104px; animation: bob 2.4s ease-in-out infinite; }
.art-who-chars > div:nth-child(2) { animation-delay: -0.6s; }
.art-who-chars > div:nth-child(3) { animation-delay: -1.2s; }

.art-where { background: linear-gradient(180deg, #ffb35c 0%, #ff7a5c 45%, #1b6f86 46%, #0b3b4f 100%); }
.art-card {
  position: absolute; left: 50%; top: 50%; width: 250px; height: 150px; margin: -75px 0 0 -125px;
  background-color: #2a9d8f; background-size: cover; background-position: center;
  border: 7px solid #fff8ec; border-radius: 8px; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  transform: rotate(-5deg); transition: transform 0.3s cubic-bezier(.2, 1.4, .4, 1);
}
a.game-card:hover .art-card, a.game-card:focus .art-card { transform: rotate(-1deg) scale(1.05); }
.art-stamp {
  position: absolute; right: 6px; top: 6px; width: 38px; height: 44px; display: grid; place-items: center;
  background: #fff8ec; color: #e76f51; font-size: 22px; border: 2px dashed #e76f51; border-radius: 3px;
}
.art-greet {
  position: absolute; left: 8px; bottom: 6px; font-family: 'Pacifico', var(--font); font-size: 19px; color: #fff;
  text-shadow: 0 2px 0 #e76f51, 0 3px 8px rgba(0, 0, 0, 0.5);
}

.art-legacy {
  background:
    repeating-linear-gradient(90deg, #f3b52f 0 18px, #1d150b 18px 22px, #2fae66 22px 34px, #1d150b 34px 38px, #d9452f 38px 52px, #1d150b 52px 56px) 0 100% / 100% 16px no-repeat,
    radial-gradient(circle at 30% 20%, #4a3214, #17110a 75%);
}
.art-legacy-frame {
  position: absolute; left: 50%; top: 14px; width: 270px; height: 146px; margin-left: -135px;
  background-color: #2b1f10; background-size: cover; background-position: center; border-radius: 4px;
  border: 7px solid #e3b143; box-shadow: 0 12px 26px rgba(0, 0, 0, 0.5), inset 0 0 0 2px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s cubic-bezier(.2, 1.4, .4, 1);
}
a.game-card:hover .art-legacy-frame, a.game-card:focus .art-legacy-frame { transform: scale(1.05) rotate(-1deg); }
.art-legacy-q { position: absolute; right: 14px; top: 10px; font-size: 18px; font-weight: 700; color: #1d150b; background: #f3b52f; padding: 3px 12px; border-radius: 999px; transform: rotate(6deg); box-shadow: 0 4px 0 #b5851a; }

.game-card.soon { align-items: center; justify-content: center; text-align: center; padding: 30px; gap: 8px; background: transparent; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.12); min-height: 300px; }
.game-card.soon .gc-tag { flex: none; }
.soon-icon { font-size: 64px; opacity: 0.7; animation: bob 2.6s ease-in-out infinite; }

.hub-join {
  width: 100%; max-width: 760px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px;
  background: var(--card); border-radius: 26px; box-shadow: inset 0 0 0 2px var(--line); padding: 20px 22px; text-align: left;
}
.hj-text { flex: 1 1 260px; display: flex; flex-direction: column; gap: 4px; }
.hj-text b { font-size: 22px; }
.hj-text span { color: var(--muted); font-size: 16px; line-height: 1.35; }
.hub-join .join-row { flex: 1 1 300px; }
.hub-foot { color: var(--dim); font-size: 14px; }

body.hub.tv #hub { padding: 28px 40px; gap: 22px; min-height: 100vh; justify-content: center; }
body.hub.tv .hub-logo { font-size: 92px; }
body.hub.tv .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.hub.tv .hub-foot { display: none; }

@supports not (inset: 0) {
  #hub, .hub-head, .gc-body, .gc-meta, .hub-join, .hj-text, .art-who-chars { gap: 0; }
  #hub > * + * { margin-top: 30px; }
  .gc-body > * + * { margin-top: 10px; }
  .gc-meta span { margin: 0 8px 8px 0; }
  .art-who-chars > * + * { margin-left: 4px; }
  .hub-join > * + * { margin-left: 22px; }
}
