/**
 * Games leaderboard pages — front-end styles for games-leaderboard-template.php
 * (/games/leaderboard and /games/{slug}/leaderboard). House game theme:
 * Poppins, purple accent, the same board look as the in-game leaderboards.
 */

.games-lb-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.games-lb {
  --lb-accent: #b898ff;
  --lb-accent-dark: #7c4dff;
  --lb-ink: #1a1a1a;
  --lb-muted: #6b6b72;
  --lb-line: #e6e6ec;
  --lb-radius: 12px;
  font-family: 'Poppins', system-ui, sans-serif;
  color: var(--lb-ink);
}

.games-lb__breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 1rem;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--lb-accent-dark);
  text-transform: uppercase;
  letter-spacing: .08em;
  text-decoration: none;
}
.games-lb__breadcrumb:hover,
.games-lb__breadcrumb:focus-visible { color: #5b2ec4; text-decoration: none; }
.games-lb__breadcrumb-arrow { display: inline-block; transform: translateX(-2px); }

.games-lb__title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.15;
  margin: 0 0 .6rem;
}
.games-lb__subtitle { font-size: 1.3rem; margin: 2.25rem 0 .75rem; }
.games-lb__intro { font-size: 1.02rem; line-height: 1.6; margin: 0 0 1rem; color: var(--lb-ink); }
.games-lb__intro a { color: var(--lb-accent-dark); font-weight: 600; }

.games-lb__note {
  margin: 0 0 1.25rem;
  padding: .8rem 1rem;
  border: 1px solid var(--lb-line);
  border-left: 3px solid var(--lb-accent-dark);
  border-radius: 10px;
  background: #faf8ff;
  font-size: .95rem;
}

/* Board (mirrors the in-game boards). */
.games-lb__board { list-style: none; margin: 0; padding: 0; }
.games-lb__row {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  align-items: center;
  gap: .5rem;
  padding: .65rem .85rem;
  border-bottom: 1px solid var(--lb-line);
}
.games-lb__row.is-me {
  background: #f4f0ff;
  border-radius: 8px;
  border-bottom-color: transparent;
  font-weight: 600;
}
.games-lb__row.is-me em { color: var(--lb-accent-dark); font-style: normal; font-size: .8rem; }
.games-lb__rank { font-weight: 700; color: var(--lb-accent-dark); }
.games-lb__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.games-lb__score { font-variant-numeric: tabular-nums; font-weight: 600; }
.games-lb__empty { color: var(--lb-muted); font-style: italic; padding: .6rem .85rem; }
.games-lb__sep {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: .4rem 0;
  padding: .3rem 0;
  color: var(--lb-accent-dark);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.games-lb__sep::before,
.games-lb__sep::after {
  content: '';
  flex: 1;
  height: 0;
  border-top: 2px dashed var(--lb-accent);
  opacity: .8;
}

/* Per-game directory on the global page. */
.games-lb__games { list-style: none; margin: 0; padding: 0; }
.games-lb__game {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem .85rem;
  border-bottom: 1px solid var(--lb-line);
}
.games-lb__game a { color: var(--lb-ink); font-weight: 600; text-decoration: none; }
.games-lb__game a:hover { color: var(--lb-accent-dark); }
.games-lb__game-rank {
  font-size: .78rem;
  font-weight: 700;
  color: var(--lb-accent-dark);
  background: #f4f0ff;
  border-radius: 999px;
  padding: .15rem .6rem;
  white-space: nowrap;
}

/* Buttons. */
.games-lb__cta { margin: 1.5rem 0 0; }
.games-lb__btn {
  display: inline-block;
  font-weight: 600;
  border-radius: 999px;
  padding: .6rem 1.5rem;
  background: var(--lb-accent-dark);
  color: #fff;
  text-decoration: none;
}
.games-lb__btn:hover { background: #6a3df0; color: #fff; }

/* "How points work" explainer on the global board. */
.games-lb__how {
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem 1rem 1.1rem;
  border-radius: 16px;
  background: #f8f5ff;
  box-shadow: inset 0 0 0 2px #efe8ff, inset 5px 0 0 #651fff;
}
.games-lb__how-title {
  margin: 0 0 .5rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #1f0766;
}
.games-lb__how-list {
  margin: 0;
  padding-left: 1.2rem;
  color: #3d3360;
  font-size: .95rem;
  line-height: 1.55;
}
.games-lb__how-list li + li { margin-top: .35rem; }
