/* 页面加载动画 */
@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 fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 按钮点击动画 */
@keyframes buttonClick {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

/* 加载动画 */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* LOGO发光效果 */
@keyframes logoGlow {
    0%, 100% {
        filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.1));
    }
    50% {
        filter: drop-shadow(0 4px 20px rgba(41, 93, 62, 0.3));
    }
}

/* 页面元素动画应用 */
.header {
    animation: fadeInDown 0.6s ease-out;
}

.logo:hover {
    /* animation: logoGlow 2s ease-in-out infinite; */
}

.query-card {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.query-button:active {
    animation: buttonClick 0.1s ease-out;
}

.query-button.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    display: inline-block;
    margin-left: 8px;
    animation: spin 1s linear infinite;
}

.result-section {
    animation: fadeIn 0.5s ease-out;
}

/* 输入框聚焦动画 */
.query-input:focus {
    animation: fadeIn 0.3s ease-out;
}

/* 悬停效果增强 */
.query-card:hover {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

.logo-container:hover {
    /* transform: scale(1.05); */
    transition: transform 0.3s ease;
}

/* 结果出现动画 */
.result-success, .result-failure {
    animation: fadeInUp 0.6s ease-out;
}



/* 产品卡片依次出现动画 */
.product-card {
    opacity: 0;
    transform: translateY(30px);
    animation: cardSlideIn 0.6s ease-out forwards;
}

.products-grid-two .product-card:nth-child(1) {
    animation-delay: 0.1s;
}

.products-grid-two .product-card:nth-child(2) {
    animation-delay: 0.2s;
}

@keyframes cardSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* 响应式动画优化 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
} 