body {
    height: fit-content;
}

#leaderboard_header {
    margin: auto;
    width: fit-content;
}

#region_filters,
#leaderboard_categories {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    max-width: 800px;
    margin-bottom: 1em;
    cursor: pointer;
}

.region,
.category {
    padding: 10px;
    margin: auto;
    width: fit-content;
    text-align: center;
    border-radius: 6px;
    /* Make it so double clicking an item doesn't highlight the text */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -khtml-user-select: none;
    -ms-user-select: none;
}

.region:hover,
.category:hover {
    color: rgb(162, 255, 255);
}

.region.active,
.category.active {
    background-color: var(--primary-color);
}

.rankings_wrapper {
    margin: auto;
    max-width: fit-content;
    min-width: 700px;
    padding: 20px 50px;
    border: solid;
    border-width: 2px;
    border-radius: 6px;
}

@media (width <=820px) {
    .rankings_wrapper {
        min-width: 600px;
        overflow-x: scroll;
    }
}

@media (width <=670px) {
    .rankings_wrapper {
        min-width: 500px;
    }
}

@media screen and (max-width: 590px) {
    main {
        padding: 3em 1em 2em 1em;
    }

    .rankings_wrapper {
        padding: 4px 8px;
        font-size: 13px;
        min-width: 450px;
    }
}

@media (width <=490px) {
    .rankings_wrapper {
        min-width: 380px;
    }
    .region,
    .category {
        padding: 4px;
    }
}

@media (width <=410px) {
    .rankings_wrapper {
        min-width: 300px;
    }
}