/* Leaderboard + Online Students widget (sidebar card) */

.leaderboard-card {
    padding: 1rem 1.1rem;
}

.leaderboard-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}

.leaderboard-head h3 {
    margin: 0;
    font-size: 1.02rem;
}

.leaderboard-online {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #15803d;
    background: rgba(21, 128, 61, 0.08);
    border: 1px solid rgba(21, 128, 61, 0.25);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    white-space: nowrap;
}

.lb-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: lb-pulse 1.6s ease-in-out infinite;
}

@keyframes lb-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.8); }
}

.leaderboard-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.lb-section {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--dark-muted, #6b7280);
    margin: 0.5rem 0 0.2rem;
}

.lb-section:first-child {
    margin-top: 0;
}

.lb-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.42rem 0.5rem;
    border-radius: 8px;
}

.lb-row:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

.lb-rank {
    flex: 0 0 auto;
    width: 1.55rem;
    height: 1.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--dark-muted, #6b7280);
    background: var(--light, #f1f5f9);
}

.lb-rank-1 .lb-rank { background: #f59e0b; color: #fff; }
.lb-rank-2 .lb-rank { background: #94a3b8; color: #fff; }
.lb-rank-3 .lb-rank { background: #b45309; color: #fff; }

.lb-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.lb-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--dark, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-meta {
    font-size: 0.68rem;
    color: var(--dark-muted, #6b7280);
}

.lb-band {
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--primary, #6d28d9);
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 999px;
    padding: 0.12rem 0.55rem;
}

.leaderboard-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    text-align: center;
    padding: 0.75rem 0.25rem;
    color: var(--dark-muted, #6b7280);
    font-size: 0.82rem;
}

.leaderboard-msg-icon {
    font-size: 1.4rem;
}

.leaderboard-retry {
    margin-top: 0.2rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary, #6d28d9);
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 999px;
    padding: 0.3rem 0.9rem;
    cursor: pointer;
}

@media (max-width: 480px) {
    .leaderboard-head h3 { font-size: 0.95rem; }
    .lb-name { font-size: 0.78rem; }
    .lb-meta { font-size: 0.64rem; }
    .lb-band { font-size: 0.72rem; padding: 0.1rem 0.45rem; }
}
