:root {
    --config-fonts: 'Noto Sans HK', 'Noto Sans TC', sans-serif;
}

#overlay {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 20;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    font-family: var(--config-fonts);
    display: flex;
    color: white;
    line-height: 1.5;
    transition: opacity .25s, visibility .25s, transform .25s;
    align-items: stretch;
}

#overlay h1 {
    font-size: 2rem;
}

#overlay.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(40px);
}

.pids-preview {
    display: block;
    margin: 2rem auto;
    border-radius: 0.5rem;
    max-width: 50%;
    max-height: 20rem;
}

.pids-preview, #lang-select {
    box-shadow: 0 0 8px rgba(255,255,255,1);
}

.intro {
    overflow: auto;
    flex: 1;
    align-self: center;
    text-align: center;
    padding: 1rem;
    box-sizing: border-box;
    color: white;
    height: 100%;
}

.intro a {
    color: inherit;
}

.intro h1 {
    margin-top: 2rem;
}

.intro #lang {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

#lang > h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

#lang-select {
    display: inline-flex;
    gap: 0.35rem;
    border-radius: 100rem;
    background-color: var(--mtr-blue);
    align-items: center;
    padding: 0.325rem 0.4rem;
}

#lang-select button {
    border-radius: 100rem;
    background: transparent;
    outline: none;
    border: none;
    color: inherit;
    padding: 0.3rem 0.6rem;
    font-size: 1rem;
    transition: background-color 0.2s;
    cursor: pointer;
}

#lang-select button.selected, #lang-select button.selected:hover {
    background-color: var(--mtr-red);
}

#lang-select button:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.settings {
    overflow: auto;
    box-sizing: border-box;
    padding: 1rem 1rem;
    background-color: #f0f2f6;
    color: black;
    animation: t0 0.45s cubic-bezier(0.25, 1, 0.5, 1);
    border-radius: 0.5rem 0 0 0.5rem;
    min-width: 24rem;
}

.settings form fieldset {
    border-radius: .5rem;
}

.settings form fieldset legend {
    padding-right: 0.5rem;
}

.settings form fieldset label:not([attr-inline]) {
    display: block;
    font-size: 1.25rem;
    margin-top: 0.5rem;
    font-weight: 600;
}

.section-box {
    background-color: var(--notice-blue);
    padding: 0.5rem;
    color: black;
    border-radius: 0.35rem;
    font-size: 0.9rem;
}

@keyframes t0 {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

section > h1 {
    margin: 0.25rem 0;
}

#overlay select, .settings button {
    font-size: 1em;
    border-radius: 5px;
    font-family: inherit;
    border: 1px solid #aaa;
    cursor: pointer;
}

#overlay select {
    background-color: #eaeaea;
    padding: 5px 10px 5px 10px;
}

.settings button {
    background-color: var(--mtr-red);
    color: white;
    padding: 5px 15px 5px 15px;
    border-radius: 0.3rem;
    transition: color 0.2s, background-color 0.2s;
    margin: 0.25rem 0;
    border: none;
    box-shadow: 0 3px #7B1948;
}

.settings button:hover {
    color: black;
    background-color: rgba(0, 0, 0, 0.2);
}

#langchoose {
    display: inline-block;
}

table tr td {
    padding: 0.15em;
}

@media only screen and (max-width: 750px) {
    #overlay {
        flex-direction: column;
        font-size: 0.9rem;
        overflow: auto;
    }

    .intro, .settings {
        overflow: initial;
    }

    .settings {
        min-width: initial;
    }
}