/* ========================================
   ANIMATIONS.CSS - Keyframes and Transitions
   ======================================== */

/* ========== KEYFRAME ANIMATIONS ========== */

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

/* Status dot pulse */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(0, 255, 65, 0.4);
    }
    50% {
        opacity: 0.6;
        box-shadow: 0 0 0 4px rgba(0, 255, 65, 0);
    }
}

/* Scroll arrow bounce */
@keyframes scrollBounce {
    0%, 100% {
        top: 6px;
        opacity: 1;
    }
    50% {
        top: 14px;
        opacity: 0.5;
    }
}

/* Fade in up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading progress */
@keyframes loadingProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Fade in */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Scale in */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide in from right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide in from left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Glow pulse for terminal theme */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 5px var(--color-primary-glow);
    }
    50% {
        box-shadow: 0 0 15px var(--color-primary-glow);
    }
}

/* Network activity blink */
@keyframes networkBlink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(0.7);
    }
}

/* Ticker scroll animation */
@keyframes tickerScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Subtle data flow for header */
@keyframes dataFlow {
    0% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.3;
    }
}

/* CPU/Memory meter animation */
@keyframes meterPulse {
    0%, 100% {
        width: var(--meter-base);
    }
    25% {
        width: calc(var(--meter-base) + 5%);
    }
    50% {
        width: calc(var(--meter-base) - 3%);
    }
    75% {
        width: calc(var(--meter-base) + 2%);
    }
}

/* Typing cursor */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

/* Float animation for subtle movement */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Shimmer effect for loading states */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* ========== TRANSITION UTILITIES ========== */

.transition-none {
    transition: none !important;
}

.transition-fast {
    transition: all var(--transition-fast);
}

.transition-normal {
    transition: all var(--transition-normal);
}

.transition-slow {
    transition: all var(--transition-slow);
}

.transition-smooth {
    transition: all 0.7s var(--transition-smooth);
}

/* ========== HOVER EFFECTS ========== */

/* Lift on hover */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* Scale on hover */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Glow on hover */
.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: var(--shadow-glow);
}

/* ========== ANIMATION UTILITIES ========== */

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.animate-scale-in {
    animation: scaleIn 0.5s ease forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.5s ease forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.5s ease forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Animation delays */
.animation-delay-100 {
    animation-delay: 100ms;
}

.animation-delay-200 {
    animation-delay: 200ms;
}

.animation-delay-300 {
    animation-delay: 300ms;
}

.animation-delay-400 {
    animation-delay: 400ms;
}

.animation-delay-500 {
    animation-delay: 500ms;
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .command-section {
        opacity: 1;
        transform: none;
    }

    .scroll-arrow::before {
        animation: none;
    }

    .status-dot {
        animation: none;
    }

    .cursor {
        animation: none;
        opacity: 1;
    }
}
