/* ============================================
   Taiyuan Luqiongtu Trading Co., Ltd.
   Animations Stylesheet
   ============================================ */

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

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

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

@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);
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-30px);
    }
    60% {
        transform: translateY(-15px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes flip {
    0% {
        transform: perspective(400px) rotateY(0deg);
    }
    100% {
        transform: perspective(400px) rotateY(360deg);
    }
}

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

@keyframes swing {
    0%, 100% {
        transform: rotate(-10deg);
    }
    50% {
        transform: rotate(10deg);
    }
}

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

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

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

@keyframes borderGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 102, 179, 0.5), 0 0 10px rgba(0, 102, 179, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 102, 179, 0.8), 0 0 40px rgba(0, 102, 179, 0.5);
    }
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(0, 102, 179, 0.5);
    }
    50% {
        text-shadow: 0 0 30px rgba(0, 102, 179, 0.8), 0 0 50px rgba(0, 102, 179, 0.5);
    }
}

@keyframes slideRight {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

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

@keyframes lineGrow {
    from {
        transform: scaleY(0);
    }
    to {
        transform: scaleY(1);
    }
}

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

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

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

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

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

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

.animate-slide-in-up {
    animation: slideInUp 0.8s ease forwards;
}

.animate-zoom-in {
    animation: zoomIn 0.6s ease forwards;
}

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

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

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

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

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

/* Delay Classes */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }
.delay-900 { animation-delay: 0.9s; }
.delay-1000 { animation-delay: 1s; }

/* Scroll Animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

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

.scroll-animate-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease;
}

.scroll-animate-left.animated {
    opacity: 1;
    transform: translateX(0);
}

.scroll-animate-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease;
}

.scroll-animate-right.animated {
    opacity: 1;
    transform: translateX(0);
}

.scroll-animate-zoom {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s ease;
}

.scroll-animate-zoom.animated {
    opacity: 1;
    transform: scale(1);
}

/* Hover Animations */
.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-scale {
    transition: transform 0.3s ease;
}

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

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(0, 102, 179, 0.5);
}

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

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

.hover-shine {
    position: relative;
    overflow: hidden;
}

.hover-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

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

/* Button Animations */
.btn-animate {
    position: relative;
    overflow: hidden;
}

.btn-animate::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-animate:hover::before {
    width: 300px;
    height: 300px;
}

.btn-fill {
    position: relative;
    z-index: 1;
}

.btn-fill::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: var(--primary-dark);
    z-index: -1;
    transition: height 0.3s ease;
}

.btn-fill:hover::after {
    height: 100%;
}

/* Card Animations */
.card-flip {
    perspective: 1000px;
}

.card-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.card-flip:hover .card-flip-inner {
    transform: rotateY(180deg);
}

.card-flip-front,
.card-flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.card-flip-back {
    transform: rotateY(180deg);
}

/* Loading Animations */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 102, 179, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

.loading-dots {
    display: flex;
    gap: 8px;
}

.loading-dots span {
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}

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

.loading-bar {
    width: 200px;
    height: 4px;
    background: rgba(0, 102, 179, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.loading-bar::after {
    content: '';
    display: block;
    width: 50%;
    height: 100%;
    background: var(--primary-color);
    animation: loadingSlide 1s ease-in-out infinite;
}

@keyframes loadingSlide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(300%); }
}

/* Page Transition Animations */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    z-index: 9999;
    transform: translateY(100%);
}

.page-transition.active {
    animation: pageSlideUp 0.8s ease forwards;
}

.page-transition.exit {
    animation: pageSlideDown 0.8s ease forwards;
}

@keyframes pageSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes pageSlideDown {
    from { transform: translateY(0); }
    to { transform: translateY(-100%); }
}

/* Parallax Effects */
.parallax {
    transition: transform 0.1s ease-out;
}

.parallax-slow {
    transition: transform 0.2s ease-out;
}

.parallax-fast {
    transition: transform 0.05s ease-out;
}

/* Text Reveal Animation */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    transform: translateY(100%);
    animation: textReveal 0.8s ease forwards;
}

@keyframes textReveal {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Line Animation */
.line-animate {
    position: relative;
}

.line-animate::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transition: width 0.5s ease;
}

.line-animate:hover::after {
    width: 100%;
}

/* Icon Animations */
.icon-spin {
    transition: transform 0.3s ease;
}

.icon-spin:hover {
    transform: rotate(360deg);
}

.icon-bounce {
    transition: transform 0.3s ease;
}

.icon-bounce:hover {
    animation: bounce 0.5s ease;
}

.icon-pulse {
    transition: transform 0.3s ease;
}

.icon-pulse:hover {
    animation: pulse 0.5s ease;
}

/* Background Animations */
.bg-gradient-animate {
    background: linear-gradient(-45deg, #0066b3, #004080, #3385c9, #0066b3);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

.bg-particles {
    position: relative;
    overflow: hidden;
}

.bg-particles::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(0, 102, 179, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 102, 179, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(0, 102, 179, 0.05) 0%, transparent 30%);
    animation: float 20s ease-in-out infinite;
}

/* Morphing Animation */
.morph {
    animation: morph 4s ease-in-out infinite;
}

@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%;
    }
}

/* SVG Animation Classes */
.svg-draw {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: svgDraw 3s ease forwards;
}

@keyframes svgDraw {
    to {
        stroke-dashoffset: 0;
    }
}

.svg-fill {
    animation: svgFill 2s ease forwards;
}

@keyframes svgFill {
    0% {
        fill-opacity: 0;
    }
    100% {
        fill-opacity: 1;
    }
}

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

.counter-value {
    font-variant-numeric: tabular-nums;
}

/* Stagger Animation for Lists */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-item.animated {
    animation: fadeInUp 0.5s ease forwards;
}

/* Marquee Animation */
.marquee {
    display: flex;
    overflow: hidden;
    user-select: none;
}

.marquee-content {
    display: flex;
    animation: marquee 30s linear infinite;
}

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

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

/* Reveal on Scroll */
.reveal {
    position: relative;
}

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

.reveal.animated::before {
    transform: scaleX(1);
}

.reveal > * {
    position: relative;
    z-index: 2;
}

/* Video Background Animation */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 102, 179, 0.8) 0%,
        rgba(0, 64, 128, 0.6) 100%
    );
    animation: overlayPulse 4s ease-in-out infinite;
}

@keyframes overlayPulse {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 0.6;
    }
}

/* Interactive Hover States */
.interactive-card {
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.interactive-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

/* Notification Badge Animation */
.badge-pulse {
    position: relative;
}

.badge-pulse::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    animation: ripple 1.5s infinite;
}

/* Tab Transition */
.tab-content {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.tab-content.active {
    opacity: 1;
    transform: translateY(0);
}

/* Accordion Animation */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.accordion-item.active .accordion-content {
    max-height: 1000px;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

/* Modal Animations */
.modal-overlay {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Focus Animation */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 102, 179, 0.3);
    animation: focusPulse 1.5s ease-in-out infinite;
}

@keyframes focusPulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(0, 102, 179, 0.3);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(0, 102, 179, 0.1);
    }
}

/* Success/Error Animation */
.success-animation {
    animation: successPop 0.5s ease;
}

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

.error-animation {
    animation: errorShake 0.5s ease;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Responsive Animation Disable */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scroll-animate,
    .scroll-animate-left,
    .scroll-animate-right,
    .scroll-animate-zoom {
        opacity: 1;
        transform: none;
    }
}

/* Print Animation Disable */
@media print {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
