.nexus-test-loader {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: grid;
    place-items: center;
    background: #191627;
    color: #c5bfd5;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease-out;
}

.nexus-test-loader[hidden] { display: none; }
.nexus-test-loader.is-visible { opacity: 1; pointer-events: auto; }
@starting-style {
    .nexus-test-loader.is-visible { opacity: 0; }
}
html[data-theme="light"] .nexus-test-loader { background: #f2f2f5; color: #5d5172; }
.nexus-test-loader-stage { width: min(240px, 70vw); text-align: center; }
.nexus-test-loader-character { position: relative; animation: nexus-loader-float 2.8s ease-in-out infinite; }
.nexus-test-loader-robot { display: block; width: 100%; height: auto; }
.nexus-test-loader-mark { position: absolute; width: 10%; height: auto; left: 44%; top: 65%; transform: rotate(-7deg); }
.nexus-test-loader-light {
    position: absolute;
    left: 73%;
    top: 39%;
    width: 20%;
    overflow: visible;
    filter: drop-shadow(0 0 6px #a981ef);
    animation: nexus-loader-light 2.2s ease-in-out infinite;
}
.nexus-test-loader-shadow {
    display: block;
    width: 34%;
    height: 7px;
    margin: -12px auto 24px;
    border-radius: 50%;
    background: #a981ef40;
    filter: blur(5px);
    animation: nexus-loader-shadow 2.8s ease-in-out infinite;
}
.nexus-test-loader-stage p { margin: 0; font: 500 14px/1.5 system-ui, sans-serif; }
.nexus-test-loader:not(.is-visible) * { animation-play-state: paused; }

@keyframes nexus-loader-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@keyframes nexus-loader-light {
    0%, 100% { transform: translate(0, 0) rotate(-6deg); opacity: .75; }
    50% { transform: translate(3px, -4px) rotate(6deg); opacity: 1; }
}
@keyframes nexus-loader-shadow {
    0%, 100% { transform: scaleX(1); opacity: .7; }
    50% { transform: scaleX(.85); opacity: .45; }
}
@media (prefers-reduced-motion: reduce) {
    .nexus-test-loader { transition: none; }
    .nexus-test-loader * { animation: none; }
}
