.leaderboard-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(145deg, #1e1e1e, #151515);
    color: white;
    padding: 16px 20px;
    border-radius: 10px;
    border: 1px solid #333;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    width: 280px;
    max-width: 90vw;
    z-index: 100;
}

#leaderboard-toggle {
    display: none;
}

.leaderboard-panel h2 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 800;
    background: linear-gradient(90deg, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    border-bottom: 1px solid #333;
    padding-bottom: 12px;
}

.leaderboard-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}

.leaderboard-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
    transition: background 0.2s;
    border-radius: 6px;
}

.leaderboard-list li:hover {
    background: rgba(255, 255, 255, 0.03);
}

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

.leaderboard-list .rank {
    font-weight: 800;
    width: 28px;
    color: #888;
    font-size: 13px;
}

/* Mise en avant spécifique du Top 3 dans l'esprit de la DA */
.leaderboard-list li:nth-child(1) .rank {
    color: #ff4757;
}
.leaderboard-list li:nth-child(2) .rank {
    color: #fff;
}
.leaderboard-list li:nth-child(3) .rank {
    color: #aaa;
}

.leaderboard-list .name {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ddd;
}

.leaderboard-list .clicks {
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    margin-left: 10px;
}

.leaderboard-list .lb-empty {
    justify-content: center;
    color: #666;
}

.leaderboard-list::-webkit-scrollbar { width: 4px; }
.leaderboard-list::-webkit-scrollbar-track { background: transparent; }
.leaderboard-list::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.lvl-badge {
    background: #2a2a2a;
    color: #ffaa00;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 170, 0, 0.3);
}

/* ===== TON SCORE (sous le classement) ===== */
.my-score {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #333;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.my-score-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #aaa;
    margin-bottom: 6px;
    font-weight: 700;
}

.my-score-value {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.my-score-hint {
    font-size: 12px;
    color: #666;
}

/* ===== TÉLÉPHONES (TIROIR) ===== */
@media (max-width: 768px) {
    .leaderboard-panel {
        position: fixed;
        top: 20px;
        right: -210px;
        width: 190px;
        padding: 12px;
        transition: right 0.3s ease-in-out;
    }

    .leaderboard-panel.open {
        right: 10px;
    }

    #leaderboard-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 0;
        left: -35px;
        width: 35px;
        height: 44px;
        background: linear-gradient(145deg, #1e1e1e, #151515);
        color: white;
        border: 1px solid #333;
        border-right: none;
        border-radius: 8px 0 0 8px;
        cursor: pointer;
        font-size: 12px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    }

    .arrow {
        transition: transform 0.3s ease;
        display: inline-block;
    }
    .leaderboard-panel.open .arrow {
        transform: rotate(180deg);
    }

    .leaderboard-panel h2 { font-size: 14px; margin: 0 0 10px 0; padding-bottom: 8px; }
    .leaderboard-list { max-height: 160px; }
    .leaderboard-list li { font-size: 12px; padding: 6px 4px; }
    .leaderboard-list .rank { width: 20px; }
    .my-score-value { font-size: 13px; }
}