:root {
  --leaderboard-green: #c8ff00;
  --leaderboard-purple: #7622f0;
  --leaderboard-ink: #04020f;
  --leaderboard-muted: #8990ae;
}

body.leaderboard-page {
  margin: 0;
  background: #f7f8f8;
  color: var(--leaderboard-ink);
  font-family: "Inter", "Arial", sans-serif;
}

.leaderboard-shell {
  width: min(100%, 430px);
  margin: 0 auto;
  padding-bottom: calc(var(--ab-mobile-bottom-nav-height, 57px) + env(safe-area-inset-bottom, 0px) + 16px);
  background: #fff;
  min-height: 100vh;
}

.leaderboard-hero {
  position: relative;
  min-height: 320px;
  overflow: visible;
  background: var(--leaderboard-green);
}

.leaderboard-mobile-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 0;
}

.leaderboard-mobile-header .top-logo {
  display: flex;
  width: 92px;
}

.leaderboard-mobile-header__logo {
  max-width: 92px;
}

.leaderboard-mobile-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.leaderboard-mobile-header .header-components,
.leaderboard-mobile-header .header-components-2 {
  min-width: 82px;
  height: 34px;
  border: 1px solid var(--leaderboard-purple);
  border-radius: 999px;
  background: transparent;
}

.leaderboard-mobile-header .header-components-2 {
  min-width: 86px;
}

.leaderboard-podium {
  position: absolute;
  inset: 24px 0 0;
  display: grid;
  grid-template-columns: 1fr 1.12fr 1fr;
  align-items: end;
  gap: 16px;
  padding: 0 16px;
}

.podium-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  text-align: center;
}

.podium-card__avatar,
.leaderboard-player__avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--leaderboard-purple);
  border-radius: 50%;
  background: linear-gradient(135deg, #fff, #ebe2ff);
  color: var(--leaderboard-purple);
  font-weight: 900;
}

.podium-card__avatar {
  width: 38px;
  height: 38px;
  margin-bottom: 6px;
}

.podium-card__avatar img,
.leaderboard-player__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.podium-card p {
  margin: 0;
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(4, 2, 15, 0.78);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.podium-card strong {
  margin-top: 2px;
  font-size: 18px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.podium-card span {
  max-width: 110px;
  color: rgba(4, 2, 15, 0.68);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.05;
}

.podium-card__block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  margin-top: 8px;
  padding-bottom: 8px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, #8e29ff 0%, #7019e8 100%);
  color: var(--leaderboard-green);
  box-shadow: inset 0 10px 20px rgba(255, 255, 255, 0.12);
}

.podium-card__block b {
  font-size: 31px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.podium-card__block small {
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.podium-card--first {
  padding-top: 0;
}

.podium-card--first .podium-card__avatar {
  width: 42px;
  height: 42px;
}

/* Sergio (Jun 11): drop the gold/silver/bronze risers — all three blocks keep
   the brand purple gradient (inherited from .podium-card__block). Only the
   block HEIGHT differentiates 1st / 2nd / 3rd, and align-items:end keeps every
   block sitting on the same bottom baseline. */
.podium-card--first .podium-card__block {
  min-height: 118px;
}

.podium-card--second .podium-card__block {
  min-height: 72px;
}

.podium-card--third .podium-card__block {
  min-height: 72px;
}

.leaderboard-panel {
  position: relative;
  z-index: 2;
  margin-top: 8px;
  padding: 18px 16px 28px;
  border-radius: 20px 20px 0 0;
  background: #fff;
  box-shadow: 0 -4px 18px rgba(4, 2, 15, 0.06);
}

@media (max-width: 480px) {
  /* Extend the neon-green up behind the AB logo + wallet/betslip pills so the
     header reads as one block with the hero from the very top of the page. */
  body.leaderboard-page .top {
    background: var(--leaderboard-green);
  }

  .leaderboard-hero {
    min-height: 340px;
  }

  .leaderboard-podium {
    inset: 44px 0 24px;
  }

  .podium-card--first .podium-card__block {
    min-height: 130px;
  }

  .podium-card--second .podium-card__block {
    min-height: 96px;
  }

  .podium-card--third .podium-card__block {
    min-height: 64px;
  }
}

.leaderboard-period-tabs {
  display: flex;
  align-items: center;
  border-radius: 999px;
  background: #f3f6f6;
  width: max-content;
  margin: 0 auto 24px;
  padding: 2px;
}

.leaderboard-period-tabs button {
  border: 0;
  background: transparent;
  color: var(--leaderboard-ink);
  font: inherit;
  cursor: pointer;
  min-width: 68px;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.leaderboard-period-tabs button.is-active {
  background: var(--leaderboard-ink);
  color: #fff;
}

.leaderboard-heading h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.05;
}

.leaderboard-heading p {
  margin: 4px 0 22px;
  color: #b5b8c8;
  font-size: 13px;
  font-weight: 700;
}

.leaderboard-search {
  display: grid;
  grid-template-columns: 1fr 34px auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.leaderboard-search label {
  display: block;
  min-width: 0;
}

.leaderboard-search input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--leaderboard-muted);
  border-radius: 0;
  padding: 9px 0;
  background: transparent;
  color: var(--leaderboard-ink);
  font: inherit;
  outline: none;
}

.leaderboard-search__icon {
  width: 30px;
  height: 30px;
  border: 2px solid var(--leaderboard-purple);
  border-radius: 50%;
  background: transparent;
  position: relative;
}

.leaderboard-search__icon::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -3px;
  width: 11px;
  height: 2px;
  border-radius: 999px;
  transform: rotate(45deg);
  background: var(--leaderboard-purple);
  opacity: 0.45;
}

#leaderboardFindMe {
  min-width: 86px;
  padding: 11px 16px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #9232ff, #7622f0);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 5px 0 #4a079b;
}

