@media (prefers-color-scheme: dark) {
    :root {
        --white: #3a0c02;
        --darker-white: #6a2713;
        --black: #f9e6d7;
        --black-opacity: #f9e6d7be;
        --accent-color: #963a2a;
        --darker-accent-color: #f4a070;
        --bg-image: url("/assets/WebsiteBNSMPbgdark.png");
    }
}

@media (prefers-color-scheme: light) {
    :root {
        --white: #fff5ed;
        --darker-white: #e59b80;
        --black: #3c0717;
        --black-opacity: #3c0717be;
        --accent-color: #f5a16c;
        --darker-accent-color: #8c0611;
        --bg-image: url("/assets/WebsiteBNSMPbglight.png");
    }
}

body {
    font-family: "Google Sans", sans-serif;
    /* background: linear-gradient(45deg,
            #121212 25%,
            #151515 25%,
            #151515 50%,
            #121212 50%,
            #121212 75%,
            #151515 75%,
            #151515 100%);
    background-size: 60px 60px;
    color: #ebebeb; */
    background-image: var(--bg-image);
    background-size: cover;
    background-attachment: fixed;
    color: var(--black);
}

.header {
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: bold;
}

.header.center {
    text-align: center;
}

.content {
    background-color: var(--white);
    height: fit-content;
    width: fit-content;
    border: 1px solid var(--darker-white);
    border-radius: 20px;
    padding: 16px;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.status-holder {
    margin: 1em auto 1em auto;
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.status-holder>.info-holder {
    display: flex;
    flex-direction: column;
    align-content: space-between;
}

#server-address {
    font-weight: bold;
}

#online-status {
    padding-right: 2px;
}

#online-status.online {
    color: lime;
}

/* #online-status.online::after {
    content: "Online";
    color: black;
    padding-left: 2px;
} */

#online-status.offline {
    color: red;
}

/* #online-status.offline::after {
    content: "Online";
    color: black;
} */

#server-icon {
    border-radius: 8px;
}

section {
    width: fit-content;
    margin: 0 auto 0 auto;
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin-bottom: 8px;
    align-items: stretch;
}

.online-list-holder,
.player-list-holder {
    width: 220px;
    height: 399px;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    position: relative;
}

.online-list-holder .header,
.player-list-holder .header {
    margin-bottom: 4px;
}

.online-list-holder #online-list {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.player-list-element {
    background-color: transparent;
    border-radius: 6px;
    padding: 8px;
    gap: 8px;
    display: flex;
    flex-direction: row;
    align-items: center;
    transition: background-color 0.2s ease-in-out;
}

.player-list-holder .player-list-element:hover {
    background-color: var(--accent-color);
}

.player-list-element > img {
    border-radius: 6px;
}

.player-list-empty {
    display: flex;
    justify-content: center;
    padding: 8px;
}

.selected-player {
    background-color: var(--accent-color);
    border: 1px solid var(--darker-accent-color)
}

#player-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

#reset-filter {
    width: 30px;
    font-size: 1em;
    position: absolute;
    top: 8px;
    right: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 4px;
    color: var(--black);
    transition: all 0.2s ease-in-out;
    border-radius: 6px;
}

#reset-filter:hover {
    background-color: var(--accent-color);
}

.player-history-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.player-name {
    font-weight: 600;
}

.player-history-status,
.player-history-duration {
    font-size: 0.78rem;
    color: var(--black-opacity);
}

.history-chart-holder {
    position: relative;
    width: 660px;
    height: 220px;
    margin-top: 10px;
}

.history-chart {
    display: block;
    width: 100%;
    height: 100%;
}

.history-summary {
    margin: 8px 0 0;
    font-size: 0.95rem;
    color: #c9c9c9;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    max-height: 180px;
    overflow-y: auto;
}

.history-item {
    font-size: 0.95rem;
    color: #c9c9c9;
}

.peak-display {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
}

hr {
    border: 1px solid var(--darker-white)
}

.player-stats-card {
    margin-top: 8px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
}

.player-stats-card img {
    border-radius: 6px;
}

.player-stats-idk {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.player-stats-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.player-stats-info .player-name {
    font-weight: bold;
    font-size: 1rem;
}

.player-stats-meta {
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--black-opacity);
    flex-wrap: wrap;
}

.stat-badge strong {
    color: var(--black);
}

#hint-text {
    color: var(--black-opacity);
    font-size: 0.85rem;
}

footer {
    display: flex;
    flex-direction: column;
    text-align: center;
}

footer > span {
    color: var(--black-opacity);
}

footer > span > span {
    color: var(--black);
}

@media screen and (max-width: 768px) {
    body > section:nth-last-of-type(2)::before {
        content: "NOT REALLY MOBILE FRIENDLY!!";
        text-align: center;
    }

    section {
        flex-direction: column;
    }

    .online-list-holder,
    .player-list-holder {
        height: auto;
        width: 100%;
    }

    .online-list-holder #online-list,
    .player-list-holder #player-list {
        display: grid;
        grid-template-columns: auto auto;
        grid-auto-rows: min-content;
    }

    .player-list-element {
        justify-content: center;
    }

    .history-chart-holder {
        width: 100%;
    }
}