/* Remove margins and paddings for body */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #1c222d; /* Set background color to dark gray */
}

/* Full screen background image */
.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: fadeInBackground 2s ease-out forwards;
    z-index: 1;
}

/* Foreground image fixed to the bottom and filling the screen width */
.trees {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    object-fit: cover;
    z-index: 3;
    animation: fadeInForeground 2s ease-out forwards;
}

.moon {
    position: absolute;
    top: 5%; /* Start 10% from the bottom of the screen */
    left: 80%;
    transform: translate(-50%, 0); /* Start centered horizontally */
    z-index: 2;
    width: 350px; /* Adjusted size */
    height: auto; /* Maintain aspect ratio */
    animation: moveOnly 3s ease-out forwards; /* Updated animation */
}


/* Fourth image: slides in from the left to 30% at the bottom */
.silhouette {
    position: fixed;
    bottom: 0;
    left: -100%; /* Start off-screen to the left */
    z-index: 4;
    width: 170px; /* Adjust size as needed */
    height: auto; /* Maintain aspect ratio */
    animation: slideInFromLeft 1s ease-out forwards; /* Animation */
}

/* Background image fade-in animation */
@keyframes fadeInBackground {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Foreground image fade-in animation */
@keyframes fadeInForeground {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes moveOnly {
    0% {
        transform: translate(-50%, 100%); /* Start off-screen below */
    }
    100% {
        transform: translate(-50%, -10%); /* Move upwards to stop 10% from the bottom */
    }
}

/* Animation for the fourth image: slide in from the left */
@keyframes slideInFromLeft {
    0% {
        left: -100%; /* Start off-screen */
    }
    100% {
        left: 20%; /* End at 20% of the screen */
    }
}

/* Hidden π symbol */
#pi-symbol {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.5s ease-in;
    cursor: pointer;
}

#pi-symbol.visible {
    opacity: 1;
}

#pi-symbol:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}