/* 紧凑型三工况双向流新风系统样式 */

.compact-ventilation-system {
    max-width: 800px;
    margin: 0 auto;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* 系统标题和工况切换 */
.system-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.title-section h3 {
    font-size: 20px;
    color: #2c3e50;
    margin: 0 0 3px 0;
    font-weight: bold;
}

.title-section p {
    font-size: 12px;
    color: #7f8c8d;
    margin: 0;
}

.mode-switcher {
    display: flex;
    gap: 5px;
}

.mode-btn {
    padding: 6px 12px;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 6px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-btn:hover {
    background: #ecf0f1;
}

.mode-btn.active {
    background: #3498db;
    color: white;
}

/* 紧凑系统图 */
.compact-diagram {
    background: white;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    height: 120px;
    position: relative;
}

/* 新风机主体 */
.main-unit {
    position: relative;
    width: 100%;
    height: 100%;
    background: #ecf0f1;
    border: 1px solid #95a5a6;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

/* 风机单元 */
.fan-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.fan-circle {
    width: 35px;
    height: 35px;
    background: #95a5a6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #7f8c8d;
}

.fan-blades {
    width: 25px;
    height: 25px;
    position: relative;
}

.fan-blades.rotating {
    animation: fanSpin 1.5s linear infinite;
}

.blade {
    position: absolute;
    width: 10px;
    height: 2px;
    background: #2c3e50;
    border-radius: 1px;
    top: 50%;
    left: 50%;
    transform-origin: center;
}

.blade:nth-child(1) { transform: translate(-50%, -50%) rotate(0deg); }
.blade:nth-child(2) { transform: translate(-50%, -50%) rotate(120deg); }
.blade:nth-child(3) { transform: translate(-50%, -50%) rotate(240deg); }

.fan-name {
    font-size: 8px;
    color: #2c3e50;
    font-weight: bold;
}

/* 热交换器 */
.heat-exchanger {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    position: relative;
}

.exchanger-body {
    width: 50px;
    height: 35px;
    background: #d5dbdb;
    border: 2px solid #85929e;
    border-radius: 4px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cross-flow {
    position: relative;
    width: 100%;
    height: 100%;
}

.horizontal-flow,
.vertical-flow {
    position: absolute;
    background: #7f8c8d;
}

.horizontal-flow {
    width: 100%;
    height: 3px;
    top: 50%;
    transform: translateY(-50%);
}

.vertical-flow {
    width: 3px;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
}

.heat-waves {
    position: absolute;
    width: 100%;
    height: 100%;
}

.heat-wave {
    position: absolute;
    width: 80%;
    height: 1px;
    background: rgba(231, 76, 60, 0.8);
    left: 10%;
    animation: heatPulse 1.5s ease-in-out infinite;
}

.heat-wave:nth-child(1) { top: 30%; animation-delay: 0s; }
.heat-wave:nth-child(2) { top: 70%; animation-delay: 0.3s; }

.exchanger-name {
    font-size: 8px;
    color: #2c3e50;
    font-weight: bold;
}

.efficiency-display {
    position: absolute;
    top: -12px;
    right: -8px;
    background: #27ae60;
    color: white;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 7px;
    font-weight: bold;
}

/* 空气流动管道 */
.air-channel {
    position: absolute;
    height: 12px;
}

.fresh-in {
    bottom: 25px;
    left: 60px;
    right: 60px;
}

.fresh-out {
    bottom: 10px;
    left: 60px;
    right: 60px;
}

.return-in {
    top: 25px;
    left: 60px;
    right: 60px;
}

.exhaust-out {
    top: 10px;
    left: 60px;
    right: 60px;
}

.channel-pipe {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

/* 不同工况的管道颜色 */
.winter .fresh-in .channel-pipe { background: linear-gradient(90deg, #3498db, #2980b9); }
.winter .fresh-out .channel-pipe { background: linear-gradient(90deg, #27ae60, #229954); }
.winter .return-in .channel-pipe { background: linear-gradient(270deg, #e74c3c, #c0392b); }
.winter .exhaust-out .channel-pipe { background: linear-gradient(270deg, #95a5a6, #7f8c8d); }

.summer .fresh-in .channel-pipe { background: linear-gradient(90deg, #e74c3c, #c0392b); }
.summer .fresh-out .channel-pipe { background: linear-gradient(90deg, #3498db, #2980b9); }
.summer .return-in .channel-pipe { background: linear-gradient(270deg, #27ae60, #229954); }
.summer .exhaust-out .channel-pipe { background: linear-gradient(270deg, #f39c12, #e67e22); }

.spring .fresh-in .channel-pipe { background: linear-gradient(90deg, #f39c12, #e67e22); }
.spring .fresh-out .channel-pipe { background: linear-gradient(90deg, #27ae60, #229954); }
.spring .return-in .channel-pipe { background: linear-gradient(270deg, #3498db, #2980b9); }
.spring .exhaust-out .channel-pipe { background: linear-gradient(270deg, #95a5a6, #7f8c8d); }

.air-particles {
    position: relative;
    width: 100%;
    height: 100%;
}

.air-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.fresh-in .air-dot,
.fresh-out .air-dot {
    animation: flowRight 2s linear infinite;
}

.return-in .air-dot,
.exhaust-out .air-dot {
    animation: flowLeft 2s linear infinite;
}

.air-dot:nth-child(1) { animation-delay: 0s; }
.air-dot:nth-child(2) { animation-delay: 0.7s; }
.air-dot:nth-child(3) { animation-delay: 1.4s; }

.temp-label {
    position: absolute;
    top: -10px;
    right: 5px;
    font-size: 7px;
    font-weight: bold;
    padding: 1px 3px;
    border-radius: 2px;
    color: white;
}

.air-label {
    position: absolute;
    top: -10px;
    left: 5px;
    font-size: 7px;
    font-weight: bold;
    color: #2c3e50;
    background: rgba(255, 255, 255, 0.8);
    padding: 1px 3px;
    border-radius: 2px;
}

/* 温度标签颜色 */
.outdoor-temp { background: #3498db; }
.supply-temp { background: #27ae60; }
.return-temp { background: #e74c3c; }
.exhaust-temp { background: #95a5a6; }

/* 流向指示箭头 */
.flow-indicators {
    position: absolute;
    width: 100%;
    height: 100%;
}

.flow-arrow {
    position: absolute;
    font-size: 12px;
    font-weight: bold;
    color: #2c3e50;
    animation: arrowBlink 2s ease-in-out infinite;
}

.fresh-arrow { bottom: 30px; left: 45px; }
.supply-arrow { bottom: 15px; right: 45px; }
.return-arrow { top: 30px; right: 45px; }
.exhaust-arrow { top: 15px; left: 45px; }

/* 工况参数显示 */
.mode-parameters {
    background: white;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.param-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.param-item {
    text-align: center;
}

.param-label {
    display: block;
    font-size: 10px;
    color: #7f8c8d;
    margin-bottom: 3px;
}

.param-value {
    display: block;
    font-size: 14px;
    font-weight: bold;
    color: #2c3e50;
}

/* 工况说明 */
.mode-description {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    border-left: 4px solid #3498db;
}

.description-content h4 {
    font-size: 14px;
    color: #2c3e50;
    margin: 0 0 5px 0;
}

.description-content p {
    font-size: 11px;
    color: #7f8c8d;
    margin: 0;
    line-height: 1.4;
}

/* 动画定义 */
@keyframes fanSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes heatPulse {
    0%, 100% { opacity: 0.3; transform: scaleX(0.5); }
    50% { opacity: 1; transform: scaleX(1); }
}

@keyframes flowRight {
    0% { left: -8px; }
    100% { left: calc(100% + 8px); }
}

@keyframes flowLeft {
    0% { right: -8px; }
    100% { right: calc(100% + 8px); }
}

@keyframes arrowBlink {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .compact-ventilation-system {
        padding: 10px;
    }
    
    .system-header-compact {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mode-switcher {
        justify-content: center;
    }
    
    .param-group {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .compact-diagram {
        height: 100px;
        padding: 10px;
    }
    
    .main-unit {
        padding: 0 15px;
    }
}

/* 工况切换过渡效果 */
.compact-diagram {
    transition: all 0.5s ease;
}

.temp-label,
.param-value {
    transition: all 0.3s ease;
}

/* 减少动画以提高性能 */
@media (prefers-reduced-motion: reduce) {
    .fan-blades.rotating,
    .heat-wave,
    .air-dot,
    .flow-arrow {
        animation: none;
    }
}