/* ─── Leaderboard Page ────────────────────────────────────── */
#page-leaderboard { display: none; }
#page-leaderboard.active { display: flex; flex-direction: column; gap: 14px; }

/* Filter chips */
.lb-filter {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px;
  scrollbar-width: none;
}
.lb-filter::-webkit-scrollbar { display: none; }

.lb-chip {
  flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 7px 14px;
  font-size: 12px; font-weight: 600; color: var(--text2);
  cursor: pointer; transition: all .2s;
  -webkit-tap-highlight-color: transparent;
}
.lb-chip.active {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent; color: #fff;
}

/* Podium */
.podium {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 8px; padding: 16px 0 4px;
}
.podium-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  flex: 1; max-width: 110px;
}
.podium-avatar {
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; position: relative;
  overflow: hidden;
}
.podium-photo {
  width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%;
}
.podium-item:nth-child(1) .podium-avatar { /* 2nd */
  width: 52px; height: 52px; font-size: 20px;
  background: linear-gradient(135deg, #a0a0a0, #c0c0c0);
}
.podium-item:nth-child(2) .podium-avatar { /* 1st */
  width: 64px; height: 64px; font-size: 24px;
  background: linear-gradient(135deg, #e8a800, #f5c842);
  box-shadow: 0 0 28px rgba(245,200,66,.4);
}
.podium-item:nth-child(3) .podium-avatar { /* 3rd */
  width: 48px; height: 48px; font-size: 18px;
  background: linear-gradient(135deg, #7a4f2c, #cd7f32);
}
.podium-crown {
  position: absolute; top: -14px; font-size: 16px; display: none;
}
.podium-item:nth-child(2) .podium-crown { display: block; }

.podium-name {
  font-size: 11px; font-weight: 600; text-align: center;
  max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.podium-value { font-size: 14px; font-weight: 800; }
.podium-pos   { font-size: 10px; color: var(--text2); }
.podium-bar   { border-radius: 6px 6px 0 0; width: 100%; }
.podium-item:nth-child(1) .podium-bar { height: 50px; background: rgba(192,192,192,.25); }
.podium-item:nth-child(2) .podium-bar { height: 70px; background: rgba(245,200,66,.2); }
.podium-item:nth-child(3) .podium-bar { height: 38px; background: rgba(205,127,50,.2); }

/* Leaderboard list */
.lb-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.lb-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
  transition: background .2s;
}
.lb-row.is-me {
  background: rgba(124,92,252,.12);
  border-color: rgba(124,92,252,.35);
}
.lb-pos {
  font-size: 16px; font-weight: 800; color: var(--text2);
  min-width: 22px; text-align: center;
}
.lb-pos.gold   { color: var(--gold); }
.lb-pos.silver { color: #c0c0c0; }
.lb-pos.bronze { color: #cd7f32; }

.lb-mini-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
  overflow: hidden;
}
.lb-photo {
  width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%;
}
.lb-info { flex: 1; }
.lb-name { font-size: 14px; font-weight: 600; }
.lb-rank { font-size: 11px; color: var(--text2); }
.lb-val  { font-size: 16px; font-weight: 800; color: var(--accent2); }
