/* 简化的双向流新风系统动画样式 */

.dual-flow-animation {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* 系统标题 */
.system-title {
    text-align: center;
    margin-bottom: 20px;
}

.system-title h3 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 5px;
    font-weight: bold;
}

.system-title p {
    font-size: 14px;
    color: #7f8c8d;
    max-width: 500px;
    margin: 0 auto;
}

/* 主要动画容器 */
.animation-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
    min-height: 200px;
}

/* 室外和室内区域 */
.outdoor-area,
.indoor-area {
    background: white;
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.outdoor-area:hover,
.indoor-area:hover {
    transform: translateY(-5px);
}

.area-label {
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 20px;
}

.outdoor-conditions,
.indoor-conditions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.condition-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
}

.condition-item .icon {
    font-size: 20px;
}

.condition-item .value {
    font-size: 14px;
    font-weight: bold;
}

.cold-temp {
    color: #3498db;
}

.warm-temp {
    color: #e74c3c;
}

.poor-air {
    color: #e67e22;
}

.clean-air {
    color: #27ae60;
}

/* 新风机主体 */
.ventilation-main {
    position: relative;
    background: linear-gradient(135deg, #34495e, #2c3e50);
    border-radius: 25px;
    padding: 30px;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto auto;
    gap: 20px;
    min-height: 350px;
}

/* 空气管道 */
.air-pipe {
    position: relative;
    height: 40px;
    background: linear-gradient(135deg, #bdc3c7, #95a5a6);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
}

.fresh-pipe {
    background: linear-gradient(90deg, #74b9ff, #0984e3);
}

.supply-pipe {
    background: linear-gradient(90deg, #00b894, #00a085);
}

.return-pipe {
    background: linear-gradient(270deg, #fd79a8, #e84393);
}

.exhaust-pipe {
    background: linear-gradient(270deg, #95a5a6, #7f8c8d);
}

/* 管道流动效果 */
.pipe-flow {
    position: relative;
    width: 100%;
    height: 100%;
}

.air-particle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.fresh-flow .air-particle {
    animation: flowRight 3s linear infinite;
}

.supply-flow .air-particle {
    animation: flowRight 3s linear infinite;
}

.return-flow .air-particle {
    animation: flowLeft 3s linear infinite;
}

.exhaust-flow .air-particle {
    animation: flowLeft 3s linear infinite;
}

/* 管道标签 */
.pipe-label {
    position: absolute;
    top: -25px;
    left: 10px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    background: rgba(0,0,0,0.3);
    padding: 3px 8px;
    border-radius: 10px;
}

.temp-indicator {
    position: absolute;
    top: -25px;
    right: 10px;
    font-size: 12px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 10px;
    color: white;
}

.temp-indicator.cold {
    background: #3498db;
}

.temp-indicator.warm {
    background: #e74c3c;
}

.temp-indicator.cool {
    background: #95a5a6;
}

/* 处理单元 */
.processing-unit {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin: 10px 0;
}

/* 过滤器部分 */
.filter-section {
    text-align: center;
}

.filter-box {
    width: 60px;
    height: 80px;
    background: #34495e;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.filter-layers {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-layer {
    width: 40px;
    height: 8px;
    background: #ecf0f1;
    border-radius: 2px;
    animation: filterWork 2s ease-in-out infinite;
}

.filter-layer:nth-child(2) {
    animation-delay: 0.3s;
}

.filter-layer:nth-child(3) {
    animation-delay: 0.6s;
}

.filter-label {
    position: absolute;
    bottom: -25px;
    font-size: 10px;
    color: white;
    white-space: nowrap;
}

/* 热交换器部分 */
.heat-exchanger-section {
    text-align: center;
    position: relative;
}

.exchanger-box {
    width: 100px;
    height: 80px;
    background: linear-gradient(135deg, #e17055, #d63031);
    border-radius: 15px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.exchanger-core {
    position: relative;
    width: 70px;
    height: 50px;
}

.heat-transfer-animation {
    position: absolute;
    width: 100%;
    height: 100%;
}

.heat-wave {
    position: absolute;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 1px;
    animation: heatTransfer 2s ease-in-out infinite;
}

.heat-wave:nth-child(1) {
    top: 20%;
    animation-delay: 0s;
}

.heat-wave:nth-child(2) {
    top: 50%;
    animation-delay: 0.3s;
}

.heat-wave:nth-child(3) {
    top: 80%;
    animation-delay: 0.6s;
}

.cross-flow {
    position: absolute;
    width: 100%;
    height: 100%;
}

.horizontal-flow,
.vertical-flow {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
}

.horizontal-flow {
    width: 100%;
    height: 2px;
    top: 50%;
    transform: translateY(-50%);
    animation: horizontalFlow 3s linear infinite;
}

.vertical-flow {
    width: 2px;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
    animation: verticalFlow 3s linear infinite;
}

.exchanger-label {
    position: absolute;
    bottom: -25px;
    font-size: 10px;
    color: white;
    white-space: nowrap;
    left: 50%;
    transform: translateX(-50%);
}

.efficiency-badge {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #00b894;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
    animation: efficiencyPulse 2s ease-in-out infinite;
}

/* 风机部分 */
.fan-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.fan-unit {
    text-align: center;
}

.fan-rotor {
    width: 50px;
    height: 50px;
    background: #2c3e50;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    animation: fanRotate 1s linear infinite;
}

.fan-blade {
    position: absolute;
    width: 20px;
    height: 3px;
    background: #ecf0f1;
    border-radius: 2px;
    transform-origin: center;
}

.fan-blade:nth-child(1) { transform: rotate(0deg); }
.fan-blade:nth-child(2) { transform: rotate(90deg); }
.fan-blade:nth-child(3) { transform: rotate(180deg); }
.fan-blade:nth-child(4) { transform: rotate(270deg); }

.fan-label {
    font-size: 10px;
    color: white;
    margin-top: 8px;
}

/* 工作原理说明 */
.principle-explanation {
    margin-bottom: 40px;
}

.explanation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.explanation-step {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.explanation-step:hover {
    transform: translateY(-5px);
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    flex-shrink: 0;
    font-size: 18px;
}

.step-content h4 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 16px;
}

.step-content p {
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.5;
}

/* 性能指标 */
.performance-indicators {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.indicator-item {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.indicator-item:hover {
    transform: translateY(-5px);
}

.indicator-value {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.indicator-label {
    font-size: 14px;
    opacity: 0.9;
}

/* 动画定义 */
@keyframes flowRight {
    0% { left: -20px; }
    100% { left: calc(100% + 20px); }
}

@keyframes flowLeft {
    0% { right: -20px; }
    100% { right: calc(100% + 20px); }
}

@keyframes filterWork {
    0%, 100% { background: #ecf0f1; }
    50% { background: #3498db; }
}

@keyframes heatTransfer {
    0%, 100% { opacity: 0.3; transform: scaleX(0.5); }
    50% { opacity: 1; transform: scaleX(1); }
}

@keyframes horizontalFlow {
    0% { background-position: -100px 0; }
    100% { background-position: 100px 0; }
}

@keyframes verticalFlow {
    0% { background-position: 0 -100px; }
    100% { background-position: 0 100px; }
}

@keyframes efficiencyPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes fanRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .animation-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 20px;
    }
    
    .outdoor-area,
    .indoor-area {
        max-width: 300px;
        margin: 0 auto;
    }
    
    .processing-unit {
        flex-direction: column;
        gap: 20px;
    }
    
    .fan-section {
        flex-direction: row;
        justify-content: space-around;
    }
}

@media (max-width: 768px) {
    .dual-flow-animation {
        padding: 20px 15px;
    }
    
    .system-title h3 {
        font-size: 24px;
    }
    
    .system-title p {
        font-size: 14px;
    }
    
    .explanation-grid {
        grid-template-columns: 1fr;
    }
    
    .performance-indicators {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .indicator-value {
        font-size: 28px;
    }
}

/* 减少动画以提高性能 */
@media (prefers-reduced-motion: reduce) {
    .air-particle,
    .filter-layer,
    .heat-wave,
    .horizontal-flow,
    .vertical-flow,
    .efficiency-badge,
    .fan-rotor {
        animation: none;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .dual-flow-animation {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    }
    
    .outdoor-area,
    .indoor-area,
    .explanation-step {
        background: #34495e;
        color: white;
    }
    
    .condition-item {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .system-title h3,
    .area-label,
    .step-content h4 {
        color: white;
    }
    
    .system-title p,
    .step-content p {
        color: #bdc3c7;
    }
}