/* ===== AMBIENT ANIMATIONS CSS v3.0 ===== */
/* Abstract Technology Theme: Cyan + Violet */

/* Particles Canvas */
.particles-canvas {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ===== FLOATING ELEMENTS ===== */
.floating-elements {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-icon {
    position: absolute;
    left: var(--x);
    top: var(--y);
    opacity: 0.08;
    filter: blur(0.5px);
    animation: float-around 25s ease-in-out infinite;
    animation-delay: var(--delay);
}

/* SVG floating shapes */
.floating-shape {
    width: 40px;
    height: 40px;
    color: var(--color-primary);
}

.floating-shape svg {
    width: 100%;
    height: 100%;
}

/* Alternate colors for shapes */
.floating-shape:nth-child(odd) {
    color: #06B6D4;
}

.floating-shape:nth-child(even) {
    color: #8B5CF6;
}

@keyframes float-around {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    25% {
        transform: translate(30px, -40px) rotate(90deg) scale(1.1);
    }

    50% {
        transform: translate(-20px, -60px) rotate(180deg) scale(0.9);
    }

    75% {
        transform: translate(-40px, -20px) rotate(270deg) scale(1.05);
    }
}

/* ===== ENERGY PULSE ===== */
.energy-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: inherit;
    pointer-events: none;
    z-index: -1;
}

.energy-pulse::before,
.energy-pulse::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(45deg,
            transparent 20%,
            rgba(6, 182, 212, 0.3) 40%,
            rgba(139, 92, 246, 0.3) 60%,
            transparent 80%);
    background-size: 300% 300%;
    animation: pulse-glow 3s ease-in-out infinite;
    opacity: 0;
}

.energy-pulse::after {
    animation-delay: 1.5s;
}

@keyframes pulse-glow {

    0%,
    100% {
        background-position: 0% 50%;
        opacity: 0;
    }

    50% {
        background-position: 100% 50%;
        opacity: 1;
    }
}

/* ===== ANIMATED BORDERS ===== */
.animated-border {
    position: relative;
    overflow: hidden;
}

.animated-border::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            transparent,
            rgba(6, 182, 212, 0.15),
            rgba(139, 92, 246, 0.15),
            transparent);
    transform: translateX(-100%);
    animation: shimmer 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    20%,
    100% {
        transform: translateX(100%);
    }
}

/* ===== CURSOR TRAIL ===== */
.cursor-trail {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
}

.trail-dot {
    position: absolute;
    width: var(--size);
    height: var(--size);
    background: rgba(6, 182, 212, var(--opacity));
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

/* ===== GLOWING TEXT ===== */
.glow-text {
    text-shadow:
        0 0 10px rgba(6, 182, 212, 0.5),
        0 0 20px rgba(139, 92, 246, 0.3),
        0 0 30px rgba(6, 182, 212, 0.1);
}

/* ===== SCANNING LINE ===== */
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
            transparent,
            rgba(6, 182, 212, 0.8),
            rgba(139, 92, 246, 0.8),
            transparent);
    animation: scan 4s linear infinite;
    pointer-events: none;
}

@keyframes scan {
    0% {
        top: 0;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

/* ===== BREATHING GLOW ===== */
.breathing-glow {
    animation: breathing 4s ease-in-out infinite;
}

@keyframes breathing {

    0%,
    100% {
        box-shadow:
            0 0 20px rgba(6, 182, 212, 0.1),
            inset 0 0 20px rgba(139, 92, 246, 0.05);
    }

    50% {
        box-shadow:
            0 0 40px rgba(6, 182, 212, 0.3),
            inset 0 0 30px rgba(139, 92, 246, 0.1);
    }
}

/* ===== STAT CARDS ENHANCEMENT ===== */
.stat-card {
    position: relative;
}

.stat-card .stat-value {
    animation: value-pulse 2s ease-in-out infinite;
}

@keyframes value-pulse {

    0%,
    100% {
        text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
    }

    50% {
        text-shadow: 0 0 25px rgba(6, 182, 212, 0.8), 0 0 40px rgba(139, 92, 246, 0.4);
    }
}

/* ===== POWER FLOW LINES ===== */
.power-flow {
    position: relative;
    overflow: hidden;
}

.power-flow::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(6, 182, 212, 0.2),
            rgba(139, 92, 246, 0.3),
            rgba(6, 182, 212, 0.2),
            transparent);
    animation: power-flow 3s linear infinite;
}

@keyframes power-flow {
    0% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
    background: linear-gradient(135deg, #06B6D4 0%, #8B5CF6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== NEON BORDER GLOW ===== */
.neon-glow {
    box-shadow:
        0 0 5px rgba(6, 182, 212, 0.3),
        0 0 20px rgba(6, 182, 212, 0.2),
        0 0 40px rgba(139, 92, 246, 0.1);
}

/* ===== ELECTRICITY EFFECT ===== */
.electricity {
    position: relative;
}

.electricity::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(6, 182, 212, 0.3) 0%, transparent 30%),
        radial-gradient(circle at 80% 30%, rgba(139, 92, 246, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 60% 80%, rgba(6, 182, 212, 0.25) 0%, transparent 35%);
    animation: electricity-flicker 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes electricity-flicker {

    0%,
    100% {
        opacity: 0.3;
    }

    10% {
        opacity: 0.8;
    }

    20% {
        opacity: 0.2;
    }

    30% {
        opacity: 1;
    }

    40% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.9;
    }

    60% {
        opacity: 0.3;
    }

    70% {
        opacity: 0.7;
    }

    80% {
        opacity: 0.5;
    }

    90% {
        opacity: 0.8;
    }
}

/* ===== PERFORMANCE ===== */
@media (prefers-reduced-motion: reduce) {

    .floating-icon,
    .energy-pulse::before,
    .energy-pulse::after,
    .animated-border::before,
    .stat-value,
    .scan-line,
    .breathing-glow,
    .power-flow::after,
    .electricity::before {
        animation: none;
    }
}