/* 电力监控样式 */

.power-monitoring {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.8%; /* 进一步减少间距，为温度区域腾出空间 */
    padding: 8px 12px 16px 12px; /* 调整内边距，为温度区域提供更多空间 */
    box-sizing: border-box;
}

/* 电力监控区域通用样式 */
.power-section {
    width: 100%;
    background: linear-gradient(135deg, rgba(20, 50, 100, 0.6) 0%, rgba(10, 30, 60, 0.6) 100%);
    border: 1px solid rgba(0, 200, 255, 0.3);
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 200, 255, 0.1), inset 0 0 20px rgba(0, 200, 255, 0.05);
    padding: 12px;
    box-sizing: border-box;
    overflow: hidden;
}

/* 区域标题 */
.section-title {
    width: 100%;
    height: 30px;
    line-height: 30px;
    font-size: 1rem;
    color: #00d8ff;
    font-weight: bold;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 200, 255, 0.2);
    margin-bottom: 10px;
    position: relative;
    padding-left: 12px;
}

.section-title:before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, #00d8ff 0%, #0088ff 100%);
    border-radius: 2px;
}

/* 区域内容 */
.section-content {
    width: 100%;
    height: auto; 
    overflow: hidden;
}

/* 电压电流区域内容特殊调整 */
.voltage-current-section .section-content {
    padding: 6px 0; /* 从4px增加到6px，给数据项更多空间 */
}

/* 电压电流实时数据部分 */
.voltage-current-section {
    flex: 0 0 auto; /* 改为自适应高度，根据内容自动调整 */
    height: auto; /* 确保高度自适应 */
    min-height: 120px; /* 设置最小高度，确保数据显示完整 */
}

.data-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px; /* 从8px减少到6px */
    width: 100%;
}

.data-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px; /* 增加到8px，确保6个数据项显示完整且不拥挤 */
    background: rgba(0, 100, 150, 0.2);
    border: 1px solid rgba(0, 200, 255, 0.2);
    border-radius: 3px;
    margin-right: 4px;
}

.data-item:last-child {
    margin-right: 0;
}

.data-item .label {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 4px;
}

.data-item .value {
    font-size: 1.3rem;
    color: #00ff88;
    font-weight: bold;
    font-family: 'electronicFont', monospace;
}

.data-item .value-row {
    display: flex;
    align-items: baseline;
}

/* 单位样式 */
.data-item .unit {
    font-size: 0.75rem;
    color: #888;
    font-weight: normal;
    margin-left: 4px;
    font-family: inherit;
}

/* 趋势图部分 */
.trend-section {
    flex: 0 0 30%; /* 增加高度比例，确保趋势图有足够显示空间 */
    display: flex;
    flex-direction: column;
}

.trend-section .section-content {
    flex: 1;
    overflow: hidden;
}

.chart-container {
    width: 100%;
    height: 100%;
    min-height: 220px; /* 增加最小高度，确保图表有足够显示空间 */
    position: relative;
}

/* 功率因数部分 */
.power-factor-section {
    flex: 0 0 31%; /* 大幅增加高度比例，确保功率因数仪表盘和24小时趋势图完整显示 */
    display: flex;
    flex-direction: column;
    margin-bottom: 10px; /* 为功率因数区域添加底部外边距，确保与容器底部有合理距离 */
}

.power-factor-section .section-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.power-factor-display {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(0, 100, 150, 0.15);
    border-radius: 3px;
    flex-shrink: 0;
}

.power-factor-section .chart-container {
    flex: 1;
    overflow: hidden;
}

.gauge-container {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gauge {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        #ff4444 0deg,
        #ffaa00 90deg,
        #00ff88 180deg,
        #00ff88 360deg
    );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

.gauge:after {
    content: "";
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(10, 30, 60, 0.9);
    border-radius: 50%;
}



/* 响应式调整 */
@media (max-width: 1920px) {
    .power-section {
        padding: 10px;
    }

    .section-title {
        font-size: 0.9rem;
        height: 28px;
        line-height: 28px;
    }

    .data-item .value {
        font-size: 1.1rem;
    }

    .power-factor-value .value {
        font-size: 1.5rem;
    }
}

/* 数据更新动画 */
@keyframes dataUpdate {
    0% {
        color: #00ff88;
        text-shadow: 0 0 10px rgba(0, 255, 136, 0.8);
    }
    50% {
        color: #00ffff;
        text-shadow: 0 0 20px rgba(0, 255, 255, 1);
    }
    100% {
        color: #00ff88;
        text-shadow: 0 0 10px rgba(0, 255, 136, 0.8);
    }
}

.data-updating {
    animation: dataUpdate 0.6s ease-in-out;
}

/* 状态指示 */
.status-normal {
    color: #00ff88;
}

.status-warning {
    color: #ffaa00;
}

.status-danger {
    color: #ff4444;
}

/* 温度监测区域样式 */
.temperature-section {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 280px;
    overflow: visible;
}

.temperature-section .section-content {
    flex: 1;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

/* 温度报警信息 */
.temperature-alert {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.35);
    border-radius: 4px;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.alert-label {
    font-size: 0.9rem;
    color: #fff;
}

.alert-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: #ffd700;
    font-family: 'electronicFont', monospace;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.alert-location {
    font-size: 0.8rem;
    color: #aaa;
    margin-left: 8px;
}

/* 温度热力图容器 */
.temperature-heatmap-container {
    width: 100%;
    flex: 1;
    height: auto;
    min-height: 280px;
    position: relative;
    overflow: visible;
}

#temperatureHeatmap {
    width: 100%;
    height: 100%;
    min-height: 280px;
}

/* 小屏高度适配（窗口高度 <= 932px） */
@media (max-height: 932px) {
    .temperature-section { min-height: 300px; }
    .temperature-heatmap-container { min-height: 300px; }
    #temperatureHeatmap { min-height: 300px; }
}
