* {
    margin: 0;
    padding: 0;
    font-family: "Space Grotesk", serif;
    color: #fff;

    --huge-text: clamp(4em, 6vw, 8em);
    --big-text: clamp(2em, 4vw, 5em);
    --small-text: clamp(1.2em, 2vw, 2em);

    --ufo-size: 100px;
    --ufo-offset: -100px;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: linear-gradient(190deg, #02040a 0%,
            #0d233b 80%, #2a5889 100%);
    background-size: cover;
}


main {
    height: 100%;
    width: 100%;
    display: block;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

#happy {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}


.chapter {
    min-height: 100vh;
    padding: 1em;
    width: 100vw;
}

/* The star element – its box-shadow will be populated by JavaScript */
.star {
    position: absolute;
    width: 1px;
    height: 1px;
    background: transparent;
    top: 0;
    left: 0;

}

/* Meteor element base style */
.meteor {
    position: absolute;
    width: 300px;
    height: 1px;
    transform: rotate(-45deg);
    background-image: linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
    animation: meteorAnimation linear infinite;
}

.meteor::before {
    content: "";
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    margin-top: -2px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 15px 3px #fff;
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
    opacity: 0;
}

@keyframes ufo1Animation {
    0% {
        top: var(--ufo-offset);
        left: var(--ufo-offset);
    }

    20% {
        top: 50vh;
        left: 50vw;
    }

    40% {
        top: 100vh;
        left: 100vw;
    }

    100% {
        top: var(--ufo-offset);
        left: var(--ufo-offset);
    }
}

@keyframes ufo2Animation {
    0% {
        top: var(--ufo-offset);
        right: var(--ufo-offset);
    }

    30% {
        top: 20vh;
        right: 70vw;
    }

    60% {
        top: 10vh;
        right: 40vw;
    }

    100% {
        top: var(--ufo-offset);
        right: var(--ufo-offset);
    }
}

@keyframes ufo3Animation {
    0% {
        bottom: var(--ufo-offset);
        right: var(--ufo-offset);
    }

    60% {
        bottom: 50vh;
        right: 20vw;
    }

    80% {
        bottom: 100vh;
        right: 80vw;
    }

    100% {
        bottom: var(--ufo-offset);
        right: var(--ufo-offset);
    }
}

.animate-ufo-1 {
    animation: ufo1Animation 5s ease-in-out;
}

.animate-ufo-2 {
    animation: ufo2Animation 5s ease-in-out;
}

.animate-ufo-2 {
    animation: ufo3Animation 5s ease-in-out;
}


#ufo-1 {
    position: absolute;
    top: var(--ufo-offset);
    left: var(--ufo-offset);
}

#ufo-2 {
    position: absolute;
    top: var(--ufo-offset);
    right: var(--ufo-offset);
}

#ufo-3 {
    position: absolute;
    bottom: var(--ufo-offset);
    right: var(--ufo-offset);
}


.ufo {
    position: absolute;
    width: var(--ufo-size);
    height: var(--ufo-size);
}

/* Keyframes for meteor animation */
@keyframes meteorAnimation {
    0% {
        opacity: 1;
        margin-top: -300px;
        margin-right: -300px;
    }

    12% {
        opacity: 0;
    }

    15% {
        margin-top: 300px;
        margin-left: -600px;
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}


#happy h1 {
    font-size: var(--huge-text);
}

#happy p {
    font-size: var(--small-text);
}

#happy button {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    transition: transform 0.2s ease;
    font-size: var(--huge-text);
    top: 20px;
    right: 20px;
    animation: wiggle 2s infinite;
    transition: transform 0.5s ease-in-out;
}

#happy button svg {
    width: var(--small-text);
    height: var(--small-text);
    transition: transform 0.5s ease-in-out;
}

#happy button svg:hover {
    transform: scale(1.1);
}

#happy button:active {
    transform: scale(0.9);
}

@keyframes wiggle {
    0% {
        transform: rotate(0deg);
    }

    10% {
        transform: rotate(5deg);
    }

    20% {
        transform: rotate(-5deg);
    }

    30% {
        transform: rotate(5deg);
    }

    40% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(0deg);
    }
}