#leaderboard-panel {
    position: fixed;
    width: calc(100% - 2rem - 10%);
    margin: 5rem 5%;
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    min-width: 330px;
    max-height: calc(100dvh - 12rem);
    z-index: 6;
    
    animation: leaderboardPanelAnimation 0.3s ease;
    &:not(.visible){
        display: none;
    }

    & > h1{
        text-align: center;
        margin-bottom: 1.5rem;
    }
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;

    & tr.connected_user{
        background-color: orange;
    }
}

.leaderboard-table th, .leaderboard-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

.leaderboard-table th {
    background-color: #eee;
}

#leaderboard-pagination {
    text-align: center;
    margin-top: 1rem;
}

#leaderboard-pagination button {
    padding: 5px 10px;
    margin: 0 5px;
    cursor: pointer;
}

.highlight-user-rank {
    margin-top: 1rem;
    padding: 0.5rem;
    background-color: #dfefff;
    border-left: 5px solid #0077cc;
}


.leaderboard_button {
    position: fixed;
    top: 5rem;
    left: 1rem;
    border-radius: 50px;
    box-shadow: 0 0 3px #333;
    border: none;
    cursor: pointer;
    height: 3rem;
    overflow: hidden;
    display: inline-flex;
    background: white;
    z-index: 5;
}

.leaderboard_button > .emoji {
    font-size: 1.5rem;
    line-height: 3rem;
    aspect-ratio: 1/1;
}

.leaderboard_button > span:last-child {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: black;
    margin: auto;
    transition: all 0.3s;
    max-width: 0;
}

.leaderboard_button:hover > span:last-child{
    max-width: 8rem;
    margin-right: 10px;
}

@keyframes leaderboardPanelAnimation {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}