:root {
    color-scheme: light dark;
}

.light {
    /* forces light color-scheme */
    color-scheme: light;
}
.dark {
    /* forces dark color-scheme */
    color-scheme: dark;
}

html, body {
    margin: 0;
    padding: 0;
    background-color: light-dark(whitesmoke, #151515);
    color: light-dark(#151515, whitesmoke);
    width: 100%;
    height: min-content;
}

.montserrat {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
}

.games-grid {
    text-align: center;
    width: 100%;
    height: 100%;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 4.15rem 0 1.5rem 0;
}

.games-grid-child {
    text-decoration: none;
    font-size: 32px;
    color: light-dark(#151515, whitesmoke);
    border-radius: 0.25em;
    transition: all 200ms;
    display: grid;
    aspect-ratio: 16 / 9;
    width: 14em;
    align-items: center;
    justify-items: center;
    justify-content: center;
    align-content: center;
    cursor: pointer;
    background: none;
    position: relative;
    overflow: visible;
    z-index: 2;
    border-width: 20em;
    border-color: light-dark(darkgrey, white);
}

.hiddenLink {
    height: 100%;
    width: 100%;
    left: 0;
    top: 0;
    position: absolute;
    z-index: 1;
}

.games-grid-child::before {
    content: " ";
    position: absolute;
    aspect-ratio: 16 / 9;
    width: 14em;
    /*opacity: 0.5;*/
    filter: brightness(50%);
    z-index: -1;
    background-image: url("https://cookistudios.com/img/placeholder.png");
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 0.25em;
    transition: all 200ms;
}

.games-grid-child#minigames-banner::before {
    background-image: url("img/minigamesbanner.png");
}

.games-grid-child#placeholder2-banner::before {
    background-image: url("img/placeholder2.png");
}

.games-grid-child#placeholder3-banner::before {
    background-image: url("img/placeholder3.png");
}

.games-grid-child#placeholderparable-banner::before {
    background-image: url("img/placeholderparable.png");
}

.games-grid-child#noplaceholder-banner::before {
    background-image: url("img/noplaceholder.png");
}

.games-grid-child#gjplaceholder-banner::before {
    background-image: url("img/gjplaceholder.png");
}

.games-grid-child#placeholderprequel-banner::before {
    background-image: url("img/placeholderprequel.png");
}

.games-grid-child#placeholderdef-banner::before {
    background-image: url("img/placeholderdef.png");
}

.games-grid-child::after {
    content: " ";
    position: absolute;
    aspect-ratio: 16 / 9;
    width: 14em;
    z-index: 2;
    background-image: url("https://cookistudios.com/img/placeholdertext.png");
    background-repeat: no-repeat;
    background-size: cover;
    transition: all 200ms;
    transform: var(--after, none);
}

.games-grid-child#minigames-banner::after {
    background-image: url("img/minigamestext.png");
}

.games-grid-child#placeholder2-banner::after {
    background-image: url("img/placeholder2text.png");
}

.games-grid-child#placeholder3-banner::after {
    background-image: url("img/placeholder3text.png");
}

.games-grid-child#placeholderparable-banner::after {
    background-image: url("img/placeholderparabletext.png");
}

.games-grid-child#noplaceholder-banner::after {
    background-image: url("img/noplaceholdertext.png");
}

.games-grid-child#gjplaceholder-banner::after {
    background-image: url("img/gjplaceholdertext.png");
}

.games-grid-child#placeholderprequel-banner::after {
    background-image: url("img/placeholderprequeltext.png");
}

.games-grid-child#placeholderdef-banner::after {
    background-image: url("img/placeholderdeftext.png");
}

@media (prefers-color-scheme: light) {
    .games-grid-child::before {
        background-image: url("https://cookistudios.com/img/placeholderwhite.png");
    }

    .games-grid-child#minigames-banner::before {
        background-image: url("img/minigamesbannerwhite.png");
    }

    .games-grid-child#minigames-banner::after {
        background-image: url("img/minigamestextwhite.png");
    }

    .games-grid-child#placeholder2-banner::before {
        background-image: url("img/placeholder2white.png");
    }

    .games-grid-child#placeholder3-banner::after {
        background-image: url("img/placeholder3textwhite.png");
    }

    .games-grid-child#placeholderparable-banner::after {
        background-image: url("img/placeholderparabletextwhite.png");
    }

    .games-grid-child#placeholderprequel-banner::before {
        background-image: url("img/placeholderprequelwhite.png");
    }

    .games-grid-child#placeholderprequel-banner::after {
        background-image: url("img/placeholderprequeltextwhite.png");
    }

    .games-grid-child#placeholderdef-banner::before {
        background-image: url("img/placeholderdefwhite.png");
    }

    .games-grid-child#placeholderdef-banner::after {
        background-image: url("img/placeholderdeftextwhite.png");
    }
}

.games-grid-child-text {
    overflow: hidden;
}

.games-grid-child:hover, .games-grid-child:hover h1, .games-grid-child:hover h2 {
    color: light-dark(grey, darkgrey);
}

.games-grid-child:hover::before {
    /*opacity: 0.25;*/
    filter: brightness(25%) blur(0.05em);
}

.games-grid-child:hover::after {
    /*opacity: 0.75;*/
    /*transform: perspective(800px) translateZ(1em);*/
    filter: drop-shadow(0 0.05em 0.1em #000000);
}