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

/* Fade In */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Slide In */
.slide-in-left {
    animation: slideInLeft 0.5s ease forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-up {
    animation: slideInUp 0.5s ease forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-down {
    animation: slideInDown 0.5s ease forwards;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bounce */
.bounce {
    animation: bounce 0.5s ease;
}

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

/* Pulse */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Shake */
.shake {
    animation: shake 0.5s ease;
}

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

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

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

/* Scale */
.scale-in {
    animation: scaleIn 0.3s ease forwards;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.scale-out {
    animation: scaleOut 0.3s ease forwards;
}

@keyframes scaleOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

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

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

/* Wave */
.wave {
    display: flex;
    justify-content: center;
    align-items: center;
}

.wave span {
    width: 5px;
    height: 5px;
    margin: 0 2px;
    background: var(--primary);
    border-radius: 50%;
    animation: wave 1.3s linear infinite;
}

.wave span:nth-child(2) { animation-delay: 0.2s; }
.wave span:nth-child(3) { animation-delay: 0.4s; }
.wave span:nth-child(4) { animation-delay: 0.6s; }
.wave span:nth-child(5) { animation-delay: 0.8s; }

@keyframes wave {
    0%, 60%, 100% { transform: scale(1); }
    30% { transform: scale(1.5); }
}

/* Typing Animation */
.typing {
    display: inline-block;
    position: relative;
}

.typing::after {
    content: '...';
    position: absolute;
    animation: typing 1.5s infinite;
}

@keyframes typing {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
}

/* Gradient Text Animation */
.gradient-text {
    background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient 3s linear infinite;
}

@keyframes gradient {
    to { background-position: 200% center; }
}

/* Neon Glow */
.neon {
    text-shadow: 
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 15px #fff,
        0 0 20px #667eea,
        0 0 35px #667eea,
        0 0 40px #667eea,
        0 0 50px #667eea,
        0 0 75px #667eea;
    animation: neon 1.5s ease-in-out infinite alternate;
}

@keyframes neon {
    from { opacity: 0.8; }
    to { opacity: 1; }
}

/* Page Transitions */
.page-enter {
    opacity: 0;
    transform: translateY(20px);
}

.page-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 300ms, transform 300ms;
}

.page-exit {
    opacity: 1;
    transform: translateY(0);
}

.page-exit-active {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 300ms, transform 300ms;
}

/* Loading Bar */
.loading-bar {
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    animation: loading 2s ease-in-out infinite;
}

@keyframes loading {
    0% { width: 0%; left: 0; }
    50% { width: 100%; left: 0; }
    100% { width: 0%; left: 100%; }
}

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

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.ripple:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(50, 50);
        opacity: 0;
    }
}

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

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.05); }
}

/* Blink */
.blink {
    animation: blink 1s step-start infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Slide Show */
.slide-show {
    position: relative;
    overflow: hidden;
}

.slide-show > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation: slideShow 12s infinite;
    opacity: 0;
}

.slide-show > *:nth-child(1) { animation-delay: 0s; }
.slide-show > *:nth-child(2) { animation-delay: 4s; }
.slide-show > *:nth-child(3) { animation-delay: 8s; }

@keyframes slideShow {
    0%, 33% { opacity: 1; }
    34%, 100% { opacity: 0; }
}

/* Parallax */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Glitch Effect */
.glitch {
    position: relative;
}

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

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #ff00ff;
    animation: glitch-1 2s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #00ffff;
    animation: glitch-2 3s infinite linear alternate-reverse;
}

@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 58% 0); }
    20% { clip-path: inset(87% 0 10% 0); }
    40% { clip-path: inset(25% 0 30% 0); }
    60% { clip-path: inset(75% 0 5% 0); }
    80% { clip-path: inset(15% 0 80% 0); }
    100% { clip-path: inset(80% 0 1% 0); }
}

/* Hover Effects */
.hover-lift {
    transition: transform var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-scale {
    transition: transform var(--transition-normal);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform var(--transition-normal);
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

.hover-glow {
    transition: box-shadow var(--transition-normal);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}