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

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Float Animation for Hero Cards */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(2deg);
    }
    50% {
        transform: translateY(-10px) rotate(-2deg);
    }
    75% {
        transform: translateY(-15px) rotate(1deg);
    }
}

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

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

/* Scale In Animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* Gradient Shift Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Shimmer Animation */
@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

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

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

/* ========================================
   ANIMATION CLASSES
   ======================================== */

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

.fade-in-delay-1 {
    animation: fadeIn 0.6s ease-out 0.1s forwards;
    opacity: 0;
}

.fade-in-delay-2 {
    animation: fadeIn 0.6s ease-out 0.2s forwards;
    opacity: 0;
}

.fade-in-delay-3 {
    animation: fadeIn 0.6s ease-out 0.3s forwards;
    opacity: 0;
}

/* Slide Variations */
.slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

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

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

/* Infinite Animations */
.pulse-infinite {
    animation: pulse 2s ease-in-out infinite;
}

.rotate-infinite {
    animation: rotate 20s linear infinite;
}

/* ========================================
   SCROLL REVEAL ANIMATIONS
   ======================================== */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* ========================================
   HOVER EFFECTS
   ======================================== */

/* Glow Effect */
.glow-on-hover {
    position: relative;
    overflow: hidden;
}

.glow-on-hover::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;
}

.glow-on-hover:hover::before {
    left: 100%;
}

/* Lift Effect */
.lift-on-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Border Gradient Animation */
.border-gradient-animate {
    background: linear-gradient(90deg, #7C3AED, #A78BFA, #EC4899, #7C3AED);
    background-size: 200% auto;
    animation: gradientShift 3s linear infinite;
}

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

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(124, 58, 237, 0.1);
    border-top-color: #7C3AED;
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

/* Dots Loading */
.loading-dots {
    display: flex;
    gap: 8px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: #7C3AED;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

/* ========================================
   COUNTER ANIMATION
   ======================================== */
.counter-animate {
    transition: all 0.3s ease;
}

/* ========================================
   GRADIENT BACKGROUNDS
   ======================================== */
.animated-gradient {
    background: linear-gradient(270deg, #7C3AED, #A78BFA, #EC4899);
    background-size: 600% 600%;
    animation: gradientShift 10s ease infinite;
}

/* ========================================
   MICRO INTERACTIONS
   ======================================== */

/* Button Press Effect */
.btn-press {
    transition: transform 0.1s ease;
}

.btn-press:active {
    transform: scale(0.95);
}

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

.ripple::after {
    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::after {
    width: 300px;
    height: 300px;
}

/* ========================================
   SMOOTH TRANSITIONS
   ======================================== */
.smooth-all {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.smooth-transform {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.smooth-colors {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* ========================================
   GLASSMORPHISM EFFECTS
   ======================================== */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================
   PARALLAX EFFECTS
   ======================================== */
.parallax {
    transition: transform 0.1s ease-out;
}

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

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

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

.typing-effect {
    overflow: hidden;
    border-right: 2px solid #7C3AED;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}

/* Gradient Text Animation */
.animated-gradient-text {
    background: linear-gradient(90deg, #7C3AED, #A78BFA, #EC4899, #7C3AED);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s linear infinite;
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */

/* GPU Acceleration */
.gpu-accelerate {
    transform: translateZ(0);
    will-change: transform;
}

/* 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;
    }
}
