/* Reset CSS */
body, h1, h2, h3, p, ul, ol, li, table, td, th {
    margin: 0;
    padding: 0;
    border: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
    justify-content: center; 
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    margin: 0 5px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    background-color: #FB52;
    color: #333;
}

.tab-btn.active {
    background-color: #D3FB52;
}

.leaderboard-section {
    background-color: #FFF;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    overflow-x: auto;
    display: none; /* Initially hide all sections except the active one */
}

.leaderboard-section.active {
    display: block; /* Show the active section */
}

.leaderboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 15px;
    min-width: 40px;
}

th, td {
    text-align: center;
    padding: 15px;
    background-color: #FFF;
    color: #595959;
    font-size: 12px;
    max-width: 140px;
    word-wrap: break-word;
}

th {
    background-color: #7962BD;
    color: #FFF;
    position: relative;
    cursor: pointer;
    min-width: 100px;
    
}

.sort-icon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.sort-icon {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 5px 8px 5px;
    border-color: transparent transparent #ffffff transparent;
    display: block;
}

.sort-icon + .sort-icon {
    margin-top: 4px;
}

.sort-icon.desc {
    border-width: 8px 5px 0 5px;
    border-color: #ffffff transparent transparent transparent;
}

tr {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

tr td:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

tr td:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

@media only screen and (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .tab-btn {
        width: 100%;
        margin: 5px 0;
        border-radius: 10px;
    }

    th {
        padding-right: 20px;
    }

    .tab-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}
