@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --corner-bevel: 5px;
    --spacing: 2.5ch;

    --off-white-filter: brightness(0) invert(99%) sepia(11%) saturate(472%) hue-rotate(293deg) brightness(99%) contrast(82%); 
    --pure-white-filter: brightness(0) invert(78%) sepia(13%) saturate(200%) hue-rotate(334deg) brightness(81%) contrast(90%);

    --exp: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    scroll-behavior: smooth;
}

h1 {
    font-weight: 600;
}
h2 {
    font-weight: 500;
    opacity: 0.5;
}
h3 {
    font-weight: 500;
    opacity: 0.5;
}
h5 {
    font-weight: 500;
}

body {
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    font-style: normal;
    padding: 0;
    margin: 0;
    background-color: rgb(28, 25, 23);
    background-image: linear-gradient(-35deg, rgb(28, 25, 23) 0%, rgb(48, 42, 40) 100%);
    display: flex;
    flex-direction: row;
    justify-content: center;
}

iframe {
    width: 100%;
    aspect-ratio: 16/9;
    padding: 0;
    padding-top: calc(var(--spacing));
    padding-bottom: calc(var(--spacing));
}

img {
    filter: var(--pure-white-filter);
    opacity: 0.3;
}

mark {
    background: none;
    color: inherit;
    font-style: oblique;
    color: rgb(230, 226, 225);
}

p {
    & > a[href] {
        text-decoration: none;
        color: rgb(138, 125, 119);
        transition: color 0.35s var(--exp);
    }
    & > a[href]:hover {
        color: rgb(192, 174, 165);
    }
    & > a[href]::after {
        content: url(assets/ui/material-symbols_arrow-outward-rounded.svg);
        display: inline-block;
        transform: scale(80%) translateY(25%);
        filter: var(--off-white-filter);
        opacity: 0.6;
    }
}

.inner-body {
    max-width: 70ch;
    padding: var(--spacing);
    color: rgb(230, 226, 225);

    & > nav {
        display: flex;
        flex-direction: row;
        padding-top: calc(var(--spacing) / 2);
        padding-bottom: calc(var(--spacing) / 2);
        width: 100%;
        border-radius: var(--corner-bevel);
        gap: 4%;

        & > a {
            width: 24px;
            height: 24px;
            aspect-ratio: 1/1;
            user-select: none;
            cursor: pointer;

            & > img {
                opacity: 1;
                transition:
                    filter 0.35s var(--exp);
                width: 100%;
                height: 100%;
            }
        }

        & > a:hover {
            & > img {
                filter: var(--off-white-filter);
            }
        }
    }
}

.break {
    width: 100%;
    height: 3px;
    justify-self: center;
    margin-top: calc(var(--spacing) / 2);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-flow: dense;
    gap: calc(var(--spacing) / 2);
    width: 100%;
    justify-content: center;
    font-weight: 600;

    & > div {
        border-radius: var(--corner-bevel);
        padding: calc(var(--spacing) / 2);
        display: flex;
        flex-direction: column;
        position: relative;
        overflow: hidden;
        z-index: 2;
        grid-column: span 1;
        grid-row: span 1;
        border: rgb(72, 66, 61) solid 1px;

        & > :nth-child(1) {
            font-size: 140%;
        }
        & > :nth-child(2) {
            color: rgb(138, 125, 119);
        }
        & > :nth-child(3) {
            color: rgb(192, 174, 165);
        }

        & > .external-link {
            position: absolute;
            bottom: calc(var(--spacing) / 2);
            right: calc(var(--spacing) / 2);
            width: 25px;
            height: 25px;
            user-select: none;
            cursor: pointer;
            transition: filter 0.35s var(--exp);
            opacity: 1;
            content: url(assets/ui/material-symbols_arrow-outward-rounded.svg);
            filter: var(--off-white-filter);
            z-index: 2;
        }
        & > .external-link:hover {
            filter: var(--pure-white-filter);
        }

        & > .horizontal-list {
            padding-top: 1ch;
        }

        & > .background {
            filter: blur(10px);
            position: absolute;
            width: 120%;
            height: 120%;
            top: 0;
            left: 0;
            transform: translate(calc(var(--spacing) * -2), calc(var(--spacing) * -2));
            z-index: -1;
            opacity: 1;
        }
    }
}

