/* 80Quiz — Leaderboard Panel Styles (Retro-Neon 80s Dark Theme + Glassmorphism) */

.leaderboard-panel {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px 16px;
    box-shadow: var(--shadow-card), var(--glass-inner-glow);
    backdrop-filter: var(--glass-blur) var(--glass-saturate);
    -webkit-backdrop-filter: var(--glass-blur) var(--glass-saturate);
    position: relative;
    overflow: hidden;
}

/* Glass top highlight */
.leaderboard-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    pointer-events: none;
}

.leaderboard-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--neon-pink);
    text-align: center;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-shadow: 0 0 8px rgba(255, 40, 160, 0.4);
}

.leaderboard-title .trophy {
    font-size: 16px;
}

.leaderboard-date {
    font-family: var(--font-system);
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 16px;
}

/* Leaderboard rows — Glass Bubbles */
.leaderboard-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: background 0.3s, border-color 0.3s;
}

.leaderboard-row.rank-1 {
    background: rgba(255, 215, 0, 0.06);
    border: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 215, 0, 0.1), 0 0 16px rgba(255, 215, 0, 0.06);
}

.leaderboard-row.highlight {
    animation: goldFlash 1.5s ease-out;
    border: 1px solid rgba(255, 215, 0, 0.35);
}

.rank-number {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 22px;
    text-align: center;
}

.leaderboard-row.rank-1 .rank-number {
    color: var(--gold);
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.5);
}

.player-name {
    font-family: var(--font-system);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-score {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--neon-cyan);
    min-width: 30px;
    text-align: right;
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.3);
}

/* Empty state */
.leaderboard-empty {
    text-align: center;
    padding: 20px 0;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-muted);
}

/* Total players */
.total-players {
    text-align: center;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-family: var(--font-system);
    font-size: 12px;
    color: var(--text-muted);
}

.total-players span {
    color: var(--neon-cyan);
    font-weight: 600;
}

/* Loading skeleton */
.leaderboard-loading {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.skeleton-row {
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.02) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive: stacked on mobile */
@media (max-width: 900px) {
    .leaderboard-panel {
        margin-top: 8px;
    }

    .leaderboard-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
    }

    .leaderboard-row {
        flex: 1;
        min-width: calc(50% - 4px);
    }
}