.leaderboard-table-head {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  padding: 0 14px 8px;
  color: #a9acb9;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.leaderboard-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 14px 0 6px;
  border: 1px solid var(--leaderboard-ink);
  border-radius: 999px;
  background: #fff;
}

.leaderboard-row.is-muted {
  opacity: 0.38;
}

.leaderboard-row.is-me {
  border-color: var(--leaderboard-purple);
  box-shadow: 0 0 0 2px rgba(118, 34, 240, 0.14);
}

.leaderboard-rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #c8ccd9;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
}

.leaderboard-player {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.leaderboard-player__avatar {
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  font-size: 12px;
}

.leaderboard-player__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #565e76;
  font-size: 12px;
  font-weight: 800;
}

.leaderboard-score {
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.leaderboard-empty {
  margin: 18px 0;
  text-align: center;
  color: var(--leaderboard-muted);
  font-weight: 800;
}

.leaderboard-load {
  display: block;
  margin: 24px auto 0;
  padding: 14px 26px;
  border: 2px solid var(--leaderboard-purple);
  border-radius: 14px;
  background: #fff;
  color: var(--leaderboard-purple);
  font-size: 18px;
  font-weight: 900;
}

.leaderboard-faq {
  padding: 26px 16px 8px;
  background: #fff;
}

.leaderboard-faq h2 {
  margin: 0 0 20px;
  font-size: 20px;
}

.leaderboard-faq details {
  border-bottom: 1px solid #eceef2;
  padding: 0 0 18px;
  margin-bottom: 18px;
}

.leaderboard-faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  list-style: none;
}

.leaderboard-faq summary::-webkit-details-marker {
  display: none;
}

.leaderboard-faq summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
}

.leaderboard-faq details[open] summary::after {
  content: "\2014";
}

.leaderboard-faq p {
  margin: 14px 0 0;
  color: #c1c4cf;
  font-size: 13px;
  line-height: 1.28;
}

@media (min-width: 768px) {
  .leaderboard-page .top-nav-desktop,
  .leaderboard-page .frame-4 {
    display: flex;
  }

  .leaderboard-shell {
    margin-top: 96px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(4, 2, 15, 0.12);
  }
}
