/* loader.css */
#ca-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #070A0F; /* Matches --ca-bg-dark */
    backdrop-filter: blur(16px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s;
}

.loader-container {
    text-align: center;
    position: relative;
}

.loader-logo {
    width: 96px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 12.8px rgba(230, 57, 70, 0.5));
    animation: loaderPulse 2s infinite ease-in-out;
}

.loader-text {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #ffffff;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 16px;
    background: linear-gradient(90deg, #F8F9FA, #E63946, #F8F9FA);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShimmer 3s linear infinite;
}

.loader-progress-bar {
    width: 192px;
    height: 3.2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}

.loader-progress-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #E63946, #FF6B6B);
    box-shadow: 0 0 10px rgba(230, 57, 70, 0.4);
    position: absolute;
    top: 0;
    left: -100%;
    animation: loaderScan 1.8s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.loader-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: radial-gradient(circle at 50% 50%, rgba(230, 57, 70, 0.12) 0%, transparent 60%);
}

@keyframes loaderPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 12.8px rgba(230, 57, 70, 0.4)); }
    50% { transform: scale(1.05); filter: drop-shadow(0 0 22.4px rgba(230, 57, 70, 0.8)); }
}

@keyframes textShimmer {
    to { background-position: -200% center; }
}

@keyframes loaderScan {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Hide loader when page is loaded */
body.loaded #ca-loader {
    opacity: 0;
    visibility: hidden;
}
