/* ===== MODERN EYE-SOOTHING ANIMATIONS ===== */

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

/* Floating Animation */
@keyframes float {
    0%, 100% { 
        transform: translateY(0px); 
    }
    50% { 
        transform: translateY(-15px); 
    }
}

/* Fade In Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

/* Gentle Glow Animation */
@keyframes gentleGlow {
    0%, 100% { 
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
    }
    50% { 
        box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
    }
}

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

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

@keyframes scaleOnHover {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.05);
    }
}

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

/* Slide Animations */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Typewriter Effect */
@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blinkCursor {
    0%, 50% {
        border-color: transparent;
    }
    51%, 100% {
        border-color: var(--primary-color);
    }
}

/* Progress Animations */
@keyframes progressFill {
    from {
        width: 0%;
    }
    to {
        width: var(--progress-width, 100%);
    }
}

@keyframes progressStroke {
    from {
        stroke-dashoffset: var(--stroke-dasharray, 377);
    }
    to {
        stroke-dashoffset: 0;
    }
}

/* Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -30px, 0);
    }
    70% {
        animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0,-4px,0);
    }
}

/* Wobble Animation */
@keyframes wobble {
    from {
        transform: translate3d(0, 0, 0);
    }
    15% {
        transform: translate3d(-25% 0, 0) rotate3d(0, 0, 1, -5deg);
    }
    30% {
        transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
    }
    45% {
        transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
    }
    60% {
        transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
    }
    75% {
        transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
    }
    to {
        transform: translate3d(0, 0, 0);
    }
}

/* Shimmer Animation */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: 200px 0;
    }
}

/* Heart Beat Animation */
@keyframes heartBeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.1);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.1);
    }
    70% {
        transform: scale(1);
    }
}

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

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

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-bounce {
    animation: bounce 1s ease-in-out;
}

.animate-heartbeat {
    animation: heartBeat 1.3s ease-in-out infinite;
}

.animate-wobble {
    animation: wobble 1s ease-in-out;
}

.animate-rotate {
    animation: rotate 2s linear infinite;
}

/* Fade Animations */
.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease forwards;
}

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

.hover-scale:hover {
    animation: scaleOnHover 0.3s ease forwards;
}

/* Slide Animations */
.animate-slide-in-top {
    animation: slideInFromTop 0.8s ease forwards;
}

.animate-slide-in-bottom {
    animation: slideInFromBottom 0.8s ease forwards;
}

/* Glow Animation */
.animate-glow {
    animation: gentleGlow 2s ease-in-out infinite;
}

/* Gradient Animation */
.animate-gradient {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

/* Shimmer Effect */
.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    background-size: 200px 100%;
    animation: shimmer 2s ease-in-out infinite;
}

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

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

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

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

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

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

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

/* Color Transition Hover */
.hover-color {
    transition: color var(--transition-fast);
}

.hover-color:hover {
    color: var(--primary-color);
}

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

/* Elements that appear on scroll */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

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

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

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

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

/* Reduce animations on smaller screens */
@media (max-width: 768px) {
    .animate-float {
        animation-duration: 4s;
    }
    
    .hover-lift:hover {
        transform: translateY(-3px);
    }
    
    .hover-scale:hover {
        transform: scale(1.03);
    }
}

/* Respect user's preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .animate-float,
    .animate-pulse,
    .animate-bounce,
    .animate-rotate {
        animation: none;
    }
}