:root {
    color-scheme: light dark;
    font-family: "Noto Sans HK", sans-serif;
    font-optical-sizing: auto;
    background-color: #f4f4f4;
    color: #4a4a4a;
}

body {
    margin: 8px;
    text-align: center;
}

h1 {
    color: #333;
}

h2 {
    margin-top: 20px;
    color: #555;
}

table {
    width: max(min(99%, 500px), 60%);
    margin: 10px auto;
    overflow: hidden;
    border: 1px solid #ddd;
    border-collapse: collapse;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 0 10px rgb(0 0 0 / 10%);
}

th,
td {
    border: 1px solid #ddd;
    text-align: left;
}

th {
    padding: 10px;
    background: #76b3e3;
    color: white;
}

td {
    font-size: 16px;
}

.narliar-header {
    background-color: #e082b6;
}

.hk-bus-eta-header {
    background-color: #e37676;
}

.status-header {
    background-color: #a1a1a1;
}

.header {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.header-image {
    display: flex;
    height: 1.2em;
    border-radius: 5px;
}

.update-time {
    margin-top: -10px;
    color: gray;
    font-size: 14px;
}

.status-summary {
    margin-top: -5px;
    font-size: 16px;
    font-weight: bold;
}

.status-good {
    color: #00a500;
}

.status-disruption {
    color: #d82d2d;
}

.data-notice {
    width: fit-content;
    max-width: min(90%, 600px);
    margin: 8px auto;
    padding: 8px 12px;
    border: 1px solid #d9a72e;
    border-radius: 6px;
    background: #fff4d6;
    color: #785900;
    font-size: 14px;
}

.data-notice.error {
    border-color: #dc6868;
    background: #ffe4e4;
    color: #8b1d1d;
}

.status-container {
    padding-bottom: 60px;
}

.server-banner {
    width: min(100%, 600px);
    margin-top: 5px;
    border-radius: 5px;
}

.service-name {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 18px;
    font-weight: bold;
}

.service-address {
    color: gray;
    font-size: 14px;
}

.service-link {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    padding: 10px;
    color: inherit;
    text-decoration: none;
}

.service-non-link {
    padding: 10px;
}

.status-red {
    background-color: #ff4444;
    color: white;
    text-align: center;
    font-weight: bold;
}

.status-green {
    background-color: #66cc66;
    color: white;
    text-align: center;
    font-weight: bold;
}

.status-unknown {
    background-color: #8b8b8b;
    color: white;
    text-align: center;
    font-weight: bold;
}

.status-since {
    color: #f0f0f0;
    font-size: 12px;
}

.icon-container {
    display: flex;
}

.minecraft-icon {
    width: 1.2em;
    height: 1.2em;
    object-fit: contain;
}

.svg-icon {
    height: 1.2em;
    margin-left: 1px;
    fill: currentColor;
}

@media (max-width: 600px) {
    table {
        width: 99%;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        background-color: #1e1e1e;
        color: #d3d3d3;
    }

    h1 {
        color: white;
    }

    h2 {
        color: #d3d3d3;
    }

    th,
    td {
        border-color: #555;
    }

    table {
        border-color: #555;
        background: #2a2a2a;
        box-shadow: 0 0 10px rgb(255 255 255 / 10%);
    }

    th {
        background: #25435b;
        color: #d3d3d3;
    }

    .narliar-header {
        background-color: #78355a;
    }

    .hk-bus-eta-header {
        background-color: #5b2525;
    }

    .status-header {
        background-color: #525252;
    }

    .status-green {
        background-color: #348538;
    }

    .status-red {
        background-color: #a41e1e;
    }

    .data-notice {
        border-color: #917329;
        background: #43391e;
        color: #ffe09a;
    }

    .data-notice.error {
        border-color: #873b3b;
        background: #4b2525;
        color: #ffb7b7;
    }
}
