/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px var(--primary-color); }
    50% { box-shadow: 0 0 20px var(--primary-color); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes loading-dots {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

@keyframes cardReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes successPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes rotate3D {
    from { transform: rotate3d(1, 1, 1, 0deg); }
    to { transform: rotate3d(1, 1, 1, 360deg); }
}

/* Animation Classes */
.fade-in { animation: fadeIn 0.6s ease-out; }
.slide-in { animation: slideIn 0.5s ease-out; }
.bounce { animation: bounce 2s infinite; }
.pulse { animation: pulse 2s infinite; }
.glow { animation: glow 2s infinite; }
.slide-up { animation: slideUp 0.5s ease-out; }
.zoom-in { animation: zoomIn 0.5s ease-out; }
.rotate-3d { animation: rotate3D 4s linear infinite; }

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.hover-glow:hover { box-shadow: 0 0 20px var(--primary-color); }
.hover-scale { transition: transform 0.3s ease; }
.hover-scale:hover { transform: scale(1.05); }
.hover-rotate:hover { transform: rotate(5deg); }
.hover-skew:hover { transform: skewX(-5deg); }

/* Loading Animation */
.loading-dots {
    display: inline-flex;
    gap: 5px;
}
.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    animation: loading-dots 1.4s ease-in-out infinite both;
}
.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

/* Text Animation */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--primary-color);
    white-space: nowrap;
    animation: typewriter 3s steps(40, end), blink 0.8s infinite;
}

/* Button Animations */
.btn-animate {
    position: relative;
    overflow: hidden;
}
.btn-animate: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;
}
.btn-animate:hover:before { left: 100%; }

.btn-ripple {
    position: relative;
    overflow: hidden;
}
.btn-ripple:after {
    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;
}
.btn-ripple:hover:after {
    width: 300px;
    height: 300px;
}

/* Card Animations */
.card-reveal {
    opacity: 0;
    transform: translateY(30px);
    animation: cardReveal 0.6s ease-out forwards;
}
.card-float { animation: float 6s ease-in-out infinite; }
.card-stagger:nth-child(1) { animation-delay: 0.1s; }
.card-stagger:nth-child(2) { animation-delay: 0.2s; }
.card-stagger:nth-child(3) { animation-delay: 0.3s; }
.card-stagger:nth-child(4) { animation-delay: 0.4s; }

/* Success Animation */
.success-check {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    animation: successPop 0.6s ease-out;
}
.success-check i { color: white; font-size: 1.5rem; }

/* Progress Bar Animation */
.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-color);
    border-radius: 2px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 2px;
    animation: progressFill 2s ease-in-out infinite;
}
@keyframes progressFill {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Floating Action Button */
.fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}
.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

/* Text Effects */
.text-3d {
    text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 10px 10px rgba(0,0,0,.2), 0 20px 20px rgba(0,0,0,.15);
}

.text-neon {
    color: #fff;
    text-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color), 0 0 15px var(--primary-color), 0 0 20px var(--primary-color), 0 0 35px var(--primary-color), 0 0 40px var(--primary-color);
    animation: glow 1.5s ease-in-out infinite alternate;
}

.text-morph {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Page Transitions */
.page-enter { opacity: 0; transform: translateY(30px); }
.page-enter-active { opacity: 1; transform: translateY(0); transition: opacity 0.5s, transform 0.5s; }
.page-exit { opacity: 1; transform: translateY(0); }
.page-exit-active { opacity: 0; transform: translateY(-30px); transition: opacity 0.5s, transform 0.5s; }

/* Scroll Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}
.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Particle Effects */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: particleFloat 4s ease-in-out infinite;
}
@keyframes particleFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10%, 90% { opacity: 1; }
    50% { transform: translateY(-100px) rotate(180deg); }
}

/* Background Pattern Animations */
.bg-pattern-dots {
    background-image: radial-gradient(var(--primary-color) 2px, transparent 2px);
    background-size: 20px 20px;
    animation: patternMove 20s linear infinite;
}
.bg-pattern-lines {
    background-image: repeating-linear-gradient(45deg, transparent, transparent 5px, var(--primary-color) 5px, var(--primary-color) 10px);
    animation: patternMove 30s linear infinite;
}
@keyframes patternMove {
    0% { background-position: 0 0; }
    100% { background-position: 100px 100px; }
}

/* Advanced Hover Effects */
.hover-tilt {
    transition: transform 0.3s ease;
    transform-style: preserve-3d;
}
.hover-tilt:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

.hover-morph {
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.hover-morph:hover {
    border-radius: 50% 20% / 10% 40%;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}
.loading-logo {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}
.loading-bar {
    width: 200px;
    height: 4px;
    background: var(--bg-color);
    border-radius: 2px;
    overflow: hidden;
}
.loading-progress {
    height: 100%;
    background: var(--primary-color);
    border-radius: 2px;
    animation: loadingProgress 2s ease-in-out;
}
@keyframes loadingProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}