/* ═══════════════════════════════════════════════════════
   Automated Worx — Global Orbital Page Loader
   All classes use aw- prefix to avoid collisions
   ═══════════════════════════════════════════════════════ */

.aw-loader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #030014;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 99999;
    transition: opacity 0.6s cubic-bezier(0.4,0,0.2,1),
                visibility 0.6s cubic-bezier(0.4,0,0.2,1);
    overflow: hidden;
}
.aw-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Grid background */
.aw-loader::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 50% 50%, rgba(14,242,255,0.03) 0%, transparent 70%),
        linear-gradient(rgba(14,242,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14,242,255,0.015) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    animation: awGridFade 3s ease-in-out infinite;
}
@keyframes awGridFade {
    0%, 100% { opacity: 0.3; }
    50%      { opacity: 0.7; }
}

/* Core container */
.aw-loader-core {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Logo */
.aw-loader-icon {
    width: 70px;
    height: auto;
    position: relative;
    z-index: 3;
    opacity: 0;
    transform: scale(0.5);
    filter: drop-shadow(0 0 20px rgba(14,242,255,0.5));
    animation: awLogoReveal 0.8s cubic-bezier(0.16,1,0.3,1) forwards,
               awLogoBreathe 3s ease-in-out 0.8s infinite;
}
@keyframes awLogoReveal {
    to { opacity: 1; transform: scale(1); }
}
@keyframes awLogoBreathe {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(14,242,255,0.5)); }
    50%      { filter: drop-shadow(0 0 40px rgba(14,242,255,0.8))
                       drop-shadow(0 0 80px rgba(191,90,242,0.3)); }
}

/* Orbit rings */
.aw-orbit {
    position: absolute;
    border-radius: 50%;
    border: 1px solid transparent;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.aw-orbit-1 {
    width: 130px; height: 130px;
    border-color: rgba(14,242,255,0.15);
    animation: awOrbitSpin 8s linear infinite,
               awOrbitPulse 4s ease-in-out infinite;
}
.aw-orbit-2 {
    width: 170px; height: 170px;
    border-color: rgba(191,90,242,0.1);
    animation: awOrbitSpinRev 12s linear infinite,
               awOrbitPulse 4s ease-in-out 1s infinite;
}
.aw-orbit-3 {
    width: 210px; height: 210px;
    border-color: rgba(14,242,255,0.06);
    animation: awOrbitSpin 16s linear infinite,
               awOrbitPulse 4s ease-in-out 2s infinite;
}
@keyframes awOrbitSpin {
    to { transform: translate(-50%,-50%) rotate(360deg); }
}
@keyframes awOrbitSpinRev {
    to { transform: translate(-50%,-50%) rotate(-360deg); }
}
@keyframes awOrbitPulse {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 1; }
}

/* Orbiting dots */
.aw-dot {
    position: absolute;
    border-radius: 50%;
    top: 50%; left: 50%;
}
.aw-dot-1 {
    width: 4px; height: 4px;
    background: #0EF2FF;
    box-shadow: 0 0 8px #0EF2FF, 0 0 20px rgba(14,242,255,0.4);
    animation: awDot1 4s linear infinite;
}
.aw-dot-2 {
    width: 3px; height: 3px;
    background: #A855F7;
    box-shadow: 0 0 8px #A855F7, 0 0 20px rgba(168,85,247,0.4);
    animation: awDot2 6s linear infinite;
}
@keyframes awDot1 {
    0%   { transform: translate(-50%,-50%) rotate(0deg)   translateX(65px)  rotate(0deg); }
    100% { transform: translate(-50%,-50%) rotate(360deg) translateX(65px)  rotate(-360deg); }
}
@keyframes awDot2 {
    0%   { transform: translate(-50%,-50%) rotate(0deg)    translateX(85px) rotate(0deg); }
    100% { transform: translate(-50%,-50%) rotate(-360deg) translateX(85px) rotate(360deg); }
}

/* Scan arc */
.aw-scan {
    position: absolute;
    width: 150px; height: 150px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: rgba(14,242,255,0.5);
    border-right-color: rgba(14,242,255,0.15);
    animation: awScanSpin 2s cubic-bezier(0.4,0,0.2,1) infinite;
}
@keyframes awScanSpin {
    to { transform: translate(-50%,-50%) rotate(360deg); }
}

/* Progress bar */
.aw-loader-progress {
    width: 160px;
    height: 2px;
    background: rgba(14,242,255,0.08);
    border-radius: 2px;
    margin-top: 36px;
    overflow: hidden;
    opacity: 0;
    animation: awFadeUp 0.5s ease 0.3s forwards;
}
.aw-loader-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0EF2FF, #A855F7);
    border-radius: 2px;
    animation: awProgressFill 2s cubic-bezier(0.4,0,0.2,1) 0.5s forwards;
    box-shadow: 0 0 10px rgba(14,242,255,0.4);
}
@keyframes awProgressFill {
    0%   { width: 0%; }
    30%  { width: 40%; }
    60%  { width: 70%; }
    100% { width: 100%; }
}

/* Text */
.aw-loader-text {
    margin-top: 18px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(14,242,255,0.4);
    opacity: 0;
    animation: awFadeUp 0.5s ease 0.5s forwards;
}
.aw-loader-text span {
    display: inline-block;
    animation: awTextFlicker 3s ease-in-out infinite;
}
@keyframes awFadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes awTextFlicker {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 1; }
}
