.preloader {
    position: fixed;
    inset: 0;
    background: #0F122A;
    /* Your theme dark blue */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    overflow: hidden;
}

.logo-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader img {
    width: 100px;
    /* Slightly smaller for elegance */
    height: auto;
    z-index: 2;
    animation: logoEntry 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* The subtle outer ring */
.loader-ring {
    position: absolute;
    width: 140px;
    height: 140px;
    border: 2px solid rgba(255, 255, 255, 0.05);
    border-top: 2px solid #ffffff;
    /* Or your brand accent color */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes logoEntry {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Smooth exit for the whole preloader */
.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s cubic-bezier(0.45, 0, 0.55, 1),
        visibility 0.6s;
}