* {
    box-sizing: border-box;
}

html {
    color-scheme: light dark;
}
html[lang=en],
html[lang=es] {
    font-style: italic;
}

body {
    font-family: "Times New Roman", "Times", "Liberation Serif", serif;
    background: black;
    color: white;
    margin: 0; padding: 0;
}

header {

    height: 100dvh;
    width: 100dvw;
    padding: 0 2vw;

    display: grid;
    grid-template:
        "h h h  h"  auto
        "f f a1 a2" auto
        "f f s  s"  auto 
        "b b b  b"  auto /
        1fr 1fr 1fr 1fr;
    font-size: 1.8vw;

    gap: 0 2vw;

    background: rgba(0,0,0,.75);

    position: absolute;
    top: 0;
    left: 0;
    z-index: 9001;

    pointer-events: none;
    opacity: 0;
    transition: opacity .6s;

    &.visible {
        pointer-events: all;
        opacity: 1;
    }

    h1 {
        text-shadow: white 0 0 1.8vw;
        font-size: 3vw;
        line-height: 3.1vw;
        text-align: center;
        grid-area: h;
    }

    label {
        display: block;
        line-height: 2.7vw;
        padding: 0;

        input {
            display: none;
        }
        span {
            padding: 0 1vw;
            display: block;
        }
    }

    .filter {
        grid-area: f;

        label:has(input:checked) {
            background: white;
            color: black;
        }
    }

    label[for=album_INMEMORY] {
        grid-area: a1;
        &:has(input:checked) {
            background: white;
            color: black;
        }
        span::before {
            content: "♫ "
        }

    }
    label[for=album_WEBMASTER] {
        grid-area: a2;
        text-align: right;
        &:has(input:checked) {
            background: white;
            color: black;
        }
        span::before {
            content: "♫ "
        }
    }

    .songs {
        grid-area: s;
        overflow-y: auto;

        label {
            display: none;
            &.visible {
                display: block;
            }

            &.sound_INMEMORY:has(input:checked) {
                background: white;
                color: black;
            }

            &.sound_WEBMASTER {
                text-align: right;

                &:has(input:checked) {
                    background: white;
                    color: black;
                }
            }
        }
    }

    .confirm {
        display: flex;
        align-items: center;
        justify-content: center;
        grid-area: b;
        padding: 2dvmax;

        button {
            width: 10dvmax;
            border-radius: .5rem;
            border: .1dvmax white solid;
            font-size: 3dvmax;
            background: transparent;
            color: white;
            display: inline-block;
        }
    }
}

.languages {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 1.35vw;
    z-index: 9004;

    opacity: 0;
    transition: opacity .6s;

    &.visible {
        opacity: 1;
    }

    &.overlay-visible {
        opacity: 1 !important;
    }

    label {
        line-height: 2.7vw;
        padding: 0;
        display: inline-block;

        &:has(input:checked) {
            background: blue;
        }
        input {
            display: none;
        }

        span {
            display: block;
            padding: 0 0.75vw;
        }

        font-style: italic;

        &[for=lang_zh] {
            font-style: normal;
        }
    }
}

.slideshow {
    img {
        position: absolute;
        left: 2vw;
        top: 5vh;
        width: 96vw;
        height: 90dvh;
        object-fit: contain;

        display: block;
        opacity: 0;

        transition: opacity 1s;
        &.fadeIn {
            opacity: 1;
        }
    }
}

.about {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 1.35vw;
    font-style: normal;
    font-weight: bold;
    line-height: 2.7vw;
    z-index: 9002;
    color: blue;
    font-family: system-ui, sans-serif;
    label {
        display: inline-block;
        position: absolute;
        z-index: 9003;
        img { 
            padding: 0 0.75vw;
            height: 1.35vw;
        }
    }

    iframe {
        border: 0;
        opacity: 0;
        pointer-events: none;
        position: absolute;
        top: 0;
        left: 0;
        width: 100dvw;
        height: 100dvh;

        transition: opacity .6s;

    }

    &.visible {
        label { background: white; }

        iframe {
            opacity: 1;
            pointer-events: all;
        }
    }
}

@media (max-width: 499px) {

    header {
        position: fixed;

        display: grid;
        grid-template:
            "h  h"  auto
            "f  f"  auto
            "a1 a2" auto
            "s  s"  auto 
            "b  b"  auto /
            1fr 1fr;
        font-size: 1.8vh;

        gap: 0 2vw;
    
        h1 {
            font-size: 3vh;
            line-height: 3.1vh;
            padding-top: 2vh;
        }

        .filter {
            padding-bottom: 2.7vh;
        }
    
        label {
            display: block;
            line-height: 2.7vh;
        }

        .songs {
            grid-area: s;
            overflow-y: scroll;
            height: auto;
        }
    
    }
    
    .about {
        font-size: 2vh;
        line-height: 2.7vh;
    }

    .languages {
        font-size: 2vh;
        label {
            line-height: 2.7vh;
        }
    }
}