/* Animations CSS - Enhanced for Mouse Testing Website */

/* Basic Animations */ 

/* Fade In Animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.8s ease-in-out forwards;
    opacity: 0;
}

/* Fade Out Animation */
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.fade-out {
    animation: fadeOut 0.5s ease-in-out forwards;
}

/* Slide In Animation */
@keyframes slideIn {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.slide-in {
    animation: slideIn 0.8s ease-in-out forwards;
    opacity: 0;
}

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

.slide-in-left {
    animation: slideInLeft 0.8s ease-in-out forwards;
    opacity: 0;
}

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

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

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

.slide-in-bottom {
    animation: slideInBottom 0.8s ease-in-out forwards;
    opacity: 0;
}

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

.pulse {
    animation: pulse 2s infinite;
}

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

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Scroll Animation Helper Classes */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.8s, transform 0.8s;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.from-bottom {
    transform: translateY(50px);
}

.animate-on-scroll.from-left {
    transform: translateX(-50px);
}

.animate-on-scroll.from-right {
    transform: translateX(50px);
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, #4a90e2, #67b26f);
    z-index: 9999;
    transition: width 0.2s ease-out;
}

/* Button Hover Effects */
.btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover:after {
    width: 300%;
    height: 300%;
}

/* Card Hover Effects */
.tool-card, .benefit-card, .blog-card {
    transition: all 0.3s ease;
}

.tool-card:hover, .benefit-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

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

/* Staggered Animation Delays */
.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;
}

/* Animated Underline for Links */
.animated-link {
    position: relative;
    display: inline-block;
}

.animated-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.animated-link:hover:after {
    width: 100%;
}


/* Cursor Effects */
.cursor-trail {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(74, 144, 226, 0.3);
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
    z-index: 9999;
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.5);
}

/* Gradient Text Effect */
.gradient-text {
    background: linear-gradient(45deg, #4a90e2, #67b26f);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

/* Hover Effects */
.hover-effect {
    transition: transform 0.3s, color 0.3s;
}

.hover-effect:hover {
    transform: translateY(-3px);
    color: #4a90e2;
}

/* Form Input Animation */
.input-animation {
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-animation:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.input-focused label {
    color: #4a90e2;
    transform: translateY(-20px) scale(0.8);
}

/* Success Message Animation */
.success-message {
    padding: 15px;
    margin-top: 20px;
    background-color: #d4edda;
    color: #155724;
    border-radius: 4px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Loading Animation */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* Gradient Text Animation */
.gradient-text {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient 5s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Mouse cursor trail effect */
.cursor-trail {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary-color);
    opacity: 0.5;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease;
}

/* Typewriter Text Effect */
.typewriter-container {
    display: block;
    width: 100%;
    text-align: center;
    margin: 0 auto;
}

.typewriter {
    display: inline-block;
    overflow: hidden;
    border-right: 3px solid var(--primary-color);
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: 0.15em;
    animation: typing 5s steps(100, end) forwards, blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary-color) }
}

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

/* 3D Card Tilt Effect */
.tilt-card {
    transition: transform 0.5s ease;
    transform-style: preserve-3d;
}

.tilt-card:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

/* Animated Counter */
.counter {
    display: inline-block;
    animation: countUp 2s ease-out forwards;
}

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

/* Shimmering Effect */
.shimmer {
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

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

/* Animated Checkmark */
.checkmark {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #fff;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px var(--success);
    animation: fill 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: var(--success);
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 30px var(--success);
    }
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--primary-color);
    z-index: 9999;
    transition: width 0.1s ease;
}
