body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100svh;
    background-image: url('./assets/img/screen-elements/fauna.webp');
    background-size: cover;
    background-repeat: no-repeat;
    overflow: hidden;
}

.wrapper {
    min-height: 100svh;

    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    position: relative;
}

.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

canvas {
    background-color: black;
    border-radius: var(--border-radius-default);
    box-shadow: 0 0 5px 0 var(--color-soft-black);
    z-index: var(--z-index-canvas-back);
}

.blur {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

/* #region game-menu */
.overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius-default);
    z-index: var(--z-index-overlay);

    display: flex;
    flex-direction: column;

    .start-menu-content {
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
    }

    .mobile-landscape-hint {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding-inline: 25px;
        margin-top: 20px;

        opacity: 0.5;

        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        font-size: calc(var(--size-btn-ui) * 0.4);

        img {
            width: var(--size-btn-ui);
            height: var(--size-btn-ui);
        }

        figcaption {
            text-align: center;
            width: 100%;
        }

        position: relative;
        .turn-phone {
            top: 0;
            position: absolute;
            animation: rotate90 2s linear infinite;
        }

        .turn-arrow {
            animation: flash 2s linear infinite;
        }
    }

    .start-menu-nav {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: calc(var(--size-btn-ui) * 0.2);
        margin-top: 20px;
        z-index: var(--z-index-start-menu-nav);
    }
}

.btn-menu {
    background-color: var(--color-btn-menu-passive);
    width: calc(var(--size-btn-ui) * 3);
    height: var(--size-btn-ui);
    border-radius: var(--border-radius-default);
    color: var(--color-soft-black);
    border: var(--border-btn-menu);
    font-size: calc(var(--size-btn-ui) * 0.4);
}

.btn-menu:not(:disabled):hover {
    background-color: var(--color-btn-menu-hover);
}

.btn-menu:not(:disabled):active {
    background-color: var(--color-btn-menu-active);
}

button:disabled,
input:disabled {
    display: none;
    opacity: 0;
    cursor: not-allowed;
}
/* #endregion game-menu */

/* #region endscreen */
.overlay-endscreen {
    align-items: center;
    justify-content: center;
    opacity: 1;
    width: 100%;
    height: 100%;
    z-index: var(--z-index-overlay-endscreen);

    .end-message {
        opacity: 0;
        width: 0%;
        height: 0%;
        max-height: 25%;
        max-width: 100%;
        object-fit: contain;
    }

    .endscreen-nav {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        opacity: 0;
        height: 20%;
        width: 100%;

        .btn-endscreen {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: calc(var(--size-btn-ui) * 3.5);
            height: var(--size-btn-ui);
            min-width: var(--size-btn-ui);
            min-height: var(--size-btn-ui);
            border-radius: var(--size-btn-ui);
            background-color: var(--color-btn-active);
            pointer-events: none;
            padding-right: calc(var(--size-btn-ui) * 0.2);

            .endscreen-btn-txt {
                font-size: calc(var(--size-btn-ui) * 0.4);
                text-align: center;
                line-height: 100%;
                width: 100%;
                color: var(--color-soft-black);
                margin: 0;
                padding: 5px 10px;
                padding-right: 0;
            }
        }

        @media screen and (max-width: 450px) {
            .btn-endscreen {
                width: auto;

                justify-content: center;

                img {
                    display: none;
                }
            }
        }
    }

    .end-img {
        height: 100%;
        max-width: 100%;
        object-fit: contain;
    }

    .score {
        display: flex;
        justify-content: center;
        align-items: center;
        max-height: 20%;
        max-width: 100%;

        img {
            height: 80%;
            min-width: 50px;
            min-height: 50px;
            max-width: 33%;
            object-fit: contain;
            opacity: 0;
        }

        img:nth-child(2) {
            padding-bottom: 20px;
        }

        img:nth-child(1),
        img:nth-child(3) {
            padding-top: 20px;
        }
    }

    .current-score {
        font-family: 'Titan One';
        font-size: calc(var(--size-btn-ui) * 0.4);
        text-align: center;
        line-height: 150%;
        color: var(--color-soft-black);
        margin-bottom: 10px;
        background-color: var(--color-btn-menu-active);
        padding: 5px 10px;
        border-radius: calc(var(--size-btn-ui) / 2);
        opacity: 0;
    }
}

.optin-0 {
    animation: optin 1s ease-in-out 1s forwards;
}

.optin-1 {
    animation: optin 1s ease-in-out 1.5s forwards;
}

.optin-2 {
    animation: optin 1s ease-in-out 2s forwards;
}

.optin-3 {
    animation: optin 1s ease-in 2.5s forwards;
}

.endscreen-animation {
    animation:
        grow 2s ease-in-out forwards,
        levitate 2s ease infinite alternate;
}
/* #endregion endscreen */

.ios-fullscreen {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100svh;
    border-radius: 0;
}

.d-desktop {
    display: none;
}

.d-hide {
    opacity: 0;
    pointer-events: none;
    transition: all 1s ease-in-out;
}

.point-enable {
    pointer-events: all !important;
}

@media (hover: hover) {
    .btn-mobile {
        display: none;
    }

    .d-mobile {
        display: none !important;
    }

    .d-desktop {
        display: inline;
    }
}
