/* Advanced Effects and Animations */

/* Glassmorphism Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Neon Glow Effect */
.neon-glow {
    text-shadow: 0 0 5px currentColor,
                 0 0 10px currentColor,
                 0 0 15px currentColor,
                 0 0 20px currentColor;
    animation: neonPulse 2s ease-in-out infinite alternate;
}

@keyframes neonPulse {
    from {
        text-shadow: 0 0 5px currentColor,
                     0 0 10px currentColor,
                     0 0 15px currentColor,
                     0 0 20px currentColor;
    }
    to {
        text-shadow: 0 0 2px currentColor,
                     0 0 5px currentColor,
                     0 0 8px currentColor,
                     0 0 12px currentColor;
    }
}

/* Floating Animation */
.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* 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.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

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

/* Morphing Shapes */
.morphing-shape {
    width: 100px;
    height: 100px;
    background: var(--gradient-primary);
    border-radius: 50%;
    animation: morphing 4s ease-in-out infinite;
}

@keyframes morphing {
    0%, 100% {
        border-radius: 50%;
        transform: rotate(0deg);
    }
    25% {
        border-radius: 25% 75% 75% 25%;
        transform: rotate(90deg);
    }
    50% {
        border-radius: 75% 25% 25% 75%;
        transform: rotate(180deg);
    }
    75% {
        border-radius: 25% 75% 25% 75%;
        transform: rotate(270deg);
    }
}

/* Parallax Scrolling Effect */
.parallax-container {
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    perspective: 1px;
}

.parallax-element {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateZ(-1px) scale(2);
}

/* 3D Card Flip Effect */
.flip-card {
    background-color: transparent;
    width: 300px;
    height: 200px;
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flip-card-back {
    background: var(--gradient-secondary);
    color: white;
    transform: rotateY(180deg);
}

/* Liquid Animation */
.liquid-shape {
    width: 200px;
    height: 200px;
    background: var(--gradient-primary);
    border-radius: 50%;
    animation: liquidMotion 6s ease-in-out infinite;
}

@keyframes liquidMotion {
    0%, 100% {
        border-radius: 50% 50% 50% 50%;
    }
    25% {
        border-radius: 60% 40% 30% 70%;
    }
    50% {
        border-radius: 30% 60% 70% 40%;
    }
    75% {
        border-radius: 40% 30% 60% 50%;
    }
}

/* Glitch Effect */
.glitch {
    position: relative;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    animation: glitch 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: #ff0000;
    z-index: -1;
}

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

@keyframes glitch {
    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%, 100% { transform: translate(0); }
    20% { transform: translate(-1px, 1px); }
    40% { transform: translate(-1px, -1px); }
    60% { transform: translate(1px, 1px); }
    80% { transform: translate(1px, -1px); }
}

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

/* Holographic Effect */
.holographic {
    background: linear-gradient(45deg, 
        #ff0000, #ff7f00, #ffff00, #00ff00, 
        #0000ff, #4b0082, #9400d3, #ff0000);
    background-size: 400% 400%;
    animation: holographicShift 3s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Matrix Rain Effect */
.matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.1;
}

.matrix-column {
    position: absolute;
    top: -100%;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    animation: matrixFall linear infinite;
}

@keyframes matrixFall {
    to {
        transform: translateY(100vh);
    }
}

/* Cyberpunk Glow */
.cyberpunk-glow {
    position: relative;
    background: linear-gradient(45deg, #ff006e, #8338ec, #3a86ff);
    padding: 2px;
    border-radius: 8px;
}

.cyberpunk-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    background: linear-gradient(45deg, #ff006e, #8338ec, #3a86ff);
    border-radius: inherit;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: cyberpunkRotate 2s linear infinite;
}

@keyframes cyberpunkRotate {
    to {
        transform: rotate(360deg);
    }
}

/* Particle Trail Effect */
.particle-trail {
    position: relative;
}

.particle-trail::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: particleTrail 1s ease-out infinite;
}

@keyframes particleTrail {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0) translate(20px, -20px);
    }
}

/* Breathing Animation */
.breathing {
    animation: breathing 4s ease-in-out infinite;
}

@keyframes breathing {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--primary-color);
    white-space: nowrap;
    margin: 0 auto;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

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

/* Magnetic Hover Effect */
.magnetic {
    transition: transform 0.3s ease;
}

.magnetic:hover {
    transform: translate(var(--mouse-x, 0), var(--mouse-y, 0));
}

/* Tilt Effect */
.tilt {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.tilt:hover {
    transform: perspective(1000px) rotateX(var(--rotate-x, 0)) rotateY(var(--rotate-y, 0));
}

/* Spotlight Effect */
.spotlight {
    position: relative;
    overflow: hidden;
}

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

.spotlight:hover::before {
    left: 100%;
}

/* Elastic Animation */
.elastic {
    animation: elastic 2s ease-in-out infinite;
}

@keyframes elastic {
    0%, 100% { transform: scale(1); }
    30% { transform: scale(1.25, 0.75); }
    40% { transform: scale(0.75, 1.25); }
    50% { transform: scale(1.15, 0.85); }
    65% { transform: scale(0.95, 1.05); }
    75% { transform: scale(1.05, 0.95); }
}

