/* This file is dedicated to AI loading - no visualizer styles should be here */
/* If any visualizer-related styles are found, they should be removed */

/* New dedicated CSS file for AI loading animation */
.loading-sequence {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin: 1.5rem auto 2rem;
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
    z-index: 50; /* Add this to ensure it appears on top */
}

.loading-bar-container {
    height: 6px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(0, 255, 255, 0.5);
    position: relative;
    overflow: visible;
    margin: 30px ;
    border-radius: 2px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.loading-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        #00ffff 30%, 
        #00ffff 70%,
        transparent 100%
    );
    position: relative;
    margin: 1.5px;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.9);
    transform-origin: center;
    animation: 
        progressBar 3s ease-in-out forwards,
        expandBar 3s ease-out forwards;
}

.loading-bar::before,
.loading-bar::after {
    content: '';
    position: absolute;
    height: 100%;
    width: 6px;
    background: #00ffff;
    top: 0;
    border-radius: 3px;
    box-shadow: 
        0 0 10px rgba(0, 255, 255, 0.9),
        0 0 20px rgba(0, 255, 255, 0.7),
        0 0 30px rgba(0, 255, 255, 0.5);
    z-index: 2;
}

.loading-bar::before {
    left: 0;
    animation: moveLeft 3s ease-in-out forwards;
}

.loading-bar::after {
    right: 0;
    animation: moveRight 3s ease-in-out forwards;
}

/* Enhanced loading text with cyber glitch effect */
.loading-text {
    font-family: 'Orbitron', sans-serif;
    color: #f9f900; /* Keep the yellow color */
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-align: center;
    margin-top: 0.5rem;
    margin-bottom: 0.7rem;
    text-shadow: 
        0 0 10px rgba(249, 249, 0, 0.8),
        0 0 20px rgba(249, 249, 0, 0.4);
    position: relative;
    display: inline-block;
    animation: textPulse 3s infinite;
}

/* Add a glitch effect to the loading text */
.loading-text::before,
.loading-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    clip: rect(0, 0, 0, 0);
}

.loading-text::before {
    left: -2px;
    text-shadow: 2px 0 #00ffff;
    animation: glitch-effect 3s infinite linear alternate-reverse;
}

.loading-text::after {
    left: 2px;
    text-shadow: -2px 0 #ff00ff;
    animation: glitch-effect 2s infinite linear alternate-reverse;
}

/* Add scan line effect to the loading status container */
.loading-sequence::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1;
}

/* Enhanced loading status with typewriter effect */
.loading-status {
    text-align: center;
    margin-top: 0.8rem;
    font-family: 'Rajdhani', sans-serif;
    color: #f9f900;
    font-size: 0.9rem;
    min-height: 1.4em;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 
        0 0 8px rgba(249, 249, 0, 0.8),
        0 0 15px rgba(249, 249, 0, 0.4);
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 10px;
    border-radius: 3px;
    border-left: 3px solid #f9f900;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

/* Add typewriter cursor effect */
.loading-status::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    height: 70%;
    width: 3px;
    background-color: #f9f900;
    animation: cursorBlink 0.8s step-end infinite;
}

/* Enhanced percentage style */
.loading-percentage {
    position: absolute;
    right: -65px;
    top: -12px;
    color: #00ffff;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.4);
    padding: 2px 6px;
    border-radius: 4px;
    min-width: 45px;
    text-align: center;
    box-shadow: 
        0 0 10px rgba(0, 255, 255, 0.5),
        inset 0 0 5px rgba(0, 255, 255, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.3);
}

/* Additional animations */
@keyframes textPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(0.98); }
}

@keyframes glitch-effect {
    0% { clip: rect(43px, 9999px, 56px, 0); }
    5% { clip: rect(12px, 9999px, 23px, 0); }
    10% { clip: rect(25px, 9999px, 39px, 0); }
    15% { clip: rect(7px, 9999px, 18px, 0); }
    20% { clip: rect(0, 9999px, 0, 0); } /* No glitch */
    80% { clip: rect(0, 9999px, 0, 0); } /* No glitch */
    85% { clip: rect(19px, 9999px, 31px, 0); }
    90% { clip: rect(36px, 9999px, 45px, 0); }
    95% { clip: rect(14px, 9999px, 29px, 0); }
    100% { clip: rect(24px, 9999px, 37px, 0); }
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes moveLeft {
    0% { left: 100%; opacity: 0; }
    10% { opacity: 1; }
    100% { left: 0; opacity: 0.7; }
}

@keyframes moveRight {
    0% { right: 100%; opacity: 0; }
    10% { opacity: 1; }
    100% { right: 0; opacity: 0.7; }
}

@keyframes progressBar {
    0% { width: 0%; }
    10% { width: 5%; }
    20% { width: 15%; }
    30% { width: 25%; }
    40% { width: 40%; }
    50% { width: 50%; }
    60% { width: 65%; }
    70% { width: 75%; }
    80% { width: 85%; }
    90% { width: 95%; }
    100% { width: 100%; }
}

@keyframes expandBar {
    0% { 
        transform: scaleX(0.05);
        opacity: 0.7;
    }
    20% { 
        transform: scaleX(0.2);
        opacity: 0.8;
    }
    40% { 
        transform: scaleX(0.4);
        opacity: 0.9;
    }
    60% { 
        transform: scaleX(0.7);
        opacity: 1;
    }
    100% { 
        transform: scaleX(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Make sure this is at the end of the file */
/* Ensure this loading sequence is hidden when AI assistant is shown */
.ai-assistant.loaded ~ .loading-sequence {
    display: none;
}

/* Add loading indicator styles */
.loading-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    color: #00ffff;
    font-family: 'Orbitron', sans-serif;
    z-index: 10;
}

/* Add this to the top of your ai-loading.css file */
#virtual-assistant {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

/* Make sure the loading sequence has proper styling */
.loading-sequence {
    opacity: 0;
    transition: opacity 0.5s ease;
    margin: 2rem auto;
    max-width: 600px;
    text-align: center;
}

/* Ensure the fade-in effect works properly */
.fade-in-effect {
    animation: fadeIn 0.6s ease-in-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        filter: brightness(1.5) contrast(1.5) blur(5px);
    }
    to {
        opacity: 1;
        filter: brightness(1) contrast(1) blur(0);
    }
}

/* Add a TV glitch effect for the reveal */
.loaded {
    animation: tvOn 0.3s ease-out forwards, pulse-glow 4s ease-in-out infinite alternate;
}

@keyframes tvOn {
    0% {
        transform: scale(0.95);
        filter: brightness(1.2) contrast(1.2);
    }
    50% {
        transform: scale(1.02);
        filter: brightness(1.3) contrast(1.3);
    }
    100% {
        transform: scale(1);
        filter: brightness(1) contrast(1);
    }
} 