.horizontal-list {
    display: flex;
    flex-direction: row;
    gap: calc(var(--spacing) / 2);
    background-color: #00000000;
    height: fit-content;
    width: min-content;
    z-index: auto;
    margin-top: calc(var(--spacing) / 3);
}

.language-icons {
    margin-top: auto;

    & > img {
        width: 20px;
        height: 20px;
        image-rendering: optimizeSpeed;
        object-fit: cover;
    }
}

.alt-lang-icons {
    & > img {
        width: 35px;
        height: 35px;
    }
}

.square-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background-color: #00000000;
    gap: 5px;
    padding-top: var(--spacing);
    padding-bottom: var(--spacing);

    & > img {
        width: 100%;
        aspect-ratio: 1/1;
        image-rendering: optimizeSpeed;
        object-fit: cover;
    }
}

.game-icon {
    filter: none;
    opacity: 1;
    position: absolute;
    top: 1ch;
    right: 1ch;
    border-radius: var(--corner-bevel);
    width: 10%;
    min-width: 30px;
    user-select: none;
    z-index: -1;
}

#main {
    transition: margin 1s ease-in-out;
}

#description {
    width: 0ch;
    min-width: 0px;
    position: relative;
    margin-right: var(--spacing);
    max-height: 10e10px;
    top: 0;
    transition:
        width 0.35s var(--exp),
        max-height 0.35s var(--exp),
        transform 1s var(--exp),
        background-color 0.35s var(--exp);
    padding: 0;
    overflow: hidden;

    & img {
        opacity: 1;
        filter: none;
        max-width: 100%;
    }

    & > .inner-body {
        border: none;
    }

    & > .button {
        background-image: url(assets/ui/material-symbols_close-rounded.svg);
        background-color: #ffffff00;
        image-rendering: optimizeSpeed;
        background-repeat: no-repeat;
        background-size: cover;
        border: none;
        width: 30px;
        height: 30px;
        user-select: none;
        cursor: pointer;
        position: absolute;
        top: var(--spacing);
        right: var(--spacing);
        float: right;
        opacity: 1;
        filter: var(--off-white-filter);
        transition: filter 0.35s var(--exp);
    }
    & > .button:hover {
        filter: var(--pure-white-filter);
    }

    & > #game-link {
        background-image: url(assets/ui/material-symbols_videogame-asset.svg);
        right: calc(var(--spacing) * 2.5);
    }
}

#description-temp {
    margin: 0;
    padding: 0;
    min-width: min(calc(100vw - var(--spacing) * 2), 70ch);
}

#back-to-top {
    position: fixed;
    width: 45px;
    height: 45px;
    z-index: 1000;
    right: var(--spacing);
    background-color: rgb(230, 226, 225);
    border-radius: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    bottom: calc(var(--spacing) * 2);
    transition: all 1s var(--exp);

    & > img {
        width: 75%;
        height: 75%;
        opacity: 1;
        filter: none;
        content: url(assets/ui/material-symbols_keyboard-double-arrow-up-rounded.svg);
    }
}
#back-to-top:hover {
    background-color: rgb(192, 174, 165);
}

#gradient {
    width: 100%;
    height: 100%;
    top: 0;
    position: fixed;
    z-index: 10000;
    user-select: none;
    pointer-events: none;
    background: none;
    background: linear-gradient(0deg, rgba(16,14,52,0.05) 0%, rgba(9,9,121,0) 10%, rgba(9,9,121,0) 90%, rgba(16,14,52,0.05) 100%);
}

@media screen and (width < 190ch) {
    body {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    #description {
        background: inherit;
        position: absolute;
        z-index: 100;
        margin-right: 0;
    }
}