/* Fancy Global AJAX Loader */
#global-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
}

#global-loader.flex {
    display: flex;
}

.loader-container {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Outer Ring */
.loader-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: #CA0200;
    animation: loader-spin 1.5s linear infinite;
}

/* Middle Ring */
.loader-ring:nth-child(2) {
    width: 80%;
    height: 80%;
    border-top-color: #333;
    animation: loader-spin-reverse 2s linear infinite;
}

/* Inner Ring */
.loader-ring:nth-child(3) {
    width: 60%;
    height: 60%;
    border-top-color: #CA0200;
    opacity: 0.7;
    animation: loader-spin 1s linear infinite;
}

/* Center Logo/Icon Pulse */
.loader-icon {
    width: 40px;
    height: 40px;
    background: #CA0200;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(202, 2, 0, 0.5);
    animation: loader-pulse 1.5s ease-in-out infinite;
}

@keyframes loader-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes loader-spin-reverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

@keyframes loader-pulse {
    0%, 100% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
}

/* Loading Text */
.loader-text {
    position: absolute;
    bottom: -40px;
    font-family: inherit;
    color: #333;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: text-pulse 1.5s ease-in-out infinite;
}

@keyframes text-pulse {
    0%, 100% { opacity: 0.4; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1); }
}
