/* ════════════════════════════════════════════════
   Loading Section
   ════════════════════════════════════════════════ */

.loading-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 64px);
    padding: 40px 24px;
}
.loading-content { text-align: center; max-width: 420px; }

.loading-animation {
    position: relative;
    width: 110px; height: 110px;
    margin: 0 auto 36px;
}
.loading-ring {
    position: absolute;
    inset: 0;
    border: 2.5px solid transparent;
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 1.6s linear infinite;
}
.loading-ring-2 {
    inset: 14px;
    border-top-color: var(--accent-light);
    animation-duration: 1.1s;
    animation-direction: reverse;
}
.loading-ring-3 {
    inset: 28px;
    border-top-color: var(--blue);
    animation-duration: 0.8s;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-brain {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 26px;
    animation: pulseScale 2s ease-in-out infinite;
}
@keyframes pulseScale {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50%       { transform: translate(-50%, -50%) scale(1.12); }
}

.loading-title { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 8px; }
.loading-subtitle { color: var(--text-secondary); font-size: 14px; margin-bottom: 24px; }

/* ── Progress Bar ── */
.loading-progress-wrap {
    margin-bottom: 28px;
}

.loading-progress-track {
    position: relative;
    width: 100%;
    height: 8px;
    background: rgba(139, 92, 246, 0.08);
    border-radius: 100px;
    overflow: hidden;
    border: 1px solid rgba(139, 92, 246, 0.12);
}

.loading-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 100px;
    background: linear-gradient(90deg, #8b5cf6, #a78bfa, #c4b5fd);
    background-size: 200% 100%;
    animation: progressShimmer 2s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes progressShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.loading-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 12px;
}

.loading-pct {
    font-weight: 700;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.loading-eta {
    color: var(--text-muted);
}

/* ── Steps ── */
.loading-steps { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.loading-step {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    color: var(--text-muted);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: all 0.4s ease;
}
.loading-step.active {
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.2);
}
.loading-step.done { color: var(--success); }
.step-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
    transition: all 0.4s ease;
}
.loading-step.active .step-dot {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: pulseDot 1s infinite;
}
.loading-step.done .step-dot { background: var(--success); box-shadow: none; }

/* Checkmark for done steps */
.step-check {
    margin-left: auto;
    opacity: 0;
    color: var(--success);
    font-weight: 700;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.loading-step.done .step-check {
    opacity: 1;
    transform: scale(1);
}

@keyframes pulseDot {
    0%, 100% { box-shadow: 0 0 6px var(--accent); }
    50%      { box-shadow: 0 0 14px var(--accent); }
}
