/* =====================================================
   Animations - Glow, Pulse, Scan-line effects
   ===================================================== */

/* Neon Pulse */
@keyframes neonPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.pulse {
    animation: neonPulse 2s ease-in-out infinite;
}

/* Glow Effect */
@keyframes glowCyan {
    0%, 100% { box-shadow: 0 0 5px rgba(0, 245, 255, 0.2); }
    50% { box-shadow: 0 0 20px rgba(0, 245, 255, 0.4), 0 0 40px rgba(0, 245, 255, 0.1); }
}

@keyframes glowRed {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 0, 64, 0.2); }
    50% { box-shadow: 0 0 20px rgba(255, 0, 64, 0.4), 0 0 40px rgba(255, 0, 64, 0.1); }
}

.glow-cyan { animation: glowCyan 3s ease-in-out infinite; }
.glow-red { animation: glowRed 3s ease-in-out infinite; }

/* Status Indicator */
@keyframes statusPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

.status-indicator.online {
    background: var(--accent-green);
}

.status-indicator.online::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--accent-green);
    animation: statusPulse 2s ease-in-out infinite;
}

.status-indicator.offline {
    background: var(--text-muted);
}

.status-indicator.warning {
    background: var(--accent-orange);
    animation: neonPulse 1.5s ease-in-out infinite;
}

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

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

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

.slide-in {
    animation: slideInLeft 0.3s ease forwards;
}

/* Counter Animation */
@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.count-up {
    animation: countUp 0.6s ease forwards;
}

/* Typing Cursor */
@keyframes blink {
    0%, 50% { border-right-color: var(--accent-cyan); }
    51%, 100% { border-right-color: transparent; }
}

.typing-cursor {
    border-right: 2px solid var(--accent-cyan);
    animation: blink 1s step-end infinite;
}

/* Scan Line Animation */
@keyframes scanLine {
    0% { transform: translateY(-100vh); }
    100% { transform: translateY(100vh); }
}

.scan-line-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    animation: scanLine 8s linear infinite;
    opacity: 0.3;
}

/* Border Gradient Animation */
@keyframes borderGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.border-glow {
    position: relative;
}

.border-glow::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple), var(--accent-red), var(--accent-cyan));
    background-size: 300% 300%;
    animation: borderGlow 4s ease infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
}

/* Loading Spinner */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-primary);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

.spinner-lg {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 15, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    z-index: 50;
    border-radius: inherit;
}

.loading-overlay .loading-text {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}
