/* Cyberpunk Visual Animations */

:root {
    --cp-cyan: #00F0FF;
    --cp-white: #FFFFFF;
    --cp-blue-deep: #0D2340;
}

/* Base Styles for SVG */
.cp-visual {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Animation Keyframes */

/* 1. Energy Flow (Dash Offset) */
@keyframes flow-energy {
    to {
        stroke-dashoffset: -100;
    }
}

/* 2. Pulse Core (Heartbeat) */
@keyframes pulse-core {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
        filter: drop-shadow(0 0 10px var(--cp-cyan));
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
        filter: drop-shadow(0 0 20px var(--cp-cyan));
    }
}

/* 3. Rotate Rings */
@keyframes rotate-ring {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes rotate-ring-rev {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0deg);
    }
}

/* 4. Particle Field (Drift) */
@keyframes particle-drift {
    0% {
        transform: translateX(0) translateY(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateX(-100px) translateY(20px);
        opacity: 0;
    }
}

/* 5. Lens Flare Breathe */
@keyframes flare-breathe {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* Class Applications */

.cp-stroke-flow {
    stroke-dasharray: 10 5;
    animation: flow-energy 2s linear infinite;
}

.cp-stroke-static {
    stroke-dasharray: none;
}

.cp-core {
    transform-origin: center;
    animation: pulse-core 4s ease-in-out infinite;
}

.cp-ring-cw {
    transform-origin: center;
    animation: rotate-ring 20s linear infinite;
}

.cp-ring-ccw {
    transform-origin: center;
    animation: rotate-ring-rev 25s linear infinite;
}

.cp-flare {
    transform-origin: center;
    animation: flare-breathe 5s ease-in-out infinite;
}

.cp-particle {
    fill: var(--cp-white);
    opacity: 0;
}

/* Staggered Particles */
.cp-particle:nth-child(1) {
    animation: particle-drift 5s linear infinite;
    animation-delay: 0s;
}

.cp-particle:nth-child(2) {
    animation: particle-drift 7s linear infinite;
    animation-delay: 1s;
}

.cp-particle:nth-child(3) {
    animation: particle-drift 6s linear infinite;
    animation-delay: 2.5s;
}

.cp-particle:nth-child(4) {
    animation: particle-drift 8s linear infinite;
    animation-delay: 0.5s;
}

.cp-particle:nth-child(5) {
    animation: particle-drift 5.5s linear infinite;
    animation-delay: 3s;
}

/* Glitch Effect on Hover */
.problem-visual:hover .cp-core {
    animation-duration: 0.5s;
}