/* ═══ POLYSTATS — Leaderboard Styles ═══ */

/* ── Podium TOP-3 ── */
.lb-podium {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 16px; padding: 30px 20px 20px; margin-bottom: 24px;
}
.lb-podium-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 20px 16px 16px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; min-width: 160px;
  transition: all 0.3s; position: relative;
  animation: fadeInUp 0.5s ease backwards;
}
.lb-podium-item:nth-child(1) { animation-delay: 0.2s; }
.lb-podium-item:nth-child(2) { animation-delay: 0s; }
.lb-podium-item:nth-child(3) { animation-delay: 0.4s; }

.lb-podium-item.gold {
  border-color: var(--gold); order: 2;
  background: linear-gradient(180deg, rgba(255,215,0,0.06) 0%, var(--panel) 100%);
  box-shadow: 0 0 30px rgba(255,215,0,0.15);
  transform: scale(1.08);
}
.lb-podium-item.silver {
  border-color: var(--silver); order: 1;
  background: linear-gradient(180deg, rgba(192,192,192,0.04) 0%, var(--panel) 100%);
  box-shadow: 0 0 20px rgba(192,192,192,0.1);
}
.lb-podium-item.bronze {
  border-color: var(--bronze); order: 3;
  background: linear-gradient(180deg, rgba(205,127,50,0.04) 0%, var(--panel) 100%);
  box-shadow: 0 0 20px rgba(205,127,50,0.1);
}
.lb-podium-medal { font-size: 36px; margin-bottom: 8px; }
.lb-podium-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Orbitron', monospace; font-size: 20px; font-weight: 900;
  color: #fff; margin-bottom: 8px;
}
.lb-podium-item.gold .lb-podium-avatar { box-shadow: 0 0 20px rgba(255,215,0,0.4); }
.lb-podium-item.silver .lb-podium-avatar { box-shadow: 0 0 16px rgba(192,192,192,0.3); }
.lb-podium-item.bronze .lb-podium-avatar { box-shadow: 0 0 16px rgba(205,127,50,0.3); }
.lb-podium-name {
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 700;
  color: var(--text); margin-bottom: 4px; text-align: center;
  max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lb-podium-profit {
  font-family: 'JetBrains Mono', monospace; font-size: 18px; font-weight: 700;
  margin-bottom: 4px;
}
.lb-podium-stats {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--muted); display: flex; gap: 8px;
}
.lb-podium-item.is-me { border-width: 2px; }
.lb-podium-item.is-me::after {
  content: 'ВЫ'; position: absolute; top: -10px;
  font-family: 'Orbitron', monospace; font-size: 9px; font-weight: 700;
  color: var(--cyan); background: var(--bg); padding: 2px 8px;
  border: 1px solid var(--cyan); border-radius: 4px; letter-spacing: 2px;
}

/* ── Leaderboard Table (4th+) ── */
.lb-table-section {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
}
.lb-table { width: 100%; border-collapse: collapse; }
.lb-table thead th {
  padding: 12px 16px; font-size: 10px; font-weight: 600;
  color: var(--muted); text-align: left; letter-spacing: 1.2px;
  text-transform: uppercase; border-bottom: 1px solid var(--border);
  font-family: 'Inter', sans-serif;
}
.lb-table tbody tr {
  border-bottom: 1px solid rgba(26,58,74,0.4);
  transition: all 0.15s; animation: fadeIn 0.3s ease backwards;
}
.lb-table tbody tr:hover { background: rgba(0,212,255,0.04); }
.lb-table tbody tr.is-me { background: rgba(0,212,255,0.08); border-left: 3px solid var(--cyan); }
.lb-table td {
  padding: 12px 16px;
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
}
.lb-rank {
  font-family: 'Orbitron', monospace; font-size: 14px; font-weight: 700;
  color: var(--muted); width: 40px; text-align: center;
}
.lb-user-cell { display: flex; align-items: center; gap: 10px; }
.lb-user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Orbitron', monospace; font-size: 13px; font-weight: 700;
  color: #fff; flex-shrink: 0;
}
.lb-user-name { font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600; color: var(--text); }
.lb-profit { font-weight: 700; font-size: 14px; }
.lb-winrate { color: var(--yellow); }
.lb-sessions { color: var(--muted); }

/* ── Scope filter ── */
.lb-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
}
.lb-scope-toggle {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted);
}
.lb-scope-toggle input[type="checkbox"] {
  appearance: none; width: 38px; height: 20px;
  background: var(--border); border-radius: 10px;
  position: relative; cursor: pointer; transition: background 0.3s;
}
.lb-scope-toggle input[type="checkbox"]::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--muted); transition: all 0.3s;
}
.lb-scope-toggle input[type="checkbox"]:checked {
  background: var(--cyan);
}
.lb-scope-toggle input[type="checkbox"]:checked::after {
  left: 20px; background: #fff;
}

/* ── Empty state ── */
.lb-empty {
  text-align: center; padding: 60px 40px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; color: var(--muted);
}
.lb-empty::before { content: '🏆'; display: block; font-size: 48px; margin-bottom: 12px; opacity: 0.5; }

@media (max-width: 768px) {
  .lb-podium { flex-direction: column; align-items: center; }
  .lb-podium-item { order: unset !important; transform: none !important; min-width: 200px; }
}
