@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&display=swap');

:root {
    --primary-color: #4f46e5;
    --secondary-color: #6366f1;
    --background-dark: rgba(15, 23, 42, 0.95);
    --text-color: #f8fafc;
    --transition-speed: 0.3s;
}

#loader-wrapper,
#login_loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh;
    z-index: 9999;
    background-color: var(--background-dark);
    backdrop-filter: blur(8px);
    transition: opacity var(--transition-speed) ease-in-out;
}

.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.loading-spinner {
    position: relative;
    width: 5rem;
    height: 5rem;
}

.circular {
    animation: rotate 2s linear infinite;
    height: 100%;
    transform-origin: center center;
    width: 100%;
}

.path {
    stroke: var(--primary-color);
    stroke-dasharray: 89, 200;
    stroke-dashoffset: 0;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite, color 6s ease-in-out infinite;
}

.loading-text {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: 0.025em;
    color: var(--text-color);
    margin: 0;
}

.dot-animation {
    display: inline-block;
    animation: dots 1.5s infinite;
}

.progress-bar {
    width: 150px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    animation: fillProgress 2.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 200;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 89, 200;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 89, 200;
        stroke-dashoffset: -124;
    }
}

@keyframes color {
    0%, 100% {
        stroke: var(--primary-color);
    }
    40% {
        stroke: var(--secondary-color);
    }
    66% {
        stroke: #818cf8;
    }
}

@keyframes dots {
    0%, 20% {
        opacity: 0;
    }
    40% {
        opacity: 1;
    }
    100% {
        opacity: 1;
    }
}

@keyframes fillProgress {
    0% {
        width: 0%;
    }
    50% {
        width: 70%;
    }
    100% {
        width: 100%;
    }
}

/* For smoother animations on higher-end devices */
@media (prefers-reduced-motion: no-preference) {
    .path {
        animation: dash 1.5s ease-in-out infinite, color 6s ease-in-out infinite;
    }
    
    .progress-fill {
        animation: fillProgress 2.5s ease-in-out infinite;
    }
}	