* {
    margin: 0;
    font-family: "Saira Stencil", sans-serif;
    font-weight: 800;
    user-select: none;
}

html,
body {
    height: 100%;
    width: 100%;
    background-color: black;
    color: white
}

body {
    height: auto;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

#content {
    flex: 1;
    width: 80%;
    margin: 0 10% 0 10%;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
}

#games {
    display: grid;
    grid-template-columns: repeat(auto-fill, 120px);
    justify-content: center;
    gap: 20px;
    padding-bottom: 20px;
}

.game {
    height: 150px;
    width: 120px;
    padding: 6px;
    box-sizing: border-box;
    background-color: white;

    &>div {
        height: 100%;
        width: 100%;
        background-color: black;
        box-shadow: 0 0 10px 2px black;
        transition: all .5s;
        padding: 3px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        overflow: hidden;

        &>img {
            display: block;
            flex-shrink: 0;
            width: 100%;
            aspect-ratio: 1;
            margin-top: 0;
            transition: margin-top .5s, opacity .4s;
        }

        &>.title {
            display: block;
            flex-shrink: 0;
            padding: 2px 2px 0;
            line-height: 1.2;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        &>.desc {
            padding: 4px 2px 0;
            font-size: 10px;
            font-weight: 400;
            line-height: 1.3;
            color: rgba(255, 255, 255, .55);
            opacity: 0;
            transform: translateY(20px);
            transition: opacity .4s, transform .5s;
        }

        &>.play {
            position: relative;
            flex-shrink: 0;
            margin-top: auto;
            height: 22px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 6px 0 8px;
            border: 1px solid white;
            color: white;
            font-size: 11px;
            letter-spacing: .12em;
            text-decoration: none;
            text-transform: uppercase;
            overflow: hidden;
            isolation: isolate;
            opacity: 0;
            transform: translateY(30px);
            transition: opacity .4s, transform .5s, color .3s;

            &::before {
                content: "";
                position: absolute;
                inset: 0;
                z-index: -1;
                background-color: white;
                transform: scaleX(0);
                transform-origin: left;
                transition: transform .35s cubic-bezier(.65, 0, .35, 1);
            }

            &>svg {
                height: 11px;
                transition: transform .35s;
            }

            &:hover {
                color: black;

                &::before {
                    transform: scaleX(1);
                }

                &>svg {
                    transform: translate(2px, -2px);
                }
            }
        }

        &:hover {
            transform: translateY(-3px);
            box-shadow: 0 1px 50px 30px white;

            &>img {
                margin-top: -100%;
                opacity: 0;
            }

            &>.title {
                white-space: normal;
            }

            &>.desc {
                opacity: 1;
                transform: translateY(0);
                transition-delay: .15s;
            }

            &>.play {
                opacity: 1;
                transform: translateY(0);
                transition: opacity .4s .25s, transform .5s .25s, color .3s;
            }
        }
    }
}

footer {
    padding: 12px 0;
    text-align: center;
    font-size: 10px;
    font-weight: 400;
    color: rgba(255, 255, 255, .35);

    & a {
        color: inherit;
        font-weight: inherit;
    }
}
