/* ==========================================
   动画效果样式
   ========================================== */

/* 漂浮动画 - 用于实时提问 */
@keyframes floatIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    20% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    80% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
}

/* 闪现脉冲动画 */
@keyframes flashPulse {
    0%, 100% {
        opacity: 0.8;
        box-shadow: 0 0 5px rgba(231, 76, 60, 0.3);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 20px rgba(231, 76, 60, 0.6);
    }
}

/* 脉冲动画 */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* 渐入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 滑入动画 */
@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 缩放动画 */
@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 应用动画的类 */
.live-indicator {
    animation: flashPulse 2s infinite;
}

.live-indicator .dot {
    animation: pulse 1s infinite;
}

.question-item {
    animation: floatIn 6s ease-in-out infinite;
}

/* 不同问题的动画延迟 */
.question-item:nth-child(1) {
    animation-delay: 0s;
}

.question-item:nth-child(2) {
    animation-delay: 2s;
}

.question-item:nth-child(3) {
    animation-delay: 4s;
}

/* 页面加载动画 */
.hero-section {
    animation: fadeIn 0.8s ease-in;
}

.search-box {
    animation: scaleIn 0.6s ease-out;
}

.stat-item {
    animation: fadeIn 0.8s ease-in;
}

.stat-item:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-item:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-item:nth-child(3) {
    animation-delay: 0.3s;
}

.step-item {
    animation: slideIn 0.6s ease-out;
}

.step-item:nth-child(1) {
    animation-delay: 0.1s;
}

.step-item:nth-child(2) {
    animation-delay: 0.2s;
}

.step-item:nth-child(3) {
    animation-delay: 0.3s;
}

/* FAQ 展开/收起动画 */
.faq-answer {
    transition: max-height 0.3s ease, padding 0.3s ease;
}

/* 按钮悬停效果增强 */
.btn-primary,
.btn-secondary {
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover::before,
.btn-secondary:hover::before {
    width: 300px;
    height: 300px;
}

/* 数字动画 - 用于统计数据 */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-number {
    animation: countUp 0.5s ease-out;
}
