/* ================================================================
   AURA AI — Animations & Visual Effects
   Slow logo breathing, energy pulses, holographic rings, light sweeps,
   and cinematic 7-second startup experience
   ================================================================ */

/* ── Logo Breathing & Ambient Glow ── */
@keyframes auraLogoBreathe {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 12px rgba(57, 255, 20, 0.45));
    }
    50% {
        transform: scale(1.025);
        filter: drop-shadow(0 0 24px rgba(57, 255, 20, 0.75)) drop-shadow(0 0 40px rgba(0, 240, 255, 0.3));
    }
}

@keyframes auraLogoGenerating {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 16px rgba(57, 255, 20, 0.7));
    }
    50% {
        transform: scale(1.06);
        filter: drop-shadow(0 0 32px rgba(57, 255, 20, 0.95)) drop-shadow(0 0 50px rgba(0, 240, 255, 0.5));
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 16px rgba(57, 255, 20, 0.7));
    }
}

/* ── Status Dot Pulse ── */
@keyframes auraStatusPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 8px var(--aura-green);
    }
    50% {
        opacity: 0.4;
        transform: scale(0.85);
        box-shadow: 0 0 3px var(--aura-green);
    }
}

/* ── Floating Holographic Orbs ── */
@keyframes floatCyberOrb1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(60px, 80px) scale(1.1); }
    66% { transform: translate(-40px, 50px) scale(0.95); }
}

@keyframes floatCyberOrb2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-80px, -60px) scale(0.9); }
    66% { transform: translate(40px, -90px) scale(1.15); }
}

@keyframes floatCyberOrb3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.25); }
}

/* ── Energy Ring Rotation ── */
@keyframes ringSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes ringSpinReverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

/* ── Scanline & Grid Movement ── */
@keyframes gridDrift {
    0% { background-position: 0 0; }
    100% { background-position: 40px 40px; }
}

/* ── Light Sweep Effect on Buttons ── */
@keyframes lightSweep {
    0% {
        left: -100%;
    }
    100% {
        left: 200%;
    }
}

/* ── Message Animations ── */
@keyframes messageEntrance {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeInSmooth {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Cursor Blink ── */
@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ── Energy Ring Surrounding Avatar ── */
.avatar-energy-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1.5px dashed var(--aura-green);
    animation: ringSpin 6s linear infinite;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.message.assistant.generating .avatar-energy-ring {
    opacity: 0.85;
    animation: ringSpin 2.5s linear infinite;
}

/* ================================================================
   CINEMATIC AURA AI STARTUP SCREEN (5-7 Seconds Sequence)
   ================================================================ */
.aura-startup-overlay {
    position: fixed;
    inset: 0;
    background: #020504;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s cubic-bezier(0.4, 0, 0.2, 1), filter 1.2s ease;
}

.aura-startup-overlay.fade-out {
    opacity: 0;
    filter: blur(8px);
    transform: scale(1.05);
    pointer-events: none;
}

.startup-ambient-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(to right, rgba(57, 255, 20, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(57, 255, 20, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle at center, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(circle at center, black 30%, transparent 75%);
}

.startup-particle-canvas {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.startup-stage {
    position: relative;
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.startup-outer-ring {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    border: 1.5px dashed rgba(57, 255, 20, 0.35);
    animation: ringSpin 18s linear infinite;
}

.startup-inner-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid rgba(0, 240, 255, 0.4);
    border-top-color: var(--aura-green);
    border-bottom-color: var(--aura-green);
    animation: ringSpinReverse 10s linear infinite;
}

.startup-glow-disc {
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(57, 255, 20, 0.35) 0%, rgba(0, 240, 255, 0.1) 45%, transparent 70%);
    filter: blur(30px);
    animation: auraLogoBreathe 4s infinite ease-in-out;
}

.startup-logo-img {
    width: 210px;
    height: 210px;
    object-fit: contain;
    position: relative;
    z-index: 5;
    filter: drop-shadow(0 0 25px rgba(57, 255, 20, 0.8));
    animation: startupLogoReveal 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes startupLogoReveal {
    0% {
        opacity: 0;
        transform: scale(0.92);
        filter: drop-shadow(0 0 5px rgba(57, 255, 20, 0.2));
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: drop-shadow(0 0 30px rgba(57, 255, 20, 0.85));
    }
}

.startup-info-wrap {
    text-align: center;
    position: relative;
    z-index: 5;
    max-width: 480px;
}

.startup-title {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 4px;
    color: #f0fdf4;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(57, 255, 20, 0.6);
    margin-bottom: 6px;
}

.startup-status-line {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    color: var(--aura-green);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    height: 22px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.startup-progress-bar {
    width: 260px;
    height: 3px;
    background: rgba(57, 255, 20, 0.15);
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto;
    position: relative;
}

.startup-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--aura-green) 0%, var(--aura-cyan) 100%);
    box-shadow: 0 0 10px var(--aura-green);
    transition: width 0.3s ease;
}

/* Accessibility: Respect Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .aura-startup-overlay {
        display: none !important;
    }
}
