/* Splash screen styles */

#splash-screen {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: white;
    position: fixed;
    padding: clamp(1rem, 3vw, 2rem);
    box-sizing: border-box;
}

#splash-logo {
    width: min(92vw, 800px);
    min-height: 120px;
    margin-bottom: clamp(0.75rem, 1.5vw, 1.25rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

#splash-logo h1 {
    margin: 0;
    line-height: 1.1;
    letter-spacing: 0.02em;
    font-size: clamp(2rem, 5vw, 3.5rem);
    overflow-wrap: anywhere;
}

#splash-tagline {
    font-size: clamp(1.2rem, 3vw, 2.2rem);
    line-height: 1.3;
    color: black;
    max-width: min(90vw, 34ch);
    margin: 0 0 clamp(1rem, 2vw, 1.75rem);
}

#start-button {
    padding: 0.75rem 1.5rem;
    background-color: black;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: clamp(1rem, 1.9vw, 1.25rem);
    min-width: 11rem;
    line-height: 1.2;
    
}

#start-button:hover {
    animation: shake 0.5s;
}

@keyframes shake {
    0% { transform: translate(0, 0) rotate(0deg);}
    25% { transform: translate(-5px, 0) rotate(-5deg); }
    50% { transform: translate(5px, 0) rotate(5deg); }
    75% { transform: translate(-5px, 0) rotate(-5deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}



#animated-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 1rem;
}

nav * {
    margin: 0;
    vertical-align: middle;
    align-items: center;
}

/* Arrows pointing to the start button */
#arrows-down {
    width: 100px;
    height: auto;
    top: 60%;
    left: 50%;
    margin-bottom: 0.85rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: scale(1.3);
    }
    50% {
        transform: scale(1);
    }
}


/* Explosion animation rotated slightly*/
#explosion-background {
    width: 150px;
    height: auto;
    position: absolute;
    rotate:  -25deg;
    top: 30%;
    left: 30%;
    transform: translate(-50%, -50%);
    animation: explosion 2s infinite;

}

@keyframes explosion {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

/* Drawing pencil animation */
#drawing-pencil {
    width: 300px;
    height: auto;
    position: absolute;
    rotate: 25deg;
    top: 20%;
    left: 80%;
    transform: translate(-50%, -50%);
    animation: pencil-move 2s infinite;
}

/* Hearts animation slight pulse*/

#hearts {
    width: 200px;
    height: auto;
    position: absolute;
    top: 80%;
    left: 80%;
    rotate: -10deg;
    transform: translate(-50%, -50%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* Swirl line no animation */
#swirl-line {
    width: 250px;
    height: auto;
    position: absolute;
    top: 70%;
    left: 10%;
    rotate: 20deg;
    transform: translate(-50%, -50%);
}

/* Sun doodle slow rotation */
#sun-doodle {
    width: 150px;
    height: auto;
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: rotate-slow 20s linear infinite;
}

@keyframes rotate-slow {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Crown doodle slight wobble */
#crown-doodle {
    width: 150px;
    height: auto;
    position: absolute;
    top: 50%;
    left: 90%;
    transform: translate(-50%, -50%);
    animation: wobble 2s infinite;
}

@keyframes wobble {
    0%, 100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    25% {
        transform: translate(-50%, -50%) rotate(-5deg);
    }
    50% {
        transform: translate(-50%, -50%) rotate(5deg);
    }
    75% {
        transform: translate(-50%, -50%) rotate(-5deg);
    }
}

/* Collection of animals small increase in size and decrease */
#collection-of-animals {
    width: 200px;
    height: auto;
    position: absolute;
    top: 20%;
    left: 10%;
    rotate: 15deg;
    transform: translate(-50%, -50%);
    animation: scale-up-down 4s infinite;
}

@keyframes scale-up-down {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* monster doodle slight shake */
#mosnter-doodle {
    width: 150px;
    height: auto;
    position: absolute;
    top: 80%;
    left: 35%;
    rotate: -15deg;
    transform: translate(-50%, -50%);
    animation: shake-monster 3s infinite;
}

@keyframes shake-monster {
    0%, 100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    25% {
        transform: translate(-50%, -50%) rotate(-5deg);
    }
    50% {
        transform: translate(-50%, -50%) rotate(5deg);
    }
    75% {
        transform: translate(-50%, -50%) rotate(-5deg);
    }
}

/* Chicken doodle slight bounce */
#chicken-doodle {
    width: 150px;
    height: auto;
    position: absolute;
    top: 60%;
    left: 70%;
    rotate: 10deg;
    transform: translate(-50%, -50%);
    animation: bounce-chicken 2s infinite;
}

@keyframes bounce-chicken {
    0%, 100% {
        transform: translate(-50%, -50%) rotate(10deg);
    }
    50% {
        transform: translate(-50%, -40%) rotate(10deg);
    }
}

/* Responsive adjustments */
@media (max-width: 780px) {
    #splash-logo {
        width: 90%;
        min-height: 90px;
    }

    #splash-tagline {
        max-width: 30ch;
    }

    #start-button {
        padding: 8px 16px;
        min-width: 10rem;
    }

    /* Adjust animated elements for smaller screens */
    #explosion-background, #drawing-pencil, #hearts, #swirl-line, #sun-doodle, #crown-doodle, #chicken-doodle, #mosnter-doodle, #collection-of-animals {
        width: 130px;
    }
}

@media (max-width: 560px) {
    #splash-screen {
        justify-content: flex-start;
        padding-top: 12vh;
    }

    #arrows-down {
        width: 86px;
        margin-bottom: 0.75rem;
    }

    #splash-tagline {
        max-width: 24ch;
    }

    #explosion-background,
    #drawing-pencil,
    #hearts,
    #swirl-line,
    #sun-doodle,
    #crown-doodle,
    #chicken-doodle,
    #mosnter-doodle,
    #collection-of-animals {
        opacity: 0.65;
    }
}