/* static/css/partials/loader.css */

#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 16, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

[data-theme="light"] #loader {
    background: rgba(240, 240, 245, 0.6);
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid rgba(139, 92, 246, 0.1);
    border-top: 3px solid var(--primary-light);
    border-right: 3px solid var(--secondary);
    animation: spin 1s linear infinite;
    box-shadow: 0 0 40px rgba(108, 60, 225, 0.1);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--gold));
    z-index: 9998;
    transition: width 0.1s;
    box-shadow: 0 0 20px rgba(108, 60, 225, 0.2);
}

.back-to-top {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(108, 60, 225, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.08);
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 999;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 30px rgba(108, 60, 225, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="light"] .back-to-top {
    background: rgba(108, 60, 225, 0.08);
    border-color: rgba(108, 60, 225, 0.1);
    color: var(--text-main);
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    transform: translateY(-4px) scale(1.05);
    background: rgba(108, 60, 225, 0.15);
    border-color: rgba(139, 92, 246, 0.1);
    box-shadow: 0 8px 50px rgba(108, 60, 225, 0.15);
}

.back-to-top i {
    animation: arrowBounce 2s ease-in-out infinite;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary), var(--gold));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}