/* Premium Loading Bar Styles */
#loadingBar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.loading-container {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 450px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.loading-title {
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1em;
}

.progress-track {
    position: relative;
    height: 24px;
    background: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

#bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2563eb, #38bdf8);
    border-radius: 12px;
    transition: width 0.2s ease;
    position: relative;
}

#bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(255, 255, 255, 0.2) 0%,
            rgba(255, 255, 255, 0) 50%,
            rgba(255, 255, 255, 0.1) 100%);
}

#bar-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85em;
    font-weight: 700;
    color: var(--text-primary);
    z-index: 10;
    pointer-events: none;
    mix-blend-mode: difference;
    filter: invert(1) grayscale(1) contrast(9);
}

/* For dark theme adjustment if needed */
[data-theme='dark'] #bar {
    background: linear-gradient(90deg, #38bdf8, #818cf8);
}