body {
    font-family: "Cascadia Mono", monospace;
    background-color: rgb(35, 35, 35);
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 0;
}

header {
    width: calc(100% - 2em);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1em;
    position: sticky;
    margin-bottom: 1em;
    top: 0;
    z-index: 100;
    background-color: rgb(25, 25, 25);
    border-radius: 0 0 1em 1em;
}

.logo-navigation {
    display: flex;
    align-items: center;
    gap: 1.5em;
}

.logo {
    font-size: 1.5em;
}

.navigation, .footer-links {
    display: flex;
    gap: 1em;
    align-items: center;
    margin: 0 0;
    padding: 0;
    list-style-type: none;
}

.footer-links li::after {
    content: " | ";
}

.footer-links li:last-child::after {
    content: "";
}

.navigation a {
    transition: color 0.3s ease;
    text-decoration: none;
}

.navigation a.inactive {
    color: rgba(255, 255, 255, 0.6);
}

.user-avatar {
    width: 5em;
    height: 5em;
    border-radius: 1em;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.5);
}

header .react-app {
    width: auto;
}

.react-app.db-state {
    display: block;
    width: auto;
}

.search {
    padding: 0.5em;
    border: 1px solid black;
    background-color: white;
    border-radius: 0.5em;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5em;
    width: 350px;
}

.search input[type="text"] {
    padding: 0;
    border: none;
}

.search::before {
    display: block;
    width: 1em;
    height: 1em;
    content: "";
    mask-image: url("../images/search.svg");
    -webkit-mask-image: url("../images/search.svg");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    background-color: rgb(35, 35, 35);
}

.search-result {
    display: flex;
    gap: 0.5em;
    align-items: center;
    background-color: rgb(30, 30, 30);
    padding: 0.5em;
    text-decoration-color: white;
    border-radius: 0.5em;
    font-size: 1.5em;
    transition: background-color ease-in-out 0.2s;
}

.search-result * {
    color: white;
    text-overflow: ellipsis;
    overflow: hidden;
}

.search-result .user-avatar {
    width: 2em;
    height: 2em;
    object-fit: contain;
    border-radius: 0.5em;
}

.search-result .country-img {
    height: 1em;
}

.search-result:hover {
    background-color: rgb(45, 45, 45);
}

.search-results {
    position: absolute;
    width: calc(350px + 1em);
    z-index: 100;
    max-height: 200px;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 0.5em;
}

.search-results .search-result {
    width: 100%;
    border-radius: 0 0 0 0;
}

.search-results .search-result:first-child {
    border-radius: 0.5em 0.5em 0 0;
}

.search-results .search-result:last-child {
    border-radius: 0 0 0.5em 0.5em;
}

footer {
    width: calc(100% - 2em);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1em;
    padding: 1em;
    margin-top: 1em;
    z-index: 100;
    background-color: rgb(25, 25, 25);
    border-radius: 1em 1em 0 0;
}

input[type="number"], input[type="text"], input[type="date"], select {
    font-size: 1em;
    padding: 0.5em;
    border-radius: 0.25em;
    border: 1px solid black;
    font-family: "Cascadia Mono", monospace;
}

input[type="date"] {
    width: 7.8em;
}

input[type="number"] {
    width: 4em;
}

select {
    min-width: 4.5em;
}   

.component-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1em;
    background-color: rgb(30, 30, 30);
    padding: 1em;
    max-width: calc(100% - 2em);
    border-radius: 1em;
}

.pages {
    display: flex;
    list-style-type: none;
    gap: 0.5em;
    flex-wrap: wrap;
    margin: 0 auto;
    padding: 0 0;
    justify-content: center;
}

.page {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3em;
    height: 3em;
    border-radius: 1em;
    cursor: pointer;
    background-color: rgb(30, 30, 30);
}

.page.active, .page-navigation:hover {
    background-color: rgb(55, 55, 55);
}

.container {
    flex-grow: 1;
    width: 80%;
    background-color: rgb(25, 25, 25);
    padding: 1em;
    border-radius: 1em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1em;
}

.react-app {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1em;
}

.component-container:has(.options), .component-container:has(.user-ranking) {
    align-self: center;
}

.component-container:has(.options-wrapper.collapsed) {
    gap: 0;
}

.collapse-button {
    padding: 1em;
    border-radius: 0.5em;
    text-align: center;
    text-decoration: underline;
    background-color: rgb(45, 45, 45);
    cursor: pointer;
}

.collapse-button:hover {
    background-color: rgb(40, 40, 40);
}

/* Would be cool if it worked but it unfortunately doesn't because the mod and country selectors get cut off. */

.options-wrapper {
    /* overflow: hidden; */
    max-height: 1000px;
    /* transition: max-height 1s ease-in-out; */
}

