/* ==========================================================================
   LEADERBOARDS / TOPPLISTER - ULTRA TIGHT DATA LIST THEME
   ========================================================================== */

.leaderboard-layout {
  max-width: 960px;
  margin: 1rem auto;
  padding: 0 0.8rem;
  font-family: 'Outfit', sans-serif;
}

.leaderboard-panel {
  background: linear-gradient(135deg, rgba(23, 48, 32, 0.96) 0%, rgba(11, 23, 14, 0.98) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(94, 163, 116, 0.3);
  padding: 1rem 1.2rem;
  position: relative;
  overflow: hidden;
}

.leaderboard-panel::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(0,0,0,0) 70%);
  pointer-events: none;
}

.leaderboard-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  text-align: center;
  color: #ffffff;
  margin-top: 0;
  margin-bottom: 0.8rem;
  letter-spacing: -0.5px;
}

/* Tabs */
.league-tabs {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.5rem;
}

.league-tab {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  padding: 0.35rem 0.8rem;
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.84rem;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.league-tab:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.league-tab.active {
  background: rgba(16, 185, 129, 0.18);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

/* Status Banner */
.user-status-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(15, 30, 20, 0.9) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 12px;
  padding: 0.65rem 1rem;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.user-status-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.user-status-info h3 {
  margin: 0 0 0.1rem 0;
  font-family: 'Outfit', sans-serif;
  color: #f59e0b;
  font-weight: 900;
  font-size: 1.05rem;
}

.user-status-info p {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.82rem;
  line-height: 1.3;
}

/* Leaderboard List - SEAMLESS ZERO GAP DATA LIST */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(10, 20, 13, 0.7);
}

.leaderboard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease;
  position: relative;
}

.leaderboard-list .leaderboard-row:last-child {
  border-bottom: none;
}

.leaderboard-row:hover {
  background: rgba(16, 185, 129, 0.12);
}

.leaderboard-row.is-current-user {
  background: rgba(16, 185, 129, 0.25) !important;
  box-shadow: inset 0 0 10px rgba(16, 185, 129, 0.3);
}

/* CIRCLE OUTLINE AROUND RANK NUMBER */
.row-rank-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 0.85rem;
  flex-shrink: 0;
  box-sizing: border-box;
}

.rank-1-circle {
  border: 2px solid #f59e0b;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.18);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.rank-2-circle {
  border: 2px solid #cbd5e1;
  color: #f1f5f9;
  background: rgba(203, 213, 225, 0.15);
}

.rank-3-circle {
  border: 2px solid #cd7f32;
  color: #fdba74;
  background: rgba(205, 127, 50, 0.15);
}

.rank-default-circle {
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: #94a3b8;
  background: rgba(0, 0, 0, 0.2);
}

.row-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.3);
  margin-left: 0.75rem;
  margin-right: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  overflow: hidden;
}

.row-name {
  flex: 1;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.92rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-score {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 0.98rem;
  color: #f59e0b;
  text-align: right;
  flex-shrink: 0;
}

/* Loader */
.leaderboard-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.85rem;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255,255,255,0.1);
  border-left-color: #10b981;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 0.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
