/* =============================================
   HUNTY ZOMBIE - Animations Stylesheet
   Cyberpunk & Gaming Themed Animations
   ============================================= */

/* =============================================
   1. Keyframe Definitions
   ============================================= */

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Glow Pulse */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 255, 136, 0.8),
                    0 0 60px rgba(0, 255, 136, 0.4);
    }
}

/* Neon Flicker */
@keyframes neonFlicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow: 
            0 0 10px rgba(0, 255, 136, 0.8),
            0 0 20px rgba(0, 255, 136, 0.6),
            0 0 30px rgba(0, 255, 136, 0.4),
            0 0 40px rgba(0, 255, 136, 0.2);
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Slide In From Right */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Slide In From Left */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Slide In From Top */
@keyframes slideInTop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Slide In From Bottom */
@keyframes slideInBottom {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Zoom In */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Rotate */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Shake */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-2px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(2px);
    }
}

/* Bounce */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

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

/* Cursor Blink */
@keyframes cursorBlink {
    0%, 49% {
        border-color: var(--accent-green);
    }
    50%, 100% {
        border-color: transparent;
    }
}

/* Scanner Line */
@keyframes scannerLine {
    0% {
        top: 0;
    }
    100% {
        top: 100%;
    }
}

/* RGB Split */
@keyframes rgbSplit {
    0%, 100% {
        text-shadow: 
            -2px 0 var(--accent-red),
            2px 0 var(--accent-blue);
    }
    25% {
        text-shadow: 
            2px 0 var(--accent-red),
            -2px 0 var(--accent-blue);
    }
    50% {
        text-shadow: 
            -2px 2px var(--accent-red),
            2px -2px var(--accent-blue);
    }
    75% {
        text-shadow: 
            2px -2px var(--accent-red),
            -2px 2px var(--accent-blue);
    }
}

/* Matrix Rain */
@keyframes matrixRain {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Radar Sweep */
@keyframes radarSweep {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Energy Charge */
@keyframes energyCharge {
    0% {
        width: 0;
        background: var(--accent-red);
    }
    50% {
        width: 50%;
        background: var(--accent-gold);
    }
    100% {
        width: 100%;
        background: var(--accent-green);
    }
}

/* Heartbeat */
@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.1);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.1);
    }
    56% {
        transform: scale(1);
    }
}

/* Data Stream */
@keyframes dataStream {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 0 100vh;
    }
}

/* Electricity */
@keyframes electricity {
    0%, 100% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    10% {
        clip-path: polygon(0 0, 95% 0, 100% 100%, 5% 100%);
    }
    20% {
        clip-path: polygon(5% 0, 100% 0, 95% 100%, 0 100%);
    }
    30% {
        clip-path: polygon(0 0, 90% 0, 100% 100%, 10% 100%);
    }
    40% {
        clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
    }
    50% {
        clip-path: polygon(0 0, 85% 0, 100% 100%, 15% 100%);
    }
    60% {
        clip-path: polygon(15% 0, 100% 0, 85% 100%, 0 100%);
    }
    70% {
        clip-path: polygon(0 0, 80% 0, 100% 100%, 20% 100%);
    }
    80% {
        clip-path: polygon(20% 0, 100% 0, 80% 100%, 0 100%);
    }
    90% {
        clip-path: polygon(0 0, 75% 0, 100% 100%, 25% 100%);
    }
}

/* =============================================
   2. Animation Classes
   ============================================= */

/* Pulse Effects */
.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-glow-pulse {
    animation: glowPulse 2s ease-in-out infinite;
}

/* Neon Effects */
.animate-neon-flicker {
    animation: neonFlicker 3s ease-in-out infinite;
}

/* Float Effects */
.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Slide Animations */
.animate-slide-right {
    animation: slideInRight 0.5s ease-out;
}

.animate-slide-left {
    animation: slideInLeft 0.5s ease-out;
}

.animate-slide-top {
    animation: slideInTop 0.5s ease-out;
}

.animate-slide-bottom {
    animation: slideInBottom 0.5s ease-out;
}

/* Fade Animations */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

/* Zoom Animation */
.animate-zoom-in {
    animation: zoomIn 0.5s ease-out;
}

/* Rotate Animation */
.animate-rotate {
    animation: rotate 2s linear infinite;
}

/* Shake Animation */
.animate-shake {
    animation: shake 0.5s ease-in-out;
}

/* Bounce Animation */
.animate-bounce {
    animation: bounce 1s ease-in-out;
}

/* RGB Split Effect */
.animate-rgb-split {
    animation: rgbSplit 2s ease-in-out infinite;
}

/* Heartbeat Animation */
.animate-heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* =============================================
   3. Typing Animation
   ============================================= */
.typing-text {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--accent-green);
    animation: 
        typing 3s steps(40, end),
        cursorBlink 0.75s step-end infinite;
}

/* =============================================
   4. Loading Animations
   ============================================= */

