/* Preloader Wrapper */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradient Background: #0A2468 -> #133B9E */
    background: linear-gradient(135deg, #0A2468 0%, #133B9E 100%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Loader Animation Container */
.loader-content {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

/* Spinner Rings */
.spinner-ring {
    position: absolute;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #1F6BFF;
    /* Brand Blue - Light enough to see on dark? Maybe lighten it? */
    /* Actually #1F6BFF is bright blue, should be fine. Let's make it pop more. */
    width: 100%;
    height: 100%;
    animation: spin 2s linear infinite;
    box-shadow: 0 0 15px rgba(31, 107, 255, 0.3);
    /* Add glow */
}

.spinner-ring::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #37C384;
    /* Brand Green */
    animation: spin 3s linear infinite;
    box-shadow: 0 0 15px rgba(55, 195, 132, 0.3);
}

.spinner-ring::after {
    content: "";
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #F97316;
    /* Brand Orange */
    animation: spin 1.5s linear infinite;
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.3);
}

/* Text Container */
.loading-text-container {
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.loading-text {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #FFFFFF;
    /* White text for contrast on dark bg */
    text-align: center;
    letter-spacing: 0.5px;
    animation: fadeText 3s infinite;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Animations */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeText {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .loader-content {
        width: 100px;
        height: 100px;
    }

    .loading-text {
        font-size: 14px;
    }
}