/**
 * 三清山外双溪索道大屏技术仪表板样式
 * 包含胎压监测仪表盘、电压电流实时数据、功率因数趋势图、系统状态指示灯、温度热力图样式
 */

/* 胎压监测仪表盘样式 */
.tpms-dashboard {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    padding: 10px;
}

.tpms-item {
    text-align: center;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin: 5px;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
    transition: all 0.3s ease;
}

.tpms-item:hover {
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
    transform: translateY(-2px);
}

.tpms-label {
    color: #00ffaa;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    text-shadow: 0 0 5px rgba(0, 255, 170, 0.5);
}

.tpms-value {
    color: #00d4ff;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.7);
    font-family: 'DS-DIGI', 'Courier New', monospace;
}

.tpms-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 12px;
    color: #00ffaa;
    text-shadow: 0 0 3px rgba(0, 255, 170, 0.5);
}

.tpms-status.warning {
    color: #ffa726;
}

.tpms-status.error {
    color: #ff6b35;
}

/* 电压电流实时数据样式 */
.electricity-data {
    padding: 15px;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 12px;
    align-items: stretch;
    animation: gridFadeIn 0.6s ease-out;
}

@keyframes gridFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.electricity-item {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 80px;
    position: relative;
    overflow: hidden;
    animation: itemSlideIn 0.8s ease-out;
    animation-fill-mode: both;
}

.electricity-item:nth-child(1) { animation-delay: 0.1s; }
.electricity-item:nth-child(2) { animation-delay: 0.2s; }
.electricity-item:nth-child(3) { animation-delay: 0.3s; }
.electricity-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes itemSlideIn {
    from {
        opacity: 0;
        transform: translateX(-30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.electricity-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, rgba(0, 255, 170, 0.05) 100%);
    z-index: 1;
}

.electricity-item > * {
    position: relative;
    z-index: 2;
}

.electricity-item:hover {
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
    transform: translateY(-2px);
    border-color: rgba(0, 212, 255, 0.6);
}

.electricity-label {
    color: #00ffaa;
    font-size: 12px;
    margin-bottom: 8px;
    text-shadow: 0 0 3px rgba(0, 255, 170, 0.5);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.electricity-value {
    color: #00d4ff;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.7);
    font-family: 'DS-DIGI', 'Courier New', monospace;
    animation: glow 2s ease-in-out infinite alternate;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

@keyframes glow {
    from {
        text-shadow: 0 0 8px rgba(0, 212, 255, 0.7);
    }
    to {
        text-shadow: 0 0 15px rgba(0, 212, 255, 1), 0 0 20px rgba(0, 212, 255, 0.8);
    }
}

.electricity-progress {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    height: 6px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff 0%, #00ffaa 50%, #00d4ff 100%);
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* 数据值动画效果 */
.electricity-value {
    position: relative;
}

.electricity-value::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.3), transparent);
    animation: valueScan 3s infinite;
}

@keyframes valueScan {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* 数据状态指示器 */
.electricity-item.high .electricity-value {
    color: #ff6b35;
    text-shadow: 0 0 8px rgba(255, 107, 53, 0.7);
}

.electricity-item.low .electricity-value {
    color: #ffa500;
    text-shadow: 0 0 8px rgba(255, 165, 0, 0.7);
}

.electricity-item.normal .electricity-value {
    color: #00d4ff;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.7);
}

/* 图标样式 */
.electricity-label i {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 5px currentColor;
}

.icon-voltage {
    background: #00ffaa;
}

.icon-current {
    background: #00d4ff;
}

/* 状态文字样式 */
.electricity-status {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: bold;
}

.electricity-status.warning {
    background: rgba(255, 165, 0, 0.3);
    color: #ffa500;
    border: 1px solid rgba(255, 165, 0, 0.5);
}

.electricity-status.danger {
    background: rgba(255, 107, 53, 0.3);
    color: #ff6b35;
    border: 1px solid rgba(255, 107, 53, 0.5);
    animation: statusBlink 1s infinite;
}

@keyframes statusBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.7; }
}

/* 点击效果 */
.electricity-item {
    cursor: pointer;
}

.electricity-item:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
}

/* 响应式网格布局 */
@media (max-width: 1600px) {
    .electricity-data {
        gap: 10px;
        padding: 12px;
    }
    
    .electricity-item {
        padding: 12px;
        min-height: 75px;
    }
    
    .electricity-value {
        font-size: 16px;
    }
}

@media (max-width: 1366px) {
    .electricity-data {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
        gap: 8px;
        padding: 10px;
    }
    
    .electricity-item {
        padding: 10px;
        min-height: 70px;
    }
    
    .electricity-label {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .electricity-value {
        font-size: 15px;
        margin-bottom: 8px;
    }
    
    .electricity-progress {
        height: 5px;
    }
}

/* 功率因数趋势图样式 */
#powerFactorChart {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

/* 温度热力图样式 */
#temperatureHeatmap {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

/* 系统状态指示灯样式 */
.status-indicators {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 20px;
    height: 100%;
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.status-item:hover {
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
    transform: translateY(-1px);
}

.status-item img {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

.status-item span {
    color: #00ffaa;
    font-size: 12px;
    text-shadow: 0 0 3px rgba(0, 255, 170, 0.5);
}

/* 状态指示灯动画 */
.status-normal {
    animation: pulse 2s infinite;
}

.status-warning {
    animation: blink 1s infinite;
}

.status-error {
    animation: blink-fast 0.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0.3;
    }
}

@keyframes blink-fast {
    0%, 25% {
        opacity: 1;
    }
    26%, 50% {
        opacity: 0.3;
    }
    51%, 75% {
        opacity: 1;
    }
    76%, 100% {
        opacity: 0.3;
    }
}

/* ECharts图表通用样式 */
.echarts-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.1);
}

/* 响应式设计 */
@media screen and (max-width: 1920px) {
    .tpms-value {
        font-size: 22px;
    }
    
    .electricity-value {
        font-size: 18px;
    }
    
    .status-item span {
        font-size: 11px;
    }
}

@media screen and (max-width: 1366px) {
    .tpms-value {
        font-size: 20px;
    }
    
    .electricity-value {
        font-size: 16px;
    }
    
    .status-indicators {
        padding: 15px;
    }
    
    .status-item {
        padding: 8px;
    }
    
    .status-item span {
        font-size: 10px;
    }
}

/* 高DPI屏幕适配 */
@media screen and (min-resolution: 2dppx) {
    .tpms-value,
    .electricity-value {
        font-weight: normal;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* 暗色主题优化 */
@media (prefers-color-scheme: dark) {
    .tpms-item,
    .electricity-item,
    .status-item {
        background: rgba(0, 212, 255, 0.15);
        border-color: rgba(0, 212, 255, 0.4);
    }
}

/* 动画性能优化 */
.electricity-value,
.progress-bar,
.status-item {
    will-change: transform, opacity;
}

/* 减少动画以提升性能 */
@media (prefers-reduced-motion: reduce) {
    .electricity-value {
        animation: none;
    }
    
    .progress-bar::after {
        animation: none;
    }
    
    .status-normal,
    .status-warning,
    .status-error {
        animation: none;
    }
    
    .tpms-item:hover,
    .electricity-item:hover,
    .status-item:hover {
        transform: none;
        transition: none;
    }
}