:root {
    --bg-color: #121212;
    --container-bg: #1e1e24;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --accent-color: #00d2ff;
    --accent-glow: rgba(0, 210, 255, 0.4);
    --gold: #ffd700;
    --silver: #c0c0c0;
    --bronze: #cd7f32;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
}

.leaderboard-container {
    background-color: var(--container-bg);
    width: 100%;
    max-width: 800px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #2b2b36 0%, #1e1e24 100%);
    padding: 30px;
    text-align: center;
    border-bottom: 2px solid var(--accent-color);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.header h1 {
    margin: 0;
    font-size: 2.5em;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.header p {
    color: var(--text-muted);
    margin-top: 10px;
}

.player-list {
    padding: 20px;
    position: relative; /* Indispensable pour l'animation */
    transition: height 0.5s ease-in-out; /* Permet d'agrandir la liste en douceur */
}

.player-row {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.03);
    padding: 12px 20px;
    border-radius: 8px;
    
    /* --- NOUVEAU : Position absolue pour glisser --- */
    position: absolute;
    left: 20px;
    right: 20px;
    height: 72px; /* Hauteur fixe requise pour l'animation */
    box-sizing: border-box;
    /* L'animation magique avec un effet "rebond" quand on double un joueur */
    transition: top 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s, transform 0.2s;
}

.player-row:hover {
    transform: translateX(5px);
    background-color: rgba(255, 255, 255, 0.08);
}

.rank {
    font-size: 1.5em;
    font-weight: bold;
    width: 50px;
    color: var(--text-muted);
}

.rank-1 { color: var(--gold); text-shadow: 0 0 10px rgba(255,215,0,0.5); }
.rank-2 { color: var(--silver); }
.rank-3 { color: var(--bronze); }

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    margin-right: 20px;
    image-rendering: pixelated;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.username {
    font-size: 1.2em;
    font-weight: 600;
    flex-grow: 1;
}

.score {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--accent-color);
}

.error-msg {
    color: #ff4c4c;
    text-align: center;
    padding: 20px;
    background: rgba(255, 76, 76, 0.1);
    border: 1px solid #ff4c4c;
    border-radius: 8px;
    margin: 20px;
}