.options-wrapper.collapsed {
    max-height: 0;
    overflow: hidden;
    /* transition: max-height 0.5s cubic-bezier(0, 1, 0, 1); */
}

.options {
    border-collapse: separate;
    border-spacing: 1em;
}

.options tr td:first-child {
    text-align: right;
}

.filter-container {
    display: flex;
    gap: 1em;
    align-items: center;
    flex-wrap: wrap;
}

.view-filter {
    padding: 0.5em;
    border-radius: 0.25em;
    display: flex;
    gap: 0.5em;
    align-items: center;
    background-color: white;
    color: black;
}

.view-filter:hover {
    cursor: pointer;
}

.view-active, .view-filter:hover {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}

.view-icon {
    width: 1em;
    height: 1em;
    mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    background-color: rgb(35, 35, 35);
}

.view-cards {
    mask-image: url("../images/card.svg");
    -webkit-mask-image: url("../images/card.svg");
}

.view-table {
    mask-image: url("../images/table.svg");
    -webkit-mask-image: url("../images/table.svg");
}

.options .sort-thingy {
    font-size: 1.5em;
}

.sort-thingy:hover {
    cursor: pointer;
}

.filter-container .mode-icon-wrapper:hover {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.7));
    cursor: pointer;
}

.mode-icon-wrapper.disabled {
    opacity: 0.6;
}

.filter-container .mode-icon {
    width: 2em;
    height: 2em;
    background-color: white;
}

.section-header {
    margin: 0 0;
    text-align: center;
}

.scores {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-column-gap: 1em;
    grid-row-gap: 1em;
    font-size: 0.8em;
}

.score-card {
    height: 100%;
}

.score-card {
    display: flex;
    flex-direction: column;
}

.score {
    flex: 10 1;
    display: flex;
    flex-direction: column;
    gap: 1em;
    background-blend-mode: darken;
    background-size: cover;
    justify-content: space-between;
    padding: 1em;
    border-radius: 1em 1em 0 0;
    color: white;
    text-shadow: 0 0 0.5em rgba(0, 0, 0, 0.75);
}

.score-total {
    display: flex;
    gap: 0.25em;
    flex-wrap: wrap;
}

.score-secondary {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8em;
}

.score .mod {
    font-weight: bold;
}

.score-row-mode .mode-icon {
    width: 1em;
    height: 1em;
}

.score-row-mods .mod {
    font-weight: 400;
}

.scorecard-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.scorecard-row.title-row {
    align-items: flex-start;
}

.scorecard-column.title-column {
    flex : 2 1;
}

.scorecard-row .scorecard-column:first-child {
    align-items: flex-start;
}

.scorecard-row .scorecard-column:last-child {
    align-items: flex-end;
}   

