/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Preloader overlay */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10 120, 20, 0.9); /* Semi-transparent white background; change to black for dark mode */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* High z-index to cover everything */
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out; /* Smooth fade-out */
}

/* Loader image */
#loader-image {
    width: 200px; /* Adjust size as needed */
    height: 200px; /* Keep square for rotation */
    animation: spin 1s linear infinite; /* Rotate animation */
}

/* Keyframe for rotation */
@keyframes pulsing {
        0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; }
}

/* Hide preloader after load */
#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Main content (initially hidden to prevent flash) */
#main-content {
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

#main-content.loaded {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #loader-image {
        width: 200px;
        height: 200px;
    }
}