/* ===== ENHANCED ANIMATIONS ===== */

/* Ripple effect for buttons */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Enhanced hover states for buttons */
.btn {
    position: relative;
    overflow: hidden;
}

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

.btn:hover::after {
    width: 300px;
    height: 300px;
}

/* Glitch effect on title */
@keyframes glitch {
    0% {
        text-shadow: 0.05em 0 0 rgba(212, 225, 87, 0.75),
                    -0.05em -0.025em 0 rgba(91, 124, 255, 0.75),
                    -0.025em 0.05em 0 rgba(232, 67, 147, 0.75);
    }
    14% {
        text-shadow: 0.05em 0 0 rgba(212, 225, 87, 0.75),
                    -0.05em -0.025em 0 rgba(91, 124, 255, 0.75),
                    -0.025em 0.05em 0 rgba(232, 67, 147, 0.75);
    }
    15% {
        text-shadow: -0.05em -0.025em 0 rgba(212, 225, 87, 0.75),
                    0.025em 0.025em 0 rgba(91, 124, 255, 0.75),
                    -0.05em -0.05em 0 rgba(232, 67, 147, 0.75);
    }
    49% {
        text-shadow: -0.05em -0.025em 0 rgba(212, 225, 87, 0.75),
                    0.025em 0.025em 0 rgba(91, 124, 255, 0.75),
                    -0.05em -0.05em 0 rgba(232, 67, 147, 0.75);
    }
    50% {
        text-shadow: 0.025em 0.05em 0 rgba(212, 225, 87, 0.75),
                    0.05em 0 0 rgba(91, 124, 255, 0.75),
                    0 -0.05em 0 rgba(232, 67, 147, 0.75);
    }
    99% {
        text-shadow: 0.025em 0.05em 0 rgba(212, 225, 87, 0.75),
                    0.05em 0 0 rgba(91, 124, 255, 0.75),
                    0 -0.05em 0 rgba(232, 67, 147, 0.75);
    }
    100% {
        text-shadow: -0.025em 0 0 rgba(212, 225, 87, 0.75),
                    -0.025em -0.025em 0 rgba(91, 124, 255, 0.75),
                    -0.025em -0.05em 0 rgba(232, 67, 147, 0.75);
    }
}

.hero-title:hover .title-line {
    animation: glitch 0.5s infinite;
}

/* Neon glow effect */
@keyframes neon-glow {
    0%, 100% {
        text-shadow: 0 0 10px var(--primary-accent),
                     0 0 20px var(--primary-accent),
                     0 0 30px var(--primary-accent),
                     0 0 40px var(--primary-accent);
    }
    50% {
        text-shadow: 0 0 5px var(--primary-accent),
                     0 0 10px var(--primary-accent),
                     0 0 15px var(--primary-accent),
                     0 0 20px var(--primary-accent);
    }
}

/* Data stream effect */
.data-stream {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.1;
}

.data-stream span {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--primary-accent);
    animation: stream-fall linear infinite;
}

@keyframes stream-fall {
    0% {
        top: -10%;
        opacity: 1;
    }
    100% {
        top: 110%;
        opacity: 0;
    }
}

/* Hexagon grid background */
.hex-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(30deg, rgba(212, 225, 87, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(212, 225, 87, 0.05) 87.5%, rgba(212, 225, 87, 0.05)),
        linear-gradient(150deg, rgba(212, 225, 87, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(212, 225, 87, 0.05) 87.5%, rgba(212, 225, 87, 0.05)),
        linear-gradient(30deg, rgba(212, 225, 87, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(212, 225, 87, 0.05) 87.5%, rgba(212, 225, 87, 0.05)),
        linear-gradient(150deg, rgba(212, 225, 87, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(212, 225, 87, 0.05) 87.5%, rgba(212, 225, 87, 0.05));
    background-size: 80px 140px;
    background-position: 0 0, 0 0, 40px 70px, 40px 70px;
    opacity: 0.3;
    animation: hex-drift 60s linear infinite;
}

@keyframes hex-drift {
    0% {
        background-position: 0 0, 0 0, 40px 70px, 40px 70px;
    }
    100% {
        background-position: 80px 140px, 80px 140px, 120px 210px, 120px 210px;
    }
}

/* Scanline effect */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(212, 225, 87, 0.05) 50%,
        transparent 100%
    );
    background-size: 100% 4px;
    animation: scanline 8s linear infinite;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.1;
}

@keyframes scanline {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 0 100%;
    }
}

/* Particle explosion on click */
@keyframes particle-explode {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

.particle-explosion {
    position: fixed;
    width: 5px;
    height: 5px;
    background: var(--primary-accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    animation: particle-explode 1s ease-out forwards;
}

/* Holographic effect */
.holographic {
    position: relative;
    background: linear-gradient(
        45deg,
        rgba(212, 225, 87, 0.1) 0%,
        rgba(91, 124, 255, 0.1) 25%,
        rgba(232, 67, 147, 0.1) 50%,
        rgba(38, 194, 129, 0.1) 75%,
        rgba(212, 225, 87, 0.1) 100%
    );
    background-size: 400% 400%;
    animation: holographic-shift 10s ease infinite;
}

@keyframes holographic-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Cyber grid lines */
.cyber-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(212, 225, 87, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 225, 87, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: grid-move 20s linear infinite;
    pointer-events: none;
}

@keyframes grid-move {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

/* Energy pulse effect */
@keyframes energy-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(212, 225, 87, 0.3),
                    0 0 40px rgba(212, 225, 87, 0.2),
                    inset 0 0 20px rgba(212, 225, 87, 0.1);
    }
    50% {
        box-shadow: 0 0 40px rgba(212, 225, 87, 0.6),
                    0 0 80px rgba(212, 225, 87, 0.4),
                    inset 0 0 40px rgba(212, 225, 87, 0.2);
    }
}

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

/* Text reveal animation */
@keyframes text-reveal {
    0% {
        clip-path: inset(0 100% 0 0);
    }
    100% {
        clip-path: inset(0 0 0 0);
    }
}

.text-reveal {
    animation: text-reveal 1s ease-out forwards;
}

/* Floating particles in background */
@keyframes float-particle {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translate(100px, -100px) rotate(90deg);
        opacity: 0.6;
    }
    50% {
        transform: translate(200px, 0) rotate(180deg);
        opacity: 0.3;
    }
    75% {
        transform: translate(100px, 100px) rotate(270deg);
        opacity: 0.6;
    }
}

/* Magnetic hover effect */
.magnetic {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.magnetic:hover {
    transform: scale(1.1);
}

/* Glowing border animation */
@keyframes border-glow {
    0%, 100% {
        border-color: rgba(212, 225, 87, 0.3);
        box-shadow: 0 0 10px rgba(212, 225, 87, 0.2);
    }
    50% {
        border-color: rgba(212, 225, 87, 0.8);
        box-shadow: 0 0 30px rgba(212, 225, 87, 0.5);
    }
}

.border-glow {
    animation: border-glow 2s ease-in-out infinite;
}

/* Typewriter effect */
@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--primary-accent);
    }
}

.typewriter {
    overflow: hidden;
    border-right: 3px solid var(--primary-accent);
    white-space: nowrap;
    animation: 
        typewriter 3s steps(40, end),
        blink-caret 0.75s step-end infinite;
}