/* DNA Helix Loader */
.loader-dna {
    width: 60px;
    height: 60px;
    position: relative;
}

.loader-dna::before,
.loader-dna::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    animation: dnaRotate 2s linear infinite;
}

.loader-dna::after {
    background: var(--accent-blue);
    animation-delay: 0.5s;
}

@keyframes dnaRotate {
    0% {
        top: 0;
        left: 0;
    }
    25% {
        top: 0;
        left: calc(100% - 8px);
    }
    50% {
        top: calc(100% - 8px);
        left: calc(100% - 8px);
    }
    75% {
        top: calc(100% - 8px);
        left: 0;
    }
    100% {
        top: 0;
        left: 0;
    }
}

/* Ammo Loading Animation */
.loader-ammo {
    width: 100px;
    height: 20px;
    background: var(--secondary-dark);
    border: 2px solid var(--accent-green);
    border-radius: var(--radius-full);
    position: relative;
    overflow: hidden;
}

.loader-ammo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    animation: energyCharge 2s ease-in-out infinite;
}

/* Radar Scanner */
.loader-radar {
    width: 80px;
    height: 80px;
    border: 2px solid var(--accent-green);
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

.loader-radar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-green));
    transform-origin: left center;
    animation: radarSweep 2s linear infinite;
}

/* =============================================
   5. Hover Animations
   ============================================= */

/* Card Hover */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Button Hover */
.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 
        0 0 20px currentColor,
        inset 0 0 20px rgba(255, 255, 255, 0.1);
}

/* Link Hover */
.hover-slide {
    position: relative;
    overflow: hidden;
}

.hover-slide::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-green);
    transition: width 0.3s ease;
}

.hover-slide:hover::before {
    width: 100%;
}

/* =============================================
   6. Scroll Animations
   ============================================= */

/* Parallax Effect */
.parallax {
    transform: translateZ(0);
    will-change: transform;
}

.parallax-slow {
    transition: transform 0.8s cubic-bezier(0.39, 0.575, 0.565, 1);
}

.parallax-medium {
    transition: transform 0.6s cubic-bezier(0.39, 0.575, 0.565, 1);
}

.parallax-fast {
    transition: transform 0.4s cubic-bezier(0.39, 0.575, 0.565, 1);
}

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

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
   7. Interactive Animations
   ============================================= */

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

.ripple::before {
    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, height 0.6s;
}

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

/* Magnetic Button Effect */
.magnetic {
    transition: transform 0.2s ease;
}

/* =============================================
   8. Background Animations
   ============================================= */

/* Animated Gradient */
.animated-gradient {
    background: linear-gradient(-45deg, 
        var(--accent-red), 
        var(--accent-purple), 
        var(--accent-blue), 
        var(--accent-green)
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

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

/* Matrix Background */
.matrix-bg {
    position: relative;
    overflow: hidden;
}

.matrix-bg::before {
    content: '010110101001010110101010010101';
    position: absolute;
    top: 0;
    left: 0;
    color: var(--accent-green);
    font-family: var(--font-mono);
    font-size: 20px;
    animation: matrixRain 10s linear infinite;
    opacity: 0.1;
}

/* =============================================
   9. Special Effects
   ============================================= */

/* Glitch Text Effect */
.glitch-text {
    position: relative;
    display: inline-block;
}

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

.glitch-text::before {
    animation: glitch-1 0.3s infinite;
    color: var(--accent-red);
    z-index: -1;
}

.glitch-text::after {
    animation: glitch-2 0.3s infinite;
    color: var(--accent-blue);
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 100% {
        clip-path: inset(0 0 0 0);
    }
    20% {
        clip-path: inset(20% 0 30% 0);
        transform: translate(-2px, 2px);
    }
    40% {
        clip-path: inset(50% 0 20% 0);
        transform: translate(2px, -2px);
    }
    60% {
        clip-path: inset(10% 0 60% 0);
        transform: translate(-1px, 1px);
    }
    80% {
        clip-path: inset(80% 0 5% 0);
        transform: translate(1px, -1px);
    }
}

@keyframes glitch-2 {
    0%, 100% {
        clip-path: inset(0 0 0 0);
    }
    20% {
        clip-path: inset(60% 0 20% 0);
        transform: translate(2px, -1px);
    }
    40% {
        clip-path: inset(20% 0 60% 0);
        transform: translate(-2px, 1px);
    }
    60% {
        clip-path: inset(40% 0 40% 0);
        transform: translate(1px, 2px);
    }
    80% {
        clip-path: inset(10% 0 70% 0);
        transform: translate(-1px, -2px);
    }
}

/* Electric Border */
.electric-border {
    position: relative;
    overflow: hidden;
}

.electric-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        var(--accent-blue), 
        var(--accent-green), 
        var(--accent-purple)
    );
    border-radius: inherit;
    animation: electricity 2s linear infinite;
    z-index: -1;
}

/* =============================================
   10. Performance Optimizations
   ============================================= */

/* GPU Acceleration */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}