/* Games page — leaderboard carousel + library (shared Explore container rhythm) */

.gamesPageContainer {
  max-width: var(--feed-grid-max-width, 1760px);
  margin: 0 auto;
  padding: 0 var(--lantern-pad-x, 1.25rem);
  overflow-x: hidden;
}

.gamesPageHero {
  margin-bottom: 1.5rem;
}

.gamesPageHeroRow {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.gamesPageTitle {
  font-weight: 900;
  font-size: 32px;
  margin: 0;
  letter-spacing: 0.02em;
}

.gamesPageSub {
  margin: 0.25rem 0 0;
  color: var(--muted, #b9c6ea);
  font-size: 22px;
  font-weight: 700;
}

.gamesPageWalletInline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 204, 102, 0.45);
  background: rgba(255, 204, 102, 0.12);
  font-weight: 800;
  font-size: 22px;
  color: var(--ink, #eaf0ff);
  text-decoration: none;
}

.gamesPageWalletInline:hover {
  background: rgba(255, 204, 102, 0.22);
}

.gamesPageWalletAmt {
  color: #ffcc66;
  font-weight: 900;
}

.gamesLeaderboardSection {
  margin-bottom: 2rem;
}

.gamesLeaderboardHeading {
  font-weight: 900;
  font-size: 28px;
  margin: 0 0 0.25rem;
}

.gamesLeaderboardSub {
  margin: 0 0 1rem;
  color: var(--muted, #b9c6ea);
  font-size: 22px;
  font-weight: 700;
}

.gamesLeaderboardPeriods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.gamesLeaderboardPeriods button {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink, #eaf0ff);
  font-weight: 800;
  font-size: 20px;
  cursor: pointer;
  font-family: inherit;
}

.gamesLeaderboardPeriods button.is-active {
  border-color: var(--accent, #5aa7ff);
  background: rgba(90, 167, 255, 0.2);
}

.gamesLeaderboardPeriods button:focus-visible {
  outline: 2px solid var(--accent, #5aa7ff);
  outline-offset: 2px;
}

.gamesLeaderboardCarousel {
  position: relative;
}

.gamesLeaderboardCarouselStatus {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gamesLeaderboardViewport {
  overflow: hidden;
  width: 100%;
}

.gamesLeaderboardTrack {
  display: flex;
  transition: transform 0.45s ease;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .gamesLeaderboardTrack {
    transition: none;
  }
}

.gamesLbSlide {
  flex: 0 0 100%;
  padding: 0 0.5rem;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .gamesLbSlide {
    flex: 0 0 50%;
  }
}

@media (min-width: 1024px) {
  .gamesLbSlide {
    flex: 0 0 33.333%;
  }
}

/* Prompt #99 follow-up — each carousel slide is ONE continuous composite card: clean artwork
   (top half, no overlay text/badges/gradients) directly above the title + leaderboard info +
   actions (bottom half), with no visible seam. Pairing stays structural — both halves are built
   from the same data bundle inside the same .gamesLbSlide by renderLeaderboardPairedCardHtml(),
   so the carousel (which only ever transforms whole slides) can never separate a game's artwork
   from its own leaderboard. This card is deliberately plain (not the shared LanternCards
   canonical card) so it can render artwork with zero overlay — the canonical card system used by
   the library grid below overlays title/badges/meta by design and stays untouched there. */
.gamesLbCard {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--lantern-card-width, 280px);
  margin: 0 auto;
  box-sizing: border-box;
}

.gamesLbArtworkBtn {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  position: relative;
  flex: 0 0 auto;
}

.gamesLbArtworkImg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gamesLbArtworkFallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(90, 167, 255, 0.35), rgba(255, 204, 102, 0.25));
}

.gamesLbArtworkFallbackHidden {
  display: none;
}

.gamesLbArtworkIcon {
  font-size: 48px;
  line-height: 1;
}

.gamesLbArtworkBtn:focus-visible {
  outline: 2px solid var(--accent, #5aa7ff);
  outline-offset: -2px;
}

.gamesLbBody {
  padding: 1rem 1.1rem;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.gamesLbCardTitle {
  margin: 0 0 0.75rem;
  font-size: 24px;
  font-weight: 900;
}

.gamesLbTop3 {
  flex: 1;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.45;
}

.gamesLbRow {
  margin-bottom: 0.35rem;
}

.gamesLbEmpty {
  margin: 0;
  color: var(--muted, #b9c6ea);
  font-size: 22px;
}

.gamesLbYou {
  margin: 0.5rem 0 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--warn, #ffcc66);
}

.gamesLbCardActions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.gamesLbViewBtn,
.gamesLbPlayBtn {
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink, #eaf0ff);
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
  font-family: inherit;
}

.gamesLbPlayBtn {
  border-color: rgba(255, 204, 102, 0.5);
  background: rgba(255, 204, 102, 0.15);
}

.gamesLbViewBtn:focus-visible,
.gamesLbPlayBtn:focus-visible,
.gamesLbCarouselBtn:focus-visible {
  outline: 2px solid var(--accent, #5aa7ff);
  outline-offset: 2px;
}

.gamesLbCarouselControls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.75rem;
}

.gamesLbCarouselBtn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink, #eaf0ff);
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
  font-family: inherit;
}

.gamesLbDots {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: center;
}

.gamesLbDot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
}

.gamesLbDot.is-active {
  background: var(--accent, #5aa7ff);
}

.gamesLbAmDefault {
  margin: 0 0 0.5rem;
  font-size: 22px;
  font-weight: 800;
  color: var(--muted, #b9c6ea);
}

.gamesAmDivisions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 1rem;
  max-width: 100%;
  overflow-x: hidden;
}

.gamesAmDivBtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink, #eaf0ff);
  font-family: inherit;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  max-width: 100%;
}

.gamesAmDivBtn.is-active {
  border-color: var(--accent, #5aa7ff);
  background: rgba(90, 167, 255, 0.18);
}

.gamesAmDivBtn.is-disabled,
.gamesAmDivBtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.35);
}

.gamesAmDivWhy {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--muted, #b9c6ea);
  white-space: pre-line;
}

.gamesLbModalRow {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 4px 10px;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-wrap: anywhere;
}

.gamesLbModalName {
  font-weight: 800;
}

.gamesLbModalMeta {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: var(--muted, #b9c6ea);
}

.gamesLbModalListAm {
  list-style: none;
  padding-left: 0;
}

@media (min-width: 520px) {
  .gamesLbModalRow {
    grid-template-columns: 2.5rem minmax(0, 1.3fr) auto auto auto;
    align-items: baseline;
  }
  .gamesLbModalMeta {
    display: contents;
  }
}

.gamesLbModal {
  position: fixed;
  inset: 0;
  z-index: 10200;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.5rem;
}

.gamesLbModal[hidden] {
  display: none !important;
}

.gamesLbModalPanel {
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow: auto;
  overflow-x: hidden;
  background: var(--panel, #0f1b33);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  padding: 1.25rem;
}

.gamesLbModal.lanternInteractiveSurface {
  align-items: flex-start;
}

.gamesLbModalPanel.lanternInteractiveSurfaceContent {
  max-height: none;
  overflow: visible;
  margin-top: auto;
  margin-bottom: auto;
}

.gamesLbModalTitle {
  margin: 0 0 1rem;
  font-size: 26px;
  font-weight: 900;
}

.gamesLbModalList {
  margin: 0;
  padding: 0 0 0 1.25rem;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.5;
}

.gamesLbModalRank {
  font-weight: 900;
  color: var(--warn, #ffcc66);
}

.gamesLbModalYou {
  margin-top: 1rem;
  font-size: 22px;
  font-weight: 800;
  color: var(--warn, #ffcc66);
}

.gamesLbModalClose {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink, #eaf0ff);
  font-weight: 800;
  font-size: 22px;
  cursor: pointer;
  font-family: inherit;
}

.gamesPremiumSection {
  margin: 0 0 2rem;
  max-width: 100%;
  overflow-x: hidden;
}

.gamesPremiumHeading {
  font-weight: 900;
  font-size: 28px;
  margin: 0 0 0.25rem;
}

.gamesPremiumSub {
  margin: 0 0 1rem;
  color: var(--muted, #b9c6ea);
  font-size: 22px;
  font-weight: 700;
}

.gamesPremiumSection .feedGrid,
.gamesLibrarySection .feedGrid {
  margin-top: 0.5rem;
  max-width: 100%;
}

.gamesPlayTriggersHost {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
