.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--page-bg);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-direction: column;
    color: color-mix(in srgb, var(--text-color) 33%, transparent);
}

.loader.hidden {
    animation: fadeOut 1s;
    animation-fill-mode: forwards;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--theme-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeOut {
    100% {
        opacity: 0;
        visibility: hidden;
    }
}