/* Beijing Feilikang Technology Co., Ltd - Animations */

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

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

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

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

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

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

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

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

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

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

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

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

.fade-in {
    animation: fadeIn 1s ease forwards;
}

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

.fade-in-down {
    animation: fadeInDown 1s ease forwards;
}

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

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

/* 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; }
.delay-7 { animation-delay: 0.7s; }
.delay-8 { animation-delay: 0.8s; }

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

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

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

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

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

.rotate {
    animation: rotate 3s linear infinite;
}

.rotate-slow {
    animation: rotate 6s linear infinite;
}

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

.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Glow Effect */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(233, 69, 96, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(233, 69, 96, 0.8);
    }
}

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

/* Slide In Animations */
@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromTop {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInFromBottom {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-in-left {
    animation: slideInFromLeft 0.8s ease forwards;
}

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

.slide-in-top {
    animation: slideInFromTop 0.8s ease forwards;
}

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

/* Scale Animations */
@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes scaleOut {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

.scale-in {
    animation: scaleIn 0.5s ease forwards;
}

.scale-out {
    animation: scaleOut 0.5s ease forwards;
}

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

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

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

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

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

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

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

.hover-float:hover {
    transform: translateY(-5px);
}

/* Text Animations */
.text-gradient {
    background: linear-gradient(90deg, #1a1a2e, #e94560, #1a1a2e);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGradient 3s ease infinite;
}

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

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

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

.typewriter {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--highlight-color);
    animation: typing 3s steps(30) forwards, blink 0.7s step-end infinite;
}

/* Marquee Animation */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.marquee {
    animation: marquee 20s linear infinite;
}

.marquee:hover {
    animation-play-state: paused;
}

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

.count-up {
    animation: countUp 1s ease forwards;
}

/* Loading Animation */
@keyframes loading {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--highlight-color);
    border-radius: 50%;
    animation: loading 1s linear infinite;
}

/* Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
}

.ripple:active::after {
    animation: ripple 0.6s ease-out;
}

/* Parallax Effect */
.parallax {
    transform: translateY(0);
    transition: transform 0.1s ease-out;
}

/* Stagger Animation */
.stagger > * {
    opacity: 0;
    transform: translateY(20px);
}

.stagger.active > *:nth-child(1) { animation: fadeInUp 0.6s ease 0.1s forwards; }
.stagger.active > *:nth-child(2) { animation: fadeInUp 0.6s ease 0.2s forwards; }
.stagger.active > *:nth-child(3) { animation: fadeInUp 0.6s ease 0.3s forwards; }
.stagger.active > *:nth-child(4) { animation: fadeInUp 0.6s ease 0.4s forwards; }
.stagger.active > *:nth-child(5) { animation: fadeInUp 0.6s ease 0.5s forwards; }
.stagger.active > *:nth-child(6) { animation: fadeInUp 0.6s ease 0.6s forwards; }
.stagger.active > *:nth-child(7) { animation: fadeInUp 0.6s ease 0.7s forwards; }
.stagger.active > *:nth-child(8) { animation: fadeInUp 0.6s ease 0.8s forwards; }
.stagger.active > *:nth-child(9) { animation: fadeInUp 0.6s ease 0.9s forwards; }
.stagger.active > *:nth-child(10) { animation: fadeInUp 0.6s ease 1s forwards; }

/* Morph Animation */
@keyframes morph {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

.morph {
    animation: morph 4s ease-in-out infinite;
}

/* Border Animation */
@keyframes borderGlow {
    0%, 100% {
        border-color: var(--highlight-color);
    }
    50% {
        border-color: var(--accent-color);
    }
}

.border-glow {
    border: 2px solid var(--highlight-color);
    animation: borderGlow 2s ease infinite;
}

/* Scroll Progress */
@keyframes scrollProgress {
    0% {
        transform: scaleX(0);
    }
    100% {
        transform: scaleX(1);
    }
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gradient-accent);
    z-index: 10000;
    transform-origin: left;
    animation: scrollProgress 1s ease forwards;
}

/* Hero Specific Animations */
.hero-title {
    opacity: 0;
    animation: fadeInUp 1s ease 0.3s forwards;
}

.hero-subtitle {
    opacity: 0;
    animation: fadeInUp 1s ease 0.5s forwards;
}

.hero-description {
    opacity: 0;
    animation: fadeInUp 1s ease 0.7s forwards;
}

.hero-buttons {
    opacity: 0;
    animation: fadeInUp 1s ease 0.9s forwards;
}

.hero-graphic {
    opacity: 0;
    animation: fadeInRight 1s ease 0.5s forwards;
}

/* Service Cards Animation */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-card.active {
    opacity: 1;
    transform: translateY(0);
}

/* Feature Icons Animation */
.feature-icon {
    transition: transform 0.3s ease;
}

.feature-item:hover .feature-icon {
    animation: iconBounce 0.5s ease;
}

@keyframes iconBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Button Hover Animation */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    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 ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Number Counter */
.counter {
    display: inline-block;
}

/* Image Reveal */
.image-reveal {
    position: relative;
    overflow: hidden;
}

.image-reveal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    z-index: 1;
    transform: translateX(0);
    transition: transform 0.8s ease;
}

.image-reveal.active::before {
    transform: translateX(100%);
}

/* Line Animation */
@keyframes lineGrow {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

.line-grow {
    transform-origin: left;
    animation: lineGrow 1s ease forwards;
}

/* Modal Animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

.modal-content {
    animation: modalFadeIn 0.3s ease forwards;
}

.modal-close {
    animation: modalFadeOut 0.3s ease forwards;
}

/* Navigation Animations */
.nav-link {
    position: relative;
}

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

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

/* Scroll Down Indicator */
@keyframes scrollDown {
    0%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(10px);
        opacity: 0.5;
    }
}

.scroll-indicator {
    animation: scrollDown 2s ease infinite;
}

/* Cursor Animation */
@keyframes cursorBlink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.cursor {
    display: inline-block;
    width: 3px;
    height: 1.2em;
    background: var(--highlight-color);
    margin-left: 5px;
    animation: cursorBlink 1s step-end infinite;
}

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

.float {
    animation: float 3s ease-in-out infinite;
}

.float-delay-1 { animation-delay: 0.5s; }
.float-delay-2 { animation-delay: 1s; }
.float-delay-3 { animation-delay: 1.5s; }

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

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

.spin-slow {
    animation: spin 3s linear infinite;
}

/* Elastic Animation */
@keyframes elastic {
    0% {
        transform: scale(1);
    }
    30% {
        transform: scale(1.25);
    }
    50% {
        transform: scale(0.95);
    }
    70% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.elastic {
    animation: elastic 0.8s ease forwards;
}
