.loader_bg {
    position: fixed;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.95);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease-out;
    left: 0;
    top: 0;
}

.loader {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid rgba(255, 68, 60, 0.2);
    border-top-color: #ff443c;
    animation: spin 0.8s infinite linear;
    box-shadow: 0 4px 12px rgba(255, 68, 60, 0.2);
}

@keyframes spin {
    0% { 
        transform: rotate(0deg);
    }
    100% { 
        transform: rotate(360deg);
    }
}

/* Adding fade-out animation */
.loader_bg.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Pulse effect for added visual appeal */
@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.8;
    }
}

/* Optional: Add this class to the loader for a pulse effect */
.loader.with-pulse {
    animation: spin 0.8s infinite linear, pulse 1.5s infinite ease-in-out;
}
