body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 47, 0.98);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 11000;
    backdrop-filter: blur(10px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.loader-wrapper.hidden {
    opacity: 0;
    filter: blur(20px);
    transform: scale(0.95);
    pointer-events: none;
}

/* Initial state when adding to DOM */
.loader-wrapper[hidden] {
    display: flex; /* Override default hidden attribute behavior */
}

.loader {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.outer-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: #1a237e;
    border-bottom-color: #6a1b9a;
    animation: rotate 2s linear infinite;
    box-shadow: 0 0 20px rgba(106, 27, 154, 0.3);
}

.inner-ring {
    position: absolute;
    width: 70%;
    height: 70%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-left-color: #4a148c;
    border-right-color: #0d47a1;
    animation: rotateReverse 1.5s linear infinite;
    filter: blur(2px);
}

.center-logo {
    position: absolute;
    width: 50%;
    z-index: 2;
    filter: drop-shadow(0 0 10px rgba(106, 27, 154, 0.5));
}

.loading-text {
    position: absolute;
    bottom: -70px;
    text-align: center;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(106, 27, 154, 0.5);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes rotateReverse {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

@keyframes loaderEntrance {
    from {
        opacity: 0;
        filter: blur(20px);
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        filter: blur(0);
        transform: scale(1);
    }
}

.loader::after {
    content: '';
    position: absolute;
    width: 110%;
    height: 110%;
    background: radial-gradient(circle, rgba(106, 27, 154, 0.1) 0%, rgba(0,0,0,0) 70%);
    z-index: 1;
}