/* ===================================
    VOLT - WOW Effects Extension
====================================== */

/* Mouse cursor trail effect */
.cursor-trail {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(162, 111, 253, 0.8) 0%, rgba(162, 111, 253, 0.2) 60%, transparent 100%);
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease-out;
    transform: scale(0);
}

.cursor-trail.active {
    animation: cursorPulse 0.6s ease-out forwards;
}

@keyframes cursorPulse {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Text reveal on scroll */
.text-reveal-container {
    overflow: hidden;
}

.text-reveal {
    display: inline-block;
    transform: translateY(100%);
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.text-reveal.revealed {
    transform: translateY(0);
}

/* Stagger animation for multiple elements */
.stagger-animation {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.stagger-animation.revealed {
    opacity: 1;
    transform: translateY(0);
}

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

/* Morphing blob background */
.morphing-blob {
    position: absolute;
    width: 400px;
    height: 400px;
    background: linear-gradient(45deg, rgba(162, 111, 253, 0.1), rgba(254, 119, 98, 0.1));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: blob-morph 20s ease-in-out infinite;
    filter: blur(20px);
}

@keyframes blob-morph {
    0%, 100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        transform: rotate(0deg) scale(1);
    }
    25% {
        border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
        transform: rotate(90deg) scale(1.1);
    }
    50% {
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
        transform: rotate(180deg) scale(0.9);
    }
    75% {
        border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
        transform: rotate(270deg) scale(1.05);
    }
}

/* Interactive card tilt */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.2s ease-out;
}

.tilt-card:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg) translateZ(10px);
}

/* Liquid button effect */
.liquid-btn {
    position: relative;
    overflow: hidden;
    border: none;
    outline: none;
}

.liquid-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.liquid-btn:hover::before {
    left: 100%;
}

/* Glitch effect */
.glitch {
    position: relative;
    color: white;
    animation: glitch-main 2s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: #A26FFD;
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: #FE7762;
    z-index: -2;
}

@keyframes glitch-main {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

@keyframes glitch-1 {
    0% { clip-path: inset(40% 0 61% 0); }
    20% { clip-path: inset(92% 0 1% 0); }
    40% { clip-path: inset(43% 0 1% 0); }
    60% { clip-path: inset(25% 0 58% 0); }
    80% { clip-path: inset(54% 0 7% 0); }
    100% { clip-path: inset(58% 0 43% 0); }
}

@keyframes glitch-2 {
    0% { clip-path: inset(25% 0 33% 0); }
    20% { clip-path: inset(6% 0 9% 0); }
    40% { clip-path: inset(62% 0 37% 0); }
    60% { clip-path: inset(72% 0 5% 0); }
    80% { clip-path: inset(17% 0 56% 0); }
    100% { clip-path: inset(26% 0 35% 0); }
}

/* Neon glow text */
.neon-text {
    color: #A26FFD;
    text-shadow:
        0 0 5px currentColor,
        0 0 10px currentColor,
        0 0 20px currentColor,
        0 0 40px currentColor;
    animation: neon-flicker 2s infinite alternate;
}

@keyframes neon-flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        text-shadow:
            0 0 5px currentColor,
            0 0 10px currentColor,
            0 0 20px currentColor,
            0 0 40px currentColor;
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

/* Floating particles system */
.particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: rgba(162, 111, 253, 0.6);
    border-radius: 50%;
    pointer-events: none;
    animation: float-up 6s linear infinite;
}

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

/* Ripple effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Performance optimizations for mobile */
@media (max-width: 768px) {
    .morphing-blob,
    .particle-container,
    .glitch::before,
    .glitch::after {
        display: none;
    }

    .tilt-card:hover {
        transform: none;
    }

    .neon-text {
        animation: none;
        text-shadow: 0 0 10px currentColor;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .morphing-blob,
    .glitch,
    .neon-text,
    .particle {
        animation: none !important;
    }

    .tilt-card:hover {
        transform: none !important;
    }
}