/* Loading screen styles — paired with loading.html.
   Edit freely without touching the main style.css.
   Uses CSS custom properties from style.css :root if available; otherwise falls back. */

#loadingScreen {
    text-align: center;
    padding: 60px 20px 40px;
}

/* Spinner */
.loader-spinner {
    display: inline-block;
    width: 64px;
    height: 64px;
    border: 5px solid var(--color-primary-light, #dbeafe);
    border-top-color: var(--color-primary, #2563eb);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Rotating title messages */
.loader-title {
    position: relative;
    min-height: 32px;
    margin: 32px auto 24px;
    font-family: var(--font-heading, 'Plus Jakarta Sans'), system-ui, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text, #111827);
    letter-spacing: -0.02em;
}
.loader-msg {
    position: absolute;
    inset: 0;
    text-align: center;
    opacity: 0;
    animation: loaderMsg 12s ease-in-out infinite;
}
.loader-msg:nth-child(1) { animation-delay: 0s; }
.loader-msg:nth-child(2) { animation-delay: 3s; }
.loader-msg:nth-child(3) { animation-delay: 6s; }
.loader-msg:nth-child(4) { animation-delay: 9s; }
@keyframes loaderMsg {
    0%, 25%, 100% { opacity: 0; transform: translateY(8px); }
    3%, 22%       { opacity: 1; transform: translateY(0); }
}

/* Progressive step list */
.loader-steps {
    list-style: none;
    padding: 0;
    margin: 24px auto 28px;
    max-width: 360px;
    text-align: left;
}
.loader-steps li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 15px;
    color: var(--color-text-muted, #6b7280);
    opacity: 0.4;
    animation: stepReveal 12s ease-in-out infinite;
}
.loader-steps li:nth-child(1) { animation-delay: 0s; }
.loader-steps li:nth-child(2) { animation-delay: 3s; }
.loader-steps li:nth-child(3) { animation-delay: 6s; }
.loader-steps li:nth-child(4) { animation-delay: 9s; }
@keyframes stepReveal {
    0%, 25%, 100% { opacity: 0.35; color: var(--color-text-muted, #6b7280); }
    3%, 22%       { opacity: 1;    color: var(--color-text, #111827); font-weight: 600; }
}

.loader-steps .check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: var(--color-border, #e5e7eb);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.3s;
    animation: checkActivate 12s ease-in-out infinite;
}
.loader-steps li:nth-child(1) .check { animation-delay: 0s; }
.loader-steps li:nth-child(2) .check { animation-delay: 3s; }
.loader-steps li:nth-child(3) .check { animation-delay: 6s; }
.loader-steps li:nth-child(4) .check { animation-delay: 9s; }
@keyframes checkActivate {
    0%, 25%, 100% {
        background: var(--color-border, #e5e7eb);
        transform: scale(1);
    }
    3%, 22% {
        background: var(--color-success, #059669);
        transform: scale(1.1);
    }
}

.loader-note {
    font-size: 13px;
    color: var(--color-text-muted, #6b7280);
    margin: 12px 0 0;
}
