.sb-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
        visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.sb-loader.visible {
    opacity: 1;
    visibility: visible;
}

/* Backdrop with blur */
.sb-loader-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Dark mode backdrop */
@media (prefers-color-scheme: dark) {
    .sb-loader-backdrop {
        background-color: rgba(11, 15, 20, 0.95);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOADER CONTENT
   ═══════════════════════════════════════════════════════════════════════════ */

.sb-loader-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NEURAL RING
   ═══════════════════════════════════════════════════════════════════════════ */

.neural-ring {
    position: relative;
    width: 80px;
    height: 80px;
    will-change: transform;
}

/* Individual node */
.neural-ring .node {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #E5E7EB;
    /* Light mode: gray */
    top: 50%;
    left: 50%;
    transform-origin: center;
    transition: background-color 150ms ease;
}

/* Dark mode nodes */
@media (prefers-color-scheme: dark) {
    .neural-ring .node {
        background-color: #2A2F36;
    }
}

/* Active node (red) */
.neural-ring .node.active {
    background-color: #D63A3A;
    /* Light mode: red */
    animation: rotate-node 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Dark mode active node with glow */
@media (prefers-color-scheme: dark) {
    .neural-ring .node.active {
        background-color: #FF4B4B;
        box-shadow: 0 0 8px rgba(255, 75, 75, 0.3);
    }
}

/* Position nodes in circle (12 nodes, 30° apart) */
.neural-ring .node:nth-child(1) {
    transform: translate(-50%, -50%) rotate(0deg) translateY(-36px);
}

.neural-ring .node:nth-child(2) {
    transform: translate(-50%, -50%) rotate(30deg) translateY(-36px);
}

.neural-ring .node:nth-child(3) {
    transform: translate(-50%, -50%) rotate(60deg) translateY(-36px);
}

.neural-ring .node:nth-child(4) {
    transform: translate(-50%, -50%) rotate(90deg) translateY(-36px);
}

.neural-ring .node:nth-child(5) {
    transform: translate(-50%, -50%) rotate(120deg) translateY(-36px);
}

.neural-ring .node:nth-child(6) {
    transform: translate(-50%, -50%) rotate(150deg) translateY(-36px);
}

.neural-ring .node:nth-child(7) {
    transform: translate(-50%, -50%) rotate(180deg) translateY(-36px);
}

.neural-ring .node:nth-child(8) {
    transform: translate(-50%, -50%) rotate(210deg) translateY(-36px);
}

.neural-ring .node:nth-child(9) {
    transform: translate(-50%, -50%) rotate(240deg) translateY(-36px);
}

.neural-ring .node:nth-child(10) {
    transform: translate(-50%, -50%) rotate(270deg) translateY(-36px);
}

.neural-ring .node:nth-child(11) {
    transform: translate(-50%, -50%) rotate(300deg) translateY(-36px);
}

.neural-ring .node:nth-child(12) {
    transform: translate(-50%, -50%) rotate(330deg) translateY(-36px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

@keyframes rotate-node {
    from {
        transform: translate(-50%, -50%) rotate(0deg) translateY(-36px);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg) translateY(-36px);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOADER TEXT
   ═══════════════════════════════════════════════════════════════════════════ */

.loader-text {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #6B7280;
    /* Light mode: gray-500 */
    letter-spacing: 0.01em;
}

/* Dark mode text */
@media (prefers-color-scheme: dark) {
    .loader-text {
        color: #9CA3AF;
        /* Dark mode: gray-400 */
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PERFORMANCE OPTIMIZATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

/* GPU acceleration */
.neural-ring,
.neural-ring .node {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Prevent layout thrashing */
.sb-loader * {
    box-sizing: border-box;
}