/* 增强的动画效果 */

/* 空气流动粒子效果 */
.air-particles {
    position: relative;
    width: 80px;
    height: 60px;
    overflow: hidden;
}

.air-particles::before,
.air-particles::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: airFlow 3s ease-in-out infinite;
}

.air-particles::before {
    background: rgba(52, 152, 219, 0.8);
    animation-delay: 0s;
    top: 10px;
    left: 0;
}

.air-particles::after {
    background: rgba(52, 152, 219, 0.6);
    animation-delay: 1.5s;
    top: 30px;
    left: 0;
}

@keyframes airFlow {
    0% {
        transform: translateX(-20px) translateY(0px);
        opacity: 0;
        scale: 0.5;
    }
    20% {
        opacity: 1;
        scale: 1;
    }
    80% {
        opacity: 1;
        scale: 1;
    }
    100% {
        transform: translateX(100px) translateY(-10px);
        opacity: 0;
        scale: 0.5;
    }
}

/* 冷空气流动 */
.cold-air::before,
.cold-air::after {
    background: rgba(52, 152, 219, 0.8);
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

/* 暖空气流动 */
.warm-air::before,
.warm-air::after {
    background: rgba(231, 76, 60, 0.8);
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

/* 处理后空气流动 */
.treated-air-flow::before,
.treated-air-flow::after {
    background: rgba(39, 174, 96, 0.8);
    box-shadow: 0 0 10px rgba(39, 174, 96, 0.5);
}

/* 排风流动 */
.exhaust-air-flow::before,
.exhaust-air-flow::after {
    background: rgba(149, 165, 166, 0.8);
    box-shadow: 0 0 10px rgba(149, 165, 166, 0.5);
}

/* 热交换器内部动画 */
.heat-exchanger {
    position: relative;
    overflow: hidden;
}

.heat-exchanger::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: heatExchange 4s ease-in-out infinite;
}

@keyframes heatExchange {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: -100%;
    }
}

/* 过滤器工作动画 */
.filter {
    position: relative;
    overflow: hidden;
}

.filter::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(52, 152, 219, 0.3) 50%, transparent 100%);
    animation: filterWork 2s ease-in-out infinite;
}

@keyframes filterWork {
    0%, 100% {
        opacity: 0;
        transform: translateY(-100%);
    }
    50% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 温度数字跳动动画 */
.temperature-label {
    animation: temperaturePulse 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

@keyframes temperaturePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* 效率显示动画 */
.efficiency-display {
    animation: efficiencyGlow 2s ease-in-out infinite alternate;
    font-weight: bold;
}

@keyframes efficiencyGlow {
    from {
        text-shadow: 0 0 5px rgba(230, 126, 34, 0.5);
        color: #e67e22;
    }
    to {
        text-shadow: 0 0 15px rgba(230, 126, 34, 0.8), 0 0 25px rgba(230, 126, 34, 0.6);
        color: #f39c12;
    }
}

/* 整体系统脉冲动画 */
.ventilation-unit {
    animation: systemPulse 6s ease-in-out infinite;
    position: relative;
}

@keyframes systemPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.01);
    }
}

/* 空气流向指示箭头 */
.air-flow-arrow {
    position: absolute;
    width: 30px;
    height: 3px;
    background: rgba(52, 152, 219, 0.8);
    animation: arrowFlow 2s ease-in-out infinite;
    border-radius: 2px;
}

.air-flow-arrow::after {
    content: '';
    position: absolute;
    right: -8px;
    top: -3px;
    width: 0;
    height: 0;
    border-left: 8px solid rgba(52, 152, 219, 0.8);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

@keyframes arrowFlow {
    0%, 100% {
        opacity: 0.5;
        transform: translateX(0);
    }
    50% {
        opacity: 1;
        transform: translateX(10px);
    }
}

/* 风机叶片增强动画 */
.fan.rotating .fan-blades {
    animation: rotate 1.5s linear infinite;
    transform-origin: center;
}

.fan.rotating:hover .fan-blades {
    animation-duration: 1s;
}

/* 设备工作状态指示灯 */
.equipment-status {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #27ae60;
    animation: statusBlink 2s ease-in-out infinite;
}

@keyframes statusBlink {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 5px #27ae60;
    }
    50% {
        opacity: 0.3;
        box-shadow: 0 0 15px #27ae60;
    }
}

/* 演示容器整体动画 */
.demo-container {
    animation: containerGlow 8s ease-in-out infinite;
}

@keyframes containerGlow {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }
    50% {
        box-shadow: 0 15px 40px rgba(52, 152, 219, 0.15);
    }
}

/* 响应式动画调整 */
@media (max-width: 768px) {
    .air-particles {
        width: 60px;
        height: 40px;
    }
    
    .air-particles::before,
    .air-particles::after {
        width: 6px;
        height: 6px;
    }
    
    .air-flow-arrow {
        width: 20px;
        height: 2px;
    }
    
    .air-flow-arrow::after {
        right: -6px;
        top: -2px;
        border-left-width: 6px;
        border-top-width: 3px;
        border-bottom-width: 3px;
    }
}

/* 减少动画以提高性能和可访问性 */
@media (prefers-reduced-motion: reduce) {
    .fan.rotating .fan-blades,
    .air-particles::before,
    .air-particles::after,
    .heat-exchanger::before,
    .filter::after,
    .temperature-label,
    .efficiency-display,
    .ventilation-unit,
    .air-flow-arrow,
    .equipment-status,
    .demo-container {
        animation: none;
    }
    
    .temperature-label,
    .efficiency-display {
        transition: none;
    }
}

/* 悬停交互效果 */
.heat-exchanger:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.filter:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.fan:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* 工作原理说明项动画 */
.explanation-item {
    animation: slideInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

.explanation-item:nth-child(1) { animation-delay: 0.1s; }
.explanation-item:nth-child(2) { animation-delay: 0.2s; }
.explanation-item:nth-child(3) { animation-delay: 0.3s; }
.explanation-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}