.scorecard-column {
    flex: 1 1;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.score-song-name {
    font-size: 1.3em;
    color: white;
}

.scores-table tr td a, .score a, .navigation a.active, .navigation a.inactive:hover, footer a {
    color: white;
}

.score-ranked-score {
    font-weight: bold;
}

.score-difficulty-name:hover {
    text-shadow: 0 0 0.5em rgba(255, 255, 255, 0.75);
}

.score-right-column {
    text-align: right;
    align-items: flex-end;
}

.score-player-img {
    width: 3em;
    height: 3em;
    border-radius: 1em;
    box-shadow: 0 0 1em rgba(0, 0, 0, 0.5);
    object-fit: contain;
    background: rgba(0, 0, 0, 0.5);
}

.score-player-img:hover {
    box-shadow: 0 0 1em rgba(255, 255, 255, 0.5);
}

.mod {
    font-weight: bold;
    padding: 0.25em;
    border-radius: 0.25em;
}

.mods {
    display: flex;
    gap: 0.25em;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.scores-table .mods {
    justify-content: flex-start;
}

.mods .mod {
    text-shadow: none;
}

.mod-difficultyDecrease {
    background-color: rgb(179, 255, 102);
    color: rgb(60, 89, 30);
}

.mod-difficultyIncrease {
    background-color: rgb(255, 102, 102);
    color: rgb(89, 30, 30);
}

.mod-conversion {
    background-color: rgb(140, 102, 255);
    color: rgb(45, 30, 89)
}

.mod-automation {
    background-color: rgb(102, 204, 255);
    color: rgb(30, 70, 89);
}

.mod-fun {
    background-color: rgb(255, 102, 171);
    color: rgb(89, 30, 57);
}

.mod-system {
    background-color: rgb(255, 204, 34);
    color: rgb(89, 70, 5);
}

.mod-unknown {
    background-color: rgb(180, 180, 180);
    color: rgb(50, 50, 50);
}

.mods-expand {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
}

.score-combo-misses {
    display: flex;
    gap: 0.5em;
}

.score-misses {
    color: red;
}

.table-wrapper {
    overflow-x: auto;
}

.scores-table {
    width: 100%;
    font-weight: 350;
    border-collapse: collapse;
}

.scores-table thead {
    background-color: rgb(45, 45, 45);
}

.scores-table td {
    padding: 0.1em 0.3em 0.1em 0.3em;
}

.score-row-map-image img {
    height: 1em;
    object-fit: cover;
}

.player-img {
    height: 1em;
    object-fit: contain;
}

.score-user-data {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.scores-table tbody tr:nth-child(odd) {
    background-color: rgb(35, 35, 35);
}

.scores-table tbody tr:nth-child(even) {
    background-color: rgb(40, 40, 40);
}

.score-row-grade {
    font-weight: bold;
}

.grade-f {
    color: rgb(180, 60, 60);
}

.grade-d {
    color: rgb(255, 90, 90);
}

.grade-c {
    color: rgb(255, 142, 93);
}

.grade-b {
    color: rgb(235, 189, 72);
}

.grade-a {
    color: rgb(136, 218, 32);
}

.grade-s, .grade-x {
    color: rgb(224, 200, 100);
}

.grade-sh, .grade-xh {
    color: rgb(217, 241, 248);
}

.score-row-country img {
    height: 1em;
    width: auto;
}

.score-mode {
    flex: 1 1;
    width: 100%;
    padding: 0.5em 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 0 1em 1em;
}

.color-osu {
    background-color: rgb(200, 120, 120);
}

.color-taiko {
    background-color: rgb(200, 180, 60);
}

.color-fruits {
    background-color: rgb(120, 200, 100);
}

.color-mania {
    background-color: rgb(100, 100, 200);
}

.mode-icon {
    height: 2em;
    width: 2em;
    mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
}

.mode-osu {
    mask-image: url("../images/osu-std.svg");
    -webkit-mask-image: url("../images/osu-std.svg");
}

.mode-taiko {
    mask-image: url("../images/osu-taiko.svg");
    -webkit-mask-image: url("../images/osu-taiko.svg");
}

.mode-fruits {
    mask-image: url("../images/osu-catch.svg");
    -webkit-mask-image: url("../images/osu-catch.svg");
}

.mode-mania {
    mask-image: url("../images/osu-mania.svg");
    -webkit-mask-image: url("../images/osu-mania.svg");
}

.mode-icon-wrapper.active, .mode-icon-wrapper.enabled:hover {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.7));
    cursor: pointer;
}

.mode-icon-wrapper.disabled {
    opacity: 0.6;
}

.loader-container {
    height: 2em;
    width: 2em;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader {
    width: 100%;
    height: 100%;
    background-color: white;
    mask-image: url("../images/loader.svg");
    -webkit-mask-image: url("../images/loader.svg");
    mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-size: cover;
    -webkit-mask-repeat: no-repeat;
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

body {
    font-family: "Cascadia Mono", monospace;
    background-color: rgb(35, 35, 35);
    color: white;
}

.error-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    align-items: center;
    text-align: center;
}

.error-icon {
    width: 2em;
    height: 2em;
    background-color: hsl(0, 70%, 55%);
    mask-image: url("../images/error.svg");
    -webkit-mask-image: url("../images/error.svg");
    mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-size: cover;
    -webkit-mask-repeat: no-repeat;
}

.selector-top, .selector-items  {
    border: 1px solid black;
    border-radius: 0.25em;
}

.selector {
    position: relative;
    display: inline-block;
    width: 250px;
}

.selector-countries {
    width: 400px;
}

.selector-items {
    background-color: white;
    position: absolute;
    max-height: 200px;
    width: 100%;
    z-index: 100;
    overflow-x: auto;
    overflow-y: auto;
}

.selector-item {
    border-radius: 0.25em;
}

.selector-items > .selector-item:first-child {
    border-radius: 0.25em 0.25em 0 0;
}

.selector-items > .selector-item:last-child {
    border-radius: 0 0 0.25em 0.25em;
}

.top-selector > .selector-item {
    border-radius: 0.25em 0.25em;
}

.selector-item {
    display: flex;
    gap: 1em;
    justify-content: space-between;
    height: 1em;
    padding: 0.5em;
    background-color: white;
    color: black;
    align-items: center;
}

.list-selector:hover, .mod-active {
    background-color: #1967d2;
    color: white;
}

.selector-image {
    min-width: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selector-image img {
    height: 1em;
}

.list-selector:hover img {
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.7));
}

.list-selector:hover .mod {
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.7);
}

.selector-name {
    flex: 3 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1em;
    text-wrap: nowrap;
}

.selector-chevron {
    width: 1em;
    height: 1em;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-image: url("../images/chevron.svg");
    -webkit-mask-image: url("../images/chevron.svg");
    background-color: rgb(35, 35, 35);
}