/* ============================================================
   Login / 2FA success animation
   ------------------------------------------------------------
   Shared between login.html and verify_2fa.html.

   The animation has three phases driven by body classes:
     - default (no class): card visible, particles hidden, no quote/progress
     - .anim-phase2: card fades out, quote fades in, progress bar fills,
                     particles drift upward
     - .anim-phase3: quote fades out, "Loading your experience..." appears

   Phase transitions are triggered from JS (login_animation.js).
   ============================================================ */

/* Particle layer (always present, only animated during phase2) */
.login-particles {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
}
.login-particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(240, 94, 34, .3);
    opacity: 0;
}

@keyframes particle-float {
    0%   { opacity: 0; transform: translateY(0); }
    10%  { opacity: .8; }
    90%  { opacity: .8; }
    100% { opacity: 0; transform: translateY(-140px); }
}

/* Quote that appears during animation phase 2 */
.quote-content {
    margin-top: 20px;
    text-align: center;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.7s, transform 0.7s;
    pointer-events: none;
}

.quote-text {
    color: var(--text);
    font-size: 22px;
    font-weight: 700;
    max-width: 500px;
    line-height: 1.5;
    padding: 0 24px;
}

.quote-author {
    color: rgba(240, 94, 34, .65);
    font-size: 14px;
    font-weight: 600;
    margin-top: 12px;
    letter-spacing: .5px;
    opacity: 0;
    transition: opacity .6s;
}

/* Progress bar at bottom */
.progress-bar-fill {
    height: 100%;
    width: 0;
    background: var(--accent);
    border-radius: 2px;
}

.progress-bar-bottom {
    position: fixed;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    height: 3px;
    background: rgba(255, 255, 255, .08);
    border-radius: 2px;
    z-index: 11;
    opacity: 0;
    transition: opacity .4s;
}

.progress-label {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(245, 245, 247, .35);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 11;
    opacity: 0;
    transition: opacity .4s;
}

/* ============================================================
   Phase 2: card fades out, quote fades in, particles drift
   ============================================================ */

/* The .login-card-area / .tfa-card-area selectors apply to BOTH
   the login page card AND the 2fa challenge card. Both classes
   share the fade-out behavior in phase 2. */
body.anim-phase2 .login-card-area,
body.anim-phase2 .tfa-card-area {
    opacity: 0;
    pointer-events: none;
    max-height: 0;
    margin-top: 0;
    padding: 0 28px;
    border-color: transparent;
}

body.anim-phase2 .quote-content {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
}

body.anim-phase2 .quote-author {
    opacity: 1;
    transition-delay: 1.0s;
}

body.anim-phase2 .login-particle {
    animation: particle-float 4s ease-in-out infinite;
}

body.anim-phase2 .progress-bar-bottom {
    opacity: 1;
    transition-delay: .5s;
}

/* ============================================================
   Phase 3: quote fades out, "Loading your experience..." appears
   ============================================================ */

body.anim-phase3 .quote-content {
    opacity: 0;
    transition: opacity .5s;
}

body.anim-phase3 .quote-author {
    opacity: 0;
}

body.anim-phase3 .progress-bar-bottom {
    opacity: 0;
}

body.anim-phase3 .progress-label {
    opacity: 1;
}