#app-loader {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.spinner {
    position: relative;
    --r: 10px;
}

.spinner-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    margin: -2.5px 0 0 -2.5px;
    background: #3F31EB;
    border-radius: 50%;
    opacity: 1;
    transform-origin: 50% 50%;
    animation: dot-scale 1s linear infinite;
    transform: translate(var(--tx, 0), var(--ty, 0));
}

.spinner-dot:nth-child(1) {
    --tx: 0px;
    --ty: calc(var(--r) * -1);
    animation-delay: 0s;
}

.spinner-dot:nth-child(2) {
    --tx: calc(var(--r) * 0.7071);
    --ty: calc(var(--r) * -0.7071);
    animation-delay: 0.12s;
}

.spinner-dot:nth-child(3) {
    --tx: var(--r);
    --ty: 0px;
    animation-delay: 0.24s;
}

.spinner-dot:nth-child(4) {
    --tx: calc(var(--r) * 0.7071);
    --ty: calc(var(--r) * 0.7071);
    animation-delay: 0.36s;
}

.spinner-dot:nth-child(5) {
    --tx: 0px;
    --ty: var(--r);
    animation-delay: 0.48s;
}

.spinner-dot:nth-child(6) {
    --tx: calc(var(--r) * -0.7071);
    --ty: calc(var(--r) * 0.7071);
    animation-delay: 0.6s;
}

.spinner-dot:nth-child(7) {
    --tx: calc(var(--r) * -1);
    --ty: 0px;
    animation-delay: 0.72s;
}

.spinner-dot:nth-child(8) {
    --tx: calc(var(--r) * -0.7071);
    --ty: calc(var(--r) * -0.7071);
    animation-delay: 0.84s;
}

@keyframes dot-scale {
    0% {
        transform: translate(var(--tx, 0), var(--ty, 0)) scale(0.4);
        opacity: 0.3;
    }

    50% {
        transform: translate(var(--tx, 0), var(--ty, 0)) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(var(--tx, 0), var(--ty, 0)) scale(0.4);
        opacity: 0.3;
    }
}

@media (prefers-color-scheme: dark) {
    #app-loader {
        background: white;
    }
}