/* Keyframe Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

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

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

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

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    70% {
        transform: scale(1.5);
        opacity: 0;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

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

@keyframes scroll {
    0% { 
        transform: translateX(-50%) translateY(0); 
        opacity: 1; 
    }
    100% { 
        transform: translateX(-50%) translateY(15px); 
        opacity: 0; 
    }
}

@keyframes shimmer {
    0% { 
        background-position: -200% 0; 
    }
    100% { 
        background-position: 200% 0; 
    }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 1s ease forwards;
    opacity: 0;
}

.animate-slide-up {
    animation: slideUp 1s ease forwards;
    opacity: 0;
}

.animate-slide-down {
    animation: slideDown 1s ease forwards;
    opacity: 0;
}

.animate-slide-left {
    animation: slideLeft 1s ease forwards;
    opacity: 0;
}

.animate-slide-right {
    animation: slideRight 1s ease forwards;
    opacity: 0;
}

.animate-scale-in {
    animation: scaleIn 1s ease forwards;
    opacity: 0;
}

/* Delay Classes */
.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}

.delay-6 {
    animation-delay: 0.6s;
}

/* Scroll Animations */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-animate].animate {
    opacity: 1;
    transform: translateY(0);
}

/* Specific animation types for data attributes */
[data-animate="fadeIn"].animate {
    animation: fadeIn 1s ease forwards;
}

[data-animate="slideUp"].animate {
    animation: slideUp 1s ease forwards;
}

[data-animate="slideDown"].animate {
    animation: slideDown 1s ease forwards;
}

[data-animate="slideLeft"].animate {
    animation: slideLeft 1s ease forwards;
}

[data-animate="slideRight"].animate {
    animation: slideRight 1s ease forwards;
}

[data-animate="scaleIn"].animate {
    animation: scaleIn 1s ease forwards;
}

/* Stagger animations for lists */
.stagger-animate > * {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.stagger-animate.animate > * {
    opacity: 1;
    transform: translateY(0);
}

.stagger-animate.animate > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-animate.animate > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-animate.animate > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-animate.animate > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-animate.animate > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-animate.animate > *:nth-child(6) { transition-delay: 0.6s; }

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

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.hover-scale {
    transition: transform 0.3s ease;
}

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

.hover-rotate {
    transition: transform 0.3s ease;
}

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

/* Loading animations */
.loading-pulse {
    animation: pulse 2s infinite;
}

.loading-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Text animations */
.text-gradient {
    background: linear-gradient(135deg, #fff 0%, #b0b0b0 100%);
    -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;
}

/* Special component animations */
.glasses-animation {
    animation: float 6s ease-in-out infinite;
}

.pulse-dot::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    animation: pulse 2s infinite;
}

/* Button shine effect */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::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 ease;
}

.btn-shine:hover::before {
    left: 100%;
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Fade in up animation for stats */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

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

/* Bounce animation */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0,-15px,0);
    }
    70% {
        transform: translate3d(0,-7px,0);
    }
    90% {
        transform: translate3d(0,-3px,0);
    }
}

.bounce {
    animation: bounce 1s ease infinite;
}

/* Attention seekers */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Slide in from left */
@keyframes slideInLeft {
    from {
        transform: translate3d(-100%, 0, 0);
        visibility: visible;
    }
    to {
        transform: translate3d(0, 0, 0);
    }
}

.slideInLeft {
    animation: slideInLeft 1s ease-out;
}

/* Slide in from right */
@keyframes slideInRight {
    from {
        transform: translate3d(100%, 0, 0);
        visibility: visible;
    }
    to {
        transform: translate3d(0, 0, 0);
    }
}

.slideInRight {
    animation: slideInRight 1s ease-out;
}

/* Zoom in */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale3d(0.3, 0.3, 0.3);
    }
    50% {
        opacity: 1;
    }
}

.zoomIn {
    animation: zoomIn 0.6s ease-out;
}

/* Flip animations */
@keyframes flip {
    from {
        transform: perspective(400px) rotate3d(0, 1, 0, -360deg);
        animation-timing-function: ease-out;
    }
    40% {
        transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg);
        animation-timing-function: ease-out;
    }
    50% {
        transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg);
        animation-timing-function: ease-in;
    }
    80% {
        transform: perspective(400px) scale3d(0.95, 0.95, 0.95);
        animation-timing-function: ease-in;
    }
    to {
        transform: perspective(400px);
        animation-timing-function: ease-in;
    }
}

.flip {
    animation: flip 1s ease-out;
}