@font-face {
    src: url("assets/Pixellari.ttf");
    font-family: "Pixellari";
}

body {
    margin: 0;
    padding: 0;
    font-family: "Pixellari", sans-serif;
    background-color: black;
    color: white;
}

* {
    position: relative;
    box-sizing: border-box;
}

img {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
}

.player {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 100vh;

    img {
        width: 100%;
        image-rendering: pixelated;
    }

    .hand {
        position: absolute;
        bottom: 120%;
        width: 165%;
        transform: translate(-25%, 100%);
        z-index: 1;
    }

    .bug {
        position: absolute;
        bottom: 200px;
        width: 100%;

        .splatImg {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            transform: scale(1.1);
        }
    }

    input[type="checkbox"] {
        position: absolute;
        bottom: 200px;
        width: 100%;
        height: 76px;
        opacity: 0;
        z-index: 2;
        cursor: pointer;

        &:checked {
            display: none;

            &+.hand {
                animation: hand 0.15s linear;

                @media screen and (max-width: 600px) {
                    animation: handMobile 0.15s linear;
                    animation-fill-mode: forwards;
                }
            }

            &+.hand+.bug {
                .bugImg {
                    opacity: 0;
                }

                .splatImg {
                    opacity: 1;
                }

                .title {
                    animation: blink 0.7s linear;
                    animation-delay: 0.75s;
                    animation-fill-mode: forwards;
                }
            }
        }
    }
}

.title {
    position: absolute;
    top: -200px;
    left: calc(-50vw + 60px);
    margin: 0;
    padding: 20px;
    width: 100vw;
    font-size: 3.5rem;
    text-align: center;
    opacity: 0;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.7);

    @media screen and (max-width: 600px) {
        top: -300px;
    }
}

.copyright {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 1.5rem;

    p {
        margin: 0;
    }
}

@media screen and (max-width: 600px) {
    .title {
        font-size: 2.75rem;
    }
}


@keyframes hand {
    0% {
        transform: translate(-25%, 100%);
        bottom: 120%;
    }

    50% {
        transform: translate(-25%, 0);
        bottom: 200px;
    }

    100% {
        transform: translate(-25%, 100%);
        bottom: 120%;
    }
}

@keyframes handMobile {
    0% {
        transform: translate(-25%, 100%);
        bottom: 120%;
    }

    50% {
        transform: translate(-25%, 0);
        bottom: 200px;
    }

    100% {
        transform: translate(-25%, 100%);
        bottom: 140%;
    }
}

@keyframes blink {
    0% {
        opacity: 0.2;
    }

    10% {
        opacity: 0.4;
    }

    20% {
        opacity: 0.1;
    }

    30% {
        opacity: 0.3;
    }

    50 {
        opacity: 0.5;
    }

    60 {
        opacity: 0.35;
    }

    80%: {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}
