/* ============================================
   AI Explorer — Diagram-specific styles
   ============================================ */

/* Mermaid overrides */
.mermaid {
    background: transparent !important;
}

.mermaid svg {
    max-width: 100%;
}

/* Particle animations for hero */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-10vh) rotate(720deg); opacity: 0; }
}

/* Glow effects */
.glow-blue { box-shadow: 0 0 20px rgba(255, 77, 77, 0.3); }
.glow-purple { box-shadow: 0 0 20px rgba(255, 107, 138, 0.3); }
.glow-green { box-shadow: 0 0 20px rgba(0, 230, 118, 0.3); }
.glow-cyan { box-shadow: 0 0 20px rgba(0, 212, 255, 0.3); }

/* Animated border */
@keyframes borderGlow {
    0%, 100% { border-color: rgba(255, 77, 77, 0.3); }
    50% { border-color: rgba(255, 107, 138, 0.5); }
}

.animated-border {
    animation: borderGlow 3s ease-in-out infinite;
}

/* Scroll animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Pulse animation for active items */
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(255, 77, 77, 0); }
}

.pulse {
    animation: pulse 2s infinite;
}

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

@keyframes blink {
    0%, 100% { border-right-color: transparent; }
    50% { border-right-color: var(--accent-blue); }
}

.typing-effect {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--accent-blue);
    animation: typing 2s steps(40) 1s forwards, blink 0.8s infinite;
    width: 0;
}

/* Network visualization specific */
.network-node {
    fill: #ff4d4d;
    stroke: #ff8a65;
    stroke-width: 2;
}

.network-edge {
    stroke: rgba(255, 77, 77, 0.3);
    stroke-width: 1;
}

/* Progress bar animation */
@keyframes progressFill {
    from { width: 0%; }
}

.animated-progress .spectrum-fill {
    animation: progressFill 1s ease forwards;
}

/* Floating labels in embedding space */
.embed-cluster {
    position: absolute;
    inset: 0;
}

/* Stagger animations for lists */
.stagger-in > * {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.4s ease forwards;
}

.stagger-in > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-in > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-in > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-in > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-in > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-in > *:nth-child(6) { animation-delay: 0.6s; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(255, 77, 77, 0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 77, 77, 0.5); }

/* Selection */
::selection {
    background: rgba(255, 77, 77, 0.3);
    color: var(--text-primary);
}
