/* Games hub. Uses the site tokens, so it follows light and dark mode; card art is always
   dark so sprites pop. */
/* Sized by the space next to the sidebar and chat, not the whole window. */
.games-main{ padding-top:2rem; padding-bottom:4rem; container-type:inline-size; }
.games-title{ display:flex; align-items:baseline; gap:.8rem; margin-bottom:1.2rem; }
.games-title h1{ margin:0; font-size:clamp(1.9rem, 4vw, 2.5rem); font-weight:800; letter-spacing:-.02em; }
.games-count{ color:var(--ink-faint); font-size:.9rem; }
.games-layout{ display:grid; grid-template-columns:minmax(0,1fr) clamp(320px, 26vw, 440px); gap:1.4rem; align-items:start; }

/* Featured banner */
.games-hero{ padding:0;
  display:grid; grid-template-columns:minmax(0,1fr) 260px; border-radius:20px; overflow:hidden;
  background:var(--surface); border:1px solid var(--border); box-shadow:var(--shadow-lift);
}
.hero-feature{ position:relative; min-height:250px; display:flex; }
.hero-feature .cover-big{ position:absolute; inset:0; border-radius:0; aspect-ratio:auto; }
.hero-feature .cover-big .cover-logo{ display:none; }
.hero-feature .cover-big .cover-mons{ left:auto; right:4%; width:55%; }
.hero-text{
  position:relative; z-index:1; padding:1.6rem 1.8rem; max-width:62%; display:flex; flex-direction:column; justify-content:center; gap:.5rem;
  background:linear-gradient(90deg, rgba(10,6,20,.92) 40%, rgba(10,6,20,0)); color:#fff;
}
.hero-kicker{ font-family:var(--font-display); font-size:.72rem; font-weight:800; letter-spacing:.16em; text-transform:uppercase; color:#ffcb05; }
.hero-text h2{ margin:0; font-size:clamp(1.7rem, 4vw, 2.6rem); font-weight:900; line-height:1; letter-spacing:-.01em; color:#fff; text-transform:uppercase; }
.hero-text p{ margin:0; color:#e6e0f5; max-width:36ch; }
.hero-actions{ display:flex; align-items:center; gap:1rem; margin-top:.6rem; }
.no-cash{ font-size:.7rem; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:#b8b0cc; }
.hero-gold{ padding:1.4rem 1.3rem; display:flex; flex-direction:column; justify-content:center; gap:.9rem; border-left:1px solid var(--border); }
.gold-row{ display:flex; align-items:center; gap:.8rem; }
.gold-coin, .win-coin{
  width:44px; height:44px; flex:none; border-radius:50%;
  background:radial-gradient(circle at 35% 30%, #fff3b0, #ffcb05 45%, #b88a00); box-shadow:inset 0 -3px 0 rgba(0,0,0,.2), 0 4px 12px rgba(255,203,5,.35);
}
.gold-label{ display:block; font-size:.8rem; color:var(--ink-soft); }
.gold-value{ display:block; font-size:1.6rem; font-weight:800; color:var(--gold-strong); }
.gold-help{ margin:0; font-size:.82rem; color:var(--ink-soft); }

/* Category tabs */
.games-tabs{ display:flex; gap:1.6rem; border-bottom:1px solid var(--border); margin:1.8rem 0 1.4rem; overflow-x:auto; scrollbar-width:none; }
.games-tabs::-webkit-scrollbar{ display:none; }
.games-tab{
  background:none; border:0; border-bottom:3px solid transparent; padding:.6rem 0; cursor:pointer; white-space:nowrap;
  font-family:var(--font-display); font-size:1rem; font-weight:700; color:var(--ink-faint); display:inline-flex; align-items:center; gap:.4rem;
}
.games-tab:hover{ color:var(--ink); }
.games-tab[aria-selected="true"]{ color:var(--ink); border-bottom-color:var(--accent); }
.tab-new{ font-size:.6rem; font-weight:800; letter-spacing:.06em; padding:.1rem .4rem; border-radius:5px; background:var(--accent); color:#fff; }

/* Game cards */
.games-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(200px, 1fr)); gap:1.2rem; }
.game-card{ position:relative; display:flex; flex-direction:column; gap:.6rem; color:var(--ink); text-decoration:none; }
.game-card .cover{ transition:transform .2s ease, box-shadow .2s ease; }
a.game-card:hover .cover, a.game-card:focus-visible .cover{ transform:translateY(-4px); box-shadow:0 18px 34px -16px rgba(0,0,0,.6); }
a.game-card:focus-visible{ outline:none; }
a.game-card:focus-visible .cover{ outline:3px solid var(--accent); outline-offset:3px; }
.game-card.status-soon .cover{ filter:grayscale(.6) brightness(.8); }
.ribbon{
  position:absolute; top:.6rem; left:.6rem; z-index:2; font-family:var(--font-display); font-size:.7rem; font-weight:800; letter-spacing:.06em;
  padding:.2rem .55rem; border-radius:6px; background:var(--accent); color:#fff; box-shadow:0 4px 10px rgba(0,0,0,.3);
}
.ribbon.soon{ background:#454d66; }
.game-body h3{ margin:0; font-size:1.05rem; }
.game-by{ font-family:var(--font-display); font-size:.72rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--accent); }
.game-blurb{ margin:.2rem 0 0; font-size:.88rem; color:var(--ink-soft); line-height:1.4; }
.game-mode{ display:flex; flex-wrap:wrap; gap:.4rem; align-items:center; font-size:.76rem; color:var(--ink-faint); margin-top:.3rem; }
.chip.live{ background:var(--accent); color:#fff; }
.chip.discord{ background:#5865f2; color:#fff; }
.game-mode .chip{ font-size:.7rem; padding:.12rem .55rem; }

/* Drawn cover art */
.cover{
  position:relative; aspect-ratio:3 / 4; border-radius:14px; overflow:hidden; isolation:isolate;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08), 0 8px 20px -12px rgba(0,0,0,.5);
}
.cover::before{
  content:""; position:absolute; inset:0; z-index:-1; opacity:.1;
  background-image:radial-gradient(circle at 50% 50%, transparent 8px, #fff 9px, #fff 10px, transparent 11px);
  background-size:40px 40px;
}
.cover::after{ content:""; position:absolute; inset:0; background:linear-gradient(transparent 55%, rgba(0,0,0,.7)); z-index:0; }
.cover-image{ width:100%; height:100%; object-fit:cover; display:block; }
.cover-mons{ position:absolute; left:0; right:0; top:12%; bottom:22%; display:flex; align-items:center; justify-content:center; z-index:1; }
.cover-mons img{ width:62%; max-height:100%; object-fit:contain; filter:drop-shadow(0 10px 12px rgba(0,0,0,.55)); }
.cover-mons.n2 img{ width:50%; }
.cover-mons.n2 img:first-child{ transform:translateX(12%) scale(1.1); z-index:2; }
.cover-mons.n2 img:last-child{ transform:translateX(-12%) translateY(14%) scale(.9); }
.cover-mons.n3 img{ width:44%; }
.cover-mons.n3 img:nth-child(1){ transform:translate(30%, -8%) scale(1.15); z-index:2; }
.cover-mons.n3 img:nth-child(2){ transform:translate(0, 18%) scale(.85); z-index:1; }
.cover-mons.n3 img:nth-child(3){ transform:translate(-30%, 22%) scale(.8); z-index:3; }
.cover-ball{ position:absolute; top:-18%; right:-18%; width:60%; aspect-ratio:1; border-radius:50%; opacity:.28; z-index:0; }
.cover-logo{
  position:absolute; left:.7rem; right:.7rem; bottom:.7rem; z-index:2; text-align:center;
  font-family:var(--font-display); font-weight:900; font-size:clamp(1rem, 2.2vw, 1.35rem); line-height:1.05; letter-spacing:.02em; text-transform:uppercase;
  color:#ffcb05; text-shadow:0 2px 0 #8a5d15, 0 0 14px rgba(0,0,0,.8);
}
/* Ball artwork (shared with the slot page's pick screen). */
.cover-ball.b0{ background:linear-gradient(to bottom, #e3350d 0 46%, #131b33 46% 54%, #f7f8fb 54%); }
.cover-ball.b1{ background:radial-gradient(circle at 25% 28%, #e3350d 0 12%, transparent 13%), radial-gradient(circle at 75% 28%, #e3350d 0 12%, transparent 13%), linear-gradient(to bottom, #2a75bb 0 46%, #131b33 46% 54%, #f7f8fb 54%); }
.cover-ball.b2{ background:linear-gradient(90deg, transparent 0 20%, #ffcb05 20% 32%, transparent 32% 68%, #ffcb05 68% 80%, transparent 80%) top / 100% 46% no-repeat, linear-gradient(to bottom, #232323 0 46%, #131b33 46% 54%, #f7f8fb 54%); }
.cover-ball.b3{ background:radial-gradient(circle at 30% 26%, #ff5fa2 0 11%, transparent 12%), radial-gradient(circle at 70% 26%, #ff5fa2 0 11%, transparent 12%), linear-gradient(to bottom, #7a3fd1 0 46%, #131b33 46% 54%, #f7f8fb 54%); }
.cover-big .cover-ball{ top:-30%; right:auto; left:-8%; width:45%; }

/* Sidebar */
.games-side{ display:flex; flex-direction:column; gap:1rem; position:sticky; top:5rem; }
.side-card{ background:var(--surface); border:1px solid var(--border); border-radius:18px; padding:1.1rem 1.1rem 1rem; box-shadow:var(--shadow); }
.side-head{ display:flex; justify-content:space-between; align-items:baseline; gap:.6rem; margin-bottom:.8rem; }
.side-head h2{ margin:0; font-size:.78rem; letter-spacing:.14em; text-transform:uppercase; color:var(--ink-faint); }
.side-head span{ font-family:var(--font-display); font-weight:700; font-size:.9rem; }
.side-head a{ font-size:.82rem; color:var(--accent); text-decoration:none; font-weight:600; }
.lb-tabs{ display:grid; grid-template-columns:repeat(auto-fit, minmax(3.4rem, 1fr)); gap:.2rem; background:var(--surface-2); border-radius:10px; padding:.2rem; margin-bottom:.6rem; }
.lb-tab{ border:0; background:none; border-radius:8px; padding:.4rem .2rem; font:600 .76rem var(--font-display); white-space:nowrap; color:var(--ink-soft); cursor:pointer; }
.lb-tab[aria-selected="true"]{ background:var(--surface); color:var(--ink); box-shadow:var(--shadow); }
.lb-list{ list-style:none; margin:0; padding:0; }
.lb-row{ display:grid; grid-template-columns:1.5rem 32px minmax(0,1fr) auto; align-items:center; gap:.5rem; padding:.5rem .35rem; border-bottom:1px solid var(--border); border-radius:8px; }
.lb-row:hover{ background:var(--surface-2); }
.lb-row:last-child{ border-bottom:0; }
.lb-row.you{ background:var(--accent-soft); }
.lb-pos{ font-family:var(--font-mono); font-size:.82rem; color:var(--ink-faint); text-align:center; }
.lb-row.top .lb-pos{ color:var(--gold-strong); font-weight:700; }
.lb-avatar{ width:32px; height:32px; border-radius:50%; object-fit:cover; }
.lb-name{ font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lb-value{ font-weight:700; }
.lb-row.top .lb-value{ color:var(--gold-strong); }
.lb-empty{ padding:.8rem .4rem; color:var(--ink-soft); font-size:.88rem; }
.wins-list{ display:flex; flex-direction:column; gap:.6rem; }
.win-row{ display:flex; gap:.6rem; align-items:flex-start; font-size:.86rem; }
.win-row .win-coin{ width:26px; height:26px; }
.win-row small{ display:block; font-size:.72rem; }
.feed-emoji{ width:18px; height:18px; vertical-align:-4px; display:inline-block; }

@container (max-width:920px){
  .games-layout{ grid-template-columns:minmax(0, 1fr); }
  .games-side{ position:static; }
}
@container (max-width:640px){
  .games-hero{ grid-template-columns:1fr; }
  .hero-gold{ border-left:0; border-top:1px solid var(--border); }
  .hero-text{ max-width:none; }
  .games-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); gap:.8rem; }
  .games-tabs{ gap:1.1rem; }
}

/* Leaderboard rows with a second line (the multiplier board names the game). */
.lb-name{ display:flex; flex-direction:column; min-width:0; }
.lb-name-main{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lb-detail{ font-size:.74rem; color:var(--ink-faint); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lb-value{ font-size:1rem; white-space:nowrap; font-variant-numeric:tabular-nums; }
/* A name in the leaderboard is a button, so it has to look like the text around it. */
.lb-name-main .feed-player{ font:inherit; color:inherit; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lb-name-main .feed-player:hover{ color:var(--accent); }

/* Master Ball Jackpot card (games.js). */
.jackpot-card-hub{ background:linear-gradient(160deg, color-mix(in srgb, #7a3fd1 22%, var(--surface)), var(--surface)); border-color:color-mix(in srgb, #9b59ff 45%, var(--border)); }
.jp-hub-ball{
  width:26px; height:26px; border-radius:50%; position:relative; flex:none;
  background:radial-gradient(circle at 30% 26%, #ff5fa2 0 11%, transparent 12%), radial-gradient(circle at 70% 26%, #ff5fa2 0 11%, transparent 12%),
    linear-gradient(to bottom, #7a3fd1 0 46%, #131b33 46% 54%, #f7f8fb 54%);
  box-shadow:0 0 0 2px #131b33, 0 0 12px rgba(155,89,255,.6);
}
.jp-hub-amount{ display:block; font:900 1.6rem var(--font-display); color:#9b59ff; text-shadow:0 0 18px rgba(155,89,255,.35); margin-bottom:.35rem; }
:root[data-theme="dark"] .jp-hub-amount{ color:#d2b4ff; }
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .jp-hub-amount{ color:#d2b4ff; } }
.games-history{ margin-left:auto; align-self:center; }
