/* Dark theme */
@media (prefers-color-scheme: dark) {
    body:before {
        content: '';
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        z-index: -1;
        background-image: url(/img/YT-banner-background-desktop.svg);
        background-repeat: no-repeat;
        background-size: cover;
        filter: invert();
    }

    body {
        background-color: #000;
        font-family: Arial, Helvetica, sans-serif;
    }

    .site {
        margin: auto;
        margin-top: 50px;
        margin-bottom: 40px;
        max-width: 930px;
        text-align: center;
        color: #fff;
    }

    h1.title,
    h2,
    h3 {
        background-color: #222;
        margin: 5px auto;
        padding: 5px;
        max-width: 920px;
        border: solid 2px #8bc3ff55;
        border-radius: 8px;
    }

    h4 {
        margin: auto;
        width: 200px;
        padding-bottom: 0;
        transition: all 200ms ease;
    }

    p {
        border-top: 2px solid #666;
        padding-top: 10px;
    }


    footer p {
        border: none;
    }

    p.site-description,
    footer {
        background-color: #222;
        margin: auto;
        margin-bottom: 8px;
        padding: 6px;
        width: 920px;
        border: solid 2px #8bc3ff55;
        border-radius: 8px;
    }

    div.devices {
        display: flex;
        align-content: center;
        flex-wrap: wrap;
        justify-content: center;
    }

    div.device {
        background-color: #222;
        margin: 5px;
        padding: 10px;
        border: solid 2px #8bc3ff55;
        border-radius: 8px;
        width: 300px;
        transition: all 200ms ease;
    }

    .device .details {
        margin: auto;
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        width: 200px;
        transition: max-height 0.4s ease, opacity 0.4s ease;
    }

    .device:hover .details,
    .device:focus-within .details {
        opacity: 1;
        z-index: 2;
    }

    .device:hover h4,
    .device:focus h4 {
        padding-bottom: 10px;
    }

    img.banner {
        width: 100%;
        max-width: 920px;
        background-color: #222;
        padding: 10px;
        border: solid 2px #8bc3ff55;
        border-radius: 8px;
    }

    img.device-img {
        margin-top: 10px;
        margin-bottom: 5px;
        width: 250px;
    }

    img {
        border-radius: 8px;
    }

    a.links {
        color: #8bc3ff;
        transition: all 200ms ease;
    }

    @media (hover: hover) {
        div.device:hover {
            transform: scale(1.1);
        }

        a.links:hover {
            color: #0063cc;
        }
    }

    @media (max-width: 1300px) {
        body:before {
            content: '';
            display: block;
            position: fixed;
            left: 0;
            right: 0;
            top: 0;
            bottom: 0;
            z-index: -1;
            background-image: url(/img/YT-banner-background-mobile.svg);
            background-repeat: no-repeat;
            background-size: cover;
            filter: invert();
        }

        .site {
            margin: auto;
            margin-top: 46px;
            max-width: 90%;
        }

        h1,
        h2,
        h3,
        p.site-description,
        footer {
            width: 100%;
        }

        img.banner {
            width: 70%;
        }
    }

    @media (max-width: 768px) {
        body:before {
            content: '';
            display: block;
            position: fixed;
            left: 0;
            right: 0;
            top: 0;
            bottom: 0;
            z-index: -1;
            background-image: url(/img/YT-banner-background-mobile.svg);
            background-repeat: no-repeat;
            background-size: cover;
            filter: invert();
        }

        .site {
            margin: auto;
            margin-top: 46px;
            max-width: 100%;
        }

        h1,
        h2,
        h3,
        div.device,
        p.site-description,
        footer {
            width: 70%;
        }

        h4 {
            border: none;
        }
    }
}

/* light theme */
@media (prefers-color-scheme: light) {
    body:before {
        content: '';
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        z-index: -1;
        background-image: url(/img/YT-banner-background-desktop.svg);
        background-repeat: no-repeat;
        background-size: cover;
        filter: invert(0);
    }

    body {
        background-color: #fff;
        font-family: Arial, Helvetica, sans-serif;
    }

    .site {
        margin: auto;
        margin-top: 50px;
        margin-bottom: 40px;
        max-width: 930px;
        text-align: center;
        color: #000;
    }

    h1.title,
    h2,
    h3 {
        background-color: #eee;
        margin: 5px auto;
        padding: 5px;
        max-width: 920px;
        border: solid 2px #8bc3ff55;
        border-radius: 8px;
    }

    h4 {
        margin: auto;
        width: 200px;
        padding-bottom: 0;
        transition: all 200ms ease;
    }

    p {
        border-top: 2px solid #ccc;
        padding-top: 10px;
    }

    p.site-description,
    footer {
        background-color: #eee;
        margin: 10px auto;
        padding: 5px;
        width: 920px;
        border: solid 2px #8bc3ff55;
        border-radius: 8px;
    }

    div.devices {
        display: flex;
        align-content: center;
        flex-wrap: wrap;
        justify-content: center;
    }

    div.device {
        background-color: #eee;
        margin: 5px;
        padding: 10px;
        border: solid 2px #8bc3ff55;
        border-radius: 8px;
        width: 300px;
        transition: all 200ms ease;
    }

    .device .details {
        margin: auto;
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        width: 200px;
        transition: max-height 0.4s ease, opacity 0.4s ease;
    }

    .device:hover .details,
    .device:focus-within .details {
        opacity: 1;
        z-index: 2;
    }

    .device:hover h4,
    .device:focus h4 {
        padding-bottom: 10px;
    }

    img.banner {
        max-width: 920px;
        background-color: #eee;
        padding: 10px;
        border: solid 2px #8bc3ff55;
        border-radius: 8px;
    }

    img.device-img {
        margin-top: 10px;
        margin-bottom: 5px;
        width: 250px;
    }

    img {
        border-radius: 8px;
    }

    a.links {
        color: #8bc3ff;
        transition: all 200ms ease;
    }

    @media (hover: hover) {
        div.device:hover {
            transform: scale(1.1);
        }

        a.links:hover {
            color: #0063cc;
        }
    }

    @media (max-width: 1300px) {
        body:before {
            content: '';
            display: block;
            position: fixed;
            left: 0;
            right: 0;
            top: 0;
            bottom: 0;
            z-index: -1;
            background-image: url(/img/YT-banner-background-mobile.svg);
            background-repeat: no-repeat;
            background-size: cover;
            filter: invert(0);
        }

        .site {
            margin: auto;
            margin-top: 46px;
            max-width: 90%;
        }

        h1,
        h2,
        h3,
        p.site-description,
        footer {
            width: 100%;
        }
    }

    @media (max-width: 768px) {
        body:before {
            content: '';
            display: block;
            position: fixed;
            left: 0;
            right: 0;
            top: 0;
            bottom: 0;
            z-index: -1;
            background-image: url(/img/YT-banner-background-mobile.svg);
            background-repeat: no-repeat;
            background-size: cover;
            filter: invert(0);
        }

        .site {
            margin: auto;
            margin-top: 46px;
            max-width: 100%;
        }

        h1,
        h2,
        h3,
        div.device,
        p.site-description,
        footer {
            width: 70%;
        }

        h4 {
            border: none;
        }
    }
}
