/* 钢卷生产数据大屏样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Arial', sans-serif;
    background: linear-gradient(135deg, #0c1426 0%, #1a2332 50%, #0f1419 100%);
    color: #ffffff;
    overflow-x: hidden;
    overflow-y: auto;
    height: 100vh;
    margin: 0;
    padding: 0;
}

.dashboard {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: 
        radial-gradient(circle at 20% 20%, rgba(13, 110, 253, 0.1) 0%, transparent 70%),
        radial-gradient(circle at 80% 80%, rgba(220, 53, 69, 0.1) 0%, transparent 70%),
        radial-gradient(circle at 40% 70%, rgba(25, 135, 84, 0.1) 0%, transparent 70%);
}

/* 顶部标题栏 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-bottom: 2px solid rgba(64, 224, 255, 0.3);
    backdrop-filter: blur(10px);
}

.logo h1 {
    font-size: 28px;
    font-weight: 600;
    background: linear-gradient(135deg, #40e0ff 0%, #00d4aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(64, 224, 255, 0.5);
}

.current-time {
    font-size: 16px;
    color: #8fa9d4;
    margin-top: 5px;
}

.status-indicators {
    display: flex;
    gap: 30px;
    align-items: center;
}

/* 全屏控制按钮 */
.fullscreen-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    margin-left: 10px;
}

.fullscreen-btn:hover {
    background: rgba(64, 224, 255, 0.2);
    border-color: rgba(64, 224, 255, 0.4);
    transform: translateY(-1px);
}

.fullscreen-btn:active {
    transform: translateY(0);
}

.fullscreen-icon {
    display: inline-block;
    font-size: 14px;
}

/* 全屏模式样式 */
.fullscreen-mode {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1f2e 100%) !important;
}

.fullscreen-mode .header {
    padding: 8px 20px !important;
    min-height: auto !important;
}

.fullscreen-mode .logo h1 {
    font-size: 24px !important;
}

.fullscreen-mode .main-content {
    height: calc(100vh - 70px) !important;
    padding: 10px !important;
}

.fullscreen-mode .left-panel,
.fullscreen-mode .center-panel,
.fullscreen-mode .right-panel {
    max-height: calc(100vh - 90px) !important;
}

.fullscreen-mode .chart-card {
    margin-bottom: 8px !important;
}

.fullscreen-mode .center-panel .chart-card:not(.coil-production-overview) {
    height: calc(100vh - 450px) !important;
    min-height: 400px !important;
}

.fullscreen-mode .footer {
    padding: 5px 20px !important;
    font-size: 12px !important;
}

/* 全屏模式无缩放，保持原始尺寸 */

.indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #8fa9d4;
}

.indicator .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6c757d;
    animation: pulse 2s infinite;
}

.indicator.online .dot {
    background: #28a745;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.8);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* 主要内容区域 */
.main-content {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 20px;
    padding: 20px 30px;
    flex: 1;
    min-height: 0;
}

/* 统计卡片样式 */
.stat-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(64, 224, 255, 0.3);
}

.stat-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #40e0ff;
    border-left: 3px solid #40e0ff;
    padding-left: 10px;
}

/* 生产统计网格 */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.02);
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #8fa9d4;
    margin-bottom: 8px;
}

.stat-trend {
    font-size: 12px;
    font-weight: 600;
}

.stat-trend.up {
    color: #28a745;
}

.stat-trend.down {
    color: #dc3545;
}

/* 设备状态列表 */
.equipment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.equipment-item {
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.equipment-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.equipment-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.equipment-name {
    font-weight: 600;
    color: #ffffff;
}

.equipment-status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.equipment-status.running {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.equipment-status.maintenance {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.equipment-metrics {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #8fa9d4;
}

/* 图表卡片 */
.chart-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    height: 400px;
}

.chart-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #40e0ff;
    border-left: 3px solid #40e0ff;
    padding-left: 10px;
}

.chart-container {
    height: calc(100% - 50px);
    width: 100%;
}

/* 左侧面板质量分析图样式 */
.left-panel .quality-analysis {
    height: 350px;
}

.left-panel .quality-analysis .chart-container {
    height: calc(100% - 60px);
}

.left-panel .quality-analysis h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

/* 中央面板24小时产量趋势图增大 */
.center-panel .chart-card:not(.coil-production-overview) {
    height: 500px; /* 从原来的400px增加到500px */
}

.center-panel .chart-card:not(.coil-production-overview) h3 {
    font-size: 20px;
    margin-bottom: 18px;
}

/* 当前钢卷信息 */
.coil-info {
    text-align: center;
}

.coil-id {
    font-size: 20px;
    font-weight: bold;
    color: #40e0ff;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(64, 224, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(64, 224, 255, 0.2);
}

.spec-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.spec-label {
    color: #8fa9d4;
    font-size: 14px;
}

.spec-value {
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-top: 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #40e0ff 0%, #00d4aa 100%);
    border-radius: 4px;
    animation: progress-glow 2s infinite;
}

@keyframes progress-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(64, 224, 255, 0.5); }
    50% { box-shadow: 0 0 15px rgba(64, 224, 255, 0.8); }
}

/* 温度监控 */
.temperature-chart {
    height: 200px;
}

/* 警报列表 */
.alert-list {
    max-height: 250px;
    overflow-y: auto;
}

.alert-item {
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 6px;
    border-left: 3px solid;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
}

.alert-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(3px);
}

.alert-item.warning {
    border-left-color: #ffc107;
    background: rgba(255, 193, 7, 0.05);
}

.alert-item.info {
    border-left-color: #17a2b8;
    background: rgba(23, 162, 184, 0.05);
}

.alert-item.normal {
    border-left-color: #28a745;
    background: rgba(40, 167, 69, 0.05);
}

.alert-time {
    font-size: 11px;
    color: #8fa9d4;
    margin-bottom: 4px;
}

.alert-message {
    font-size: 12px;
    color: #ffffff;
    line-height: 1.4;
}

/* 底部状态栏 */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.footer-stats {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #8fa9d4;
}

.footer-info {
    font-size: 12px;
    color: #6c757d;
}

/* 左右面板样式 */
.left-panel,
.right-panel {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 180px);
    scrollbar-width: thin;
    scrollbar-color: rgba(64, 224, 255, 0.3) transparent;
    padding-right: 5px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.left-panel::-webkit-scrollbar,
.right-panel::-webkit-scrollbar,
.center-panel::-webkit-scrollbar {
    width: 4px;
}

.left-panel::-webkit-scrollbar-track,
.right-panel::-webkit-scrollbar-track,
.center-panel::-webkit-scrollbar-track {
    background: transparent;
}

.left-panel::-webkit-scrollbar-thumb,
.right-panel::-webkit-scrollbar-thumb,
.center-panel::-webkit-scrollbar-thumb {
    background: rgba(64, 224, 255, 0.3);
    border-radius: 2px;
}

.left-panel::-webkit-scrollbar-thumb:hover,
.right-panel::-webkit-scrollbar-thumb:hover,
.center-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(64, 224, 255, 0.5);
}

/* 中央面板样式 */
.center-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 180px);
    scrollbar-width: thin;
    scrollbar-color: rgba(64, 224, 255, 0.3) transparent;
    padding-right: 5px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* 钢卷生产情况板块 */
.coil-production-overview {
    height: 350px;
    flex-shrink: 0;
}

/* 确保所有统计卡片可以收缩 */
.stat-card {
    flex-shrink: 0;
}

.coil-production-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    height: calc(100% - 50px);
}

/* 生产线状态 */
.production-lines {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.production-line {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.production-line:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(3px);
}

.production-line.running {
    border-left-color: #28a745;
}

.production-line.maintenance {
    border-left-color: #ffc107;
}

.line-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.line-name {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.line-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.line-status.running {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.line-status.maintenance {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

/* 钢卷队列 */
.coil-queue {
    display: flex;
    gap: 10px;
    align-items: center;
}

.coil-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    min-width: 80px;
    transition: all 0.3s ease;
    position: relative;
}

.coil-item.active {
    background: linear-gradient(135deg, rgba(64, 224, 255, 0.2) 0%, rgba(0, 212, 170, 0.2) 100%);
    border: 1px solid rgba(64, 224, 255, 0.4);
    animation: activeCoilPulse 2s infinite;
}

.coil-item.waiting {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.coil-item.paused {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.4);
    animation: pausedCoilBlink 3s infinite;
}

.coil-item.completed {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.4);
}

.coil-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@keyframes activeCoilPulse {
    0%, 100% { box-shadow: 0 0 5px rgba(64, 224, 255, 0.5); }
    50% { box-shadow: 0 0 15px rgba(64, 224, 255, 0.8); }
}

@keyframes pausedCoilBlink {
    0%, 60%, 100% { opacity: 1; }
    30% { opacity: 0.6; }
}

.coil-code {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.coil-progress {
    font-size: 11px;
    color: #40e0ff;
    font-weight: 600;
}

.coil-status {
    font-size: 11px;
    color: #8fa9d4;
}

/* 维护信息 */
.maintenance-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #8fa9d4;
    font-size: 13px;
}

.maintenance-info span {
    padding: 6px 10px;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 4px;
    border-left: 3px solid #ffc107;
}

/* 钢卷规格统计 */
.coil-specs-stats {
    display: flex;
    flex-direction: column;
}

.coil-specs-stats h4 {
    font-size: 14px;
    color: #40e0ff;
    margin-bottom: 10px;
    border-left: 3px solid #40e0ff;
    padding-left: 8px;
}

.specs-chart {
    flex: 1;
    min-height: 200px;
}

/* 生产线状态指示器 */
.production-line::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    border-radius: 2px;
}

.production-line.running::before {
    background: #28a745;
    animation: runningIndicator 1.5s infinite;
}

.production-line.maintenance::before {
    background: #ffc107;
    animation: maintenanceIndicator 2s infinite;
}

@keyframes runningIndicator {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes maintenanceIndicator {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* 钢卷流动动画 */
.coil-queue::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid rgba(64, 224, 255, 0.6);
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    animation: flowArrow 2s infinite;
}

@keyframes flowArrow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 1400px) {
    .main-content {
        grid-template-columns: 280px 1fr 280px;
    }
    
    .header .logo h1 {
        font-size: 24px;
    }
    
    .stat-value {
        font-size: 20px;
    }
}

@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 250px 1fr 250px;
        gap: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-card {
        height: 350px;
    }
}

/* 动画效果 */
.stat-card,
.chart-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 数据闪烁效果 */
.stat-value {
    animation: dataUpdate 3s infinite;
}

@keyframes dataUpdate {
    0%, 90%, 100% { opacity: 1; }
    95% { opacity: 0.7; }
}

/* 设备状态指示灯 */
.equipment-item {
    position: relative;
}

.equipment-item.running {
    border-left-color: #28a745;
}

.equipment-item.maintenance {
    border-left-color: #ffc107;
}

.equipment-item.error {
    border-left-color: #dc3545;
}

/* 图表容器样式优化 */
.chart-container {
    position: relative;
    overflow: hidden;
}

/* 实时数据更新指示 */
.data-updating {
    animation: pulse 1s infinite;
}

/* 警报闪烁效果 */
.alert-item.warning {
    animation: warningBlink 2s infinite;
}

@keyframes warningBlink {
    0%, 50%, 100% { background: rgba(255, 193, 7, 0.05); }
    25%, 75% { background: rgba(255, 193, 7, 0.15); }
}

/* ============================== 响应式设计 ============================== */

/* 性能优化 */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 允许文本选择的元素 */
.alert-message,
.coil-code,
.detail-value,
.stat-value {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* 大屏幕优化 (1200px+) */
@media screen and (min-width: 1200px) {
    .main-content {
        max-width: 1400px;
        margin: 0 auto;
    }
    
    .chart-container {
        height: 350px;
    }
    
    .stat-cards {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 平板设备 (768px - 1024px) */
@media screen and (max-width: 1024px) {
    .header {
        padding: 15px 20px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .logo h1 {
        font-size: 24px;
    }
    
    .current-time {
        font-size: 14px;
    }
    
    .main-content {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .left-panel, .center-panel, .right-panel {
        width: 100%;
        max-height: none;
        padding: 15px;
    }
    
    .chart-container {
        height: 250px;
    }
    
    /* 平板设备上左侧面板质量分析图 */
    .left-panel .quality-analysis {
        height: 280px;
    }
    
    .left-panel .quality-analysis .chart-container {
        height: 220px;
    }
    
    /* 平板设备上中央面板产量趋势图 */
    .center-panel .chart-card:not(.coil-production-overview) {
        height: 400px;
    }
    
    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .equipment-list {
        grid-template-columns: 1fr;
    }
    
    .production-lines {
        flex-direction: column;
        gap: 15px;
    }
    
    .production-line {
        min-width: auto;
    }
    
    .footer {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .footer-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-stats .stat-item {
        flex: none;
        width: 100%;
    }
}

/* 小平板设备 (481px - 768px) */
@media screen and (max-width: 768px) and (min-width: 481px) {
    .header {
        padding: 12px 18px;
    }
    
    .logo h1 {
        font-size: 22px;
    }
    
    .main-content {
        padding: 12px;
        gap: 12px;
    }
    
    .chart-container {
        height: 220px;
    }
    
    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .production-lines {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* 手机设备 (最大 768px) */
@media screen and (max-width: 768px) {
    body {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .dashboard {
        height: auto;
        min-height: 100vh;
    }
    
    .header {
        padding: 10px 15px;
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .logo h1 {
        font-size: 20px;
        margin-bottom: 5px;
    }
    
    .current-time {
        font-size: 12px;
    }
    
    .main-content {
        padding: 10px;
        gap: 10px;
    }
    
    .left-panel, .center-panel, .right-panel {
        padding: 10px;
        border-radius: 8px;
    }
    
    .chart-card {
        margin-bottom: 15px;
        padding: 12px;
    }
    
    .chart-card h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .chart-container {
        height: 200px;
    }
    
    /* 移动设备上左侧面板质量分析图 */
    .left-panel .quality-analysis {
        height: 250px;
    }
    
    .left-panel .quality-analysis .chart-container {
        height: 180px;
    }
    
    .stat-cards {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-title {
        font-size: 12px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .stat-trend {
        font-size: 10px;
    }
    
    .equipment-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .equipment-item {
        padding: 10px;
    }
    
    .equipment-name {
        font-size: 14px;
    }
    
    .equipment-details span {
        font-size: 11px;
        margin: 2px 0;
        display: block;
    }
    
    .coil-production-overview {
        padding: 12px;
    }
    
    .production-lines {
        flex-direction: column;
        gap: 10px;
    }
    
    .production-line {
        padding: 10px;
        min-width: auto;
    }
    
    .line-name {
        font-size: 14px;
    }
    
    .line-status {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    .coil-item {
        padding: 6px 8px;
        margin: 3px 0;
    }
    
    .coil-code {
        font-size: 11px;
    }
    
    .coil-progress {
        font-size: 10px;
    }
    
    .coil-specs-stats {
        margin-top: 15px;
    }
    
    .specs-chart {
        height: 180px;
    }
    
    .current-production {
        padding: 12px;
    }
    
    .current-coil {
        padding: 10px;
    }
    
    .coil-id {
        font-size: 14px;
    }
    
    .coil-details .detail-item {
        padding: 8px 0;
    }
    
    .detail-label {
        font-size: 11px;
    }
    
    .detail-value {
        font-size: 13px;
    }
    
    .progress-container {
        margin: 8px 0;
    }
    
    .progress-text {
        font-size: 11px;
    }
    
    .system-alerts {
        padding: 12px;
    }
    
    .alert-item {
        padding: 8px 10px;
        margin-bottom: 8px;
    }
    
    .alert-time {
        font-size: 10px;
    }
    
    .alert-message {
        font-size: 12px;
        margin-top: 3px;
    }
    
    .footer {
        padding: 10px 15px;
        flex-direction: column;
        gap: 8px;
    }
    
    .footer-stats {
        flex-direction: column;
        gap: 8px;
    }
    
    .footer-stats .stat-item {
        padding: 8px;
        text-align: center;
    }
    
    .footer-stats .stat-label {
        font-size: 11px;
    }
    
    .footer-stats .stat-value {
        font-size: 14px;
    }
    
    /* 滚动条优化 */
    .left-panel::-webkit-scrollbar,
    .center-panel::-webkit-scrollbar,
    .right-panel::-webkit-scrollbar {
        width: 6px;
    }
    
    .left-panel::-webkit-scrollbar-thumb,
    .center-panel::-webkit-scrollbar-thumb,
    .right-panel::-webkit-scrollbar-thumb {
        border-radius: 3px;
    }
}

/* 超小屏幕设备 (321px - 480px) */
@media screen and (max-width: 480px) and (min-width: 321px) {
    .header {
        padding: 8px 12px;
    }
    
    .logo h1 {
        font-size: 18px;
    }
    
    .main-content {
        padding: 8px;
        gap: 8px;
    }
    
    .chart-container {
        height: 160px;
    }
    
    .stat-cards {
        gap: 8px;
    }
    
    .production-lines {
        gap: 8px;
    }
}

/* 极小屏幕设备 (最大 320px) */
@media screen and (max-width: 320px) {
    .header {
        padding: 6px 8px;
    }
    
    .logo h1 {
        font-size: 16px;
        line-height: 1.2;
    }
    
    .current-time {
        font-size: 10px;
    }
    
    .main-content {
        padding: 6px;
        gap: 6px;
    }
    
    .left-panel, .center-panel, .right-panel {
        padding: 6px;
        border-radius: 6px;
    }
    
    .chart-card {
        padding: 6px;
        margin-bottom: 8px;
    }
    
    .chart-card h3 {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .chart-container {
        height: 140px;
    }
    
    .stat-card {
        padding: 6px;
        border-radius: 6px;
    }
    
    .stat-title {
        font-size: 10px;
    }
    
    .stat-value {
        font-size: 14px;
        line-height: 1.2;
    }
    
    .stat-trend {
        font-size: 9px;
    }
    
    .equipment-item {
        padding: 6px;
        border-radius: 6px;
    }
    
    .equipment-name {
        font-size: 12px;
    }
    
    .equipment-details span {
        font-size: 10px;
        margin: 1px 0;
    }
    
    .production-line {
        padding: 6px;
        border-radius: 6px;
    }
    
    .line-name {
        font-size: 12px;
    }
    
    .line-status {
        font-size: 9px;
        padding: 2px 6px;
    }
    
    .coil-item {
        padding: 3px 5px;
        margin: 1px 0;
        border-radius: 4px;
        min-height: 36px;
    }
    
    .coil-code {
        font-size: 10px;
    }
    
    .coil-progress {
        font-size: 9px;
    }
    
    .specs-chart {
        height: 120px;
    }
    
    .current-coil {
        padding: 6px;
    }
    
    .coil-id {
        font-size: 12px;
    }
    
    .detail-item {
        padding: 4px 0;
    }
    
    .detail-label {
        font-size: 9px;
    }
    
    .detail-value {
        font-size: 11px;
    }
    
    .progress-bar {
        height: 4px;
    }
    
    .progress-text {
        font-size: 9px;
    }
    
    .alert-item {
        padding: 4px 6px;
        margin-bottom: 4px;
        border-radius: 4px;
    }
    
    .alert-time {
        font-size: 8px;
    }
    
    .alert-message {
        font-size: 10px;
        margin-top: 2px;
    }
    
    .footer {
        padding: 6px 8px;
    }
    
    .footer-stats .stat-item {
        padding: 4px;
    }
    
    .footer-stats .stat-label {
        font-size: 9px;
    }
    
    .footer-stats .stat-value {
        font-size: 12px;
    }
}

/* 横屏模式优化 */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .dashboard {
        height: auto;
        min-height: 100vh;
    }
    
    .header {
        padding: 6px 15px;
        flex-direction: row;
        justify-content: space-between;
    }
    
    .logo h1 {
        font-size: 16px;
    }
    
    .current-time {
        font-size: 11px;
    }
    
    .main-content {
        flex-direction: row;
        padding: 6px;
        gap: 6px;
    }
    
    .left-panel, .center-panel, .right-panel {
        width: 33.33%;
        max-height: calc(100vh - 100px);
        padding: 8px;
    }
    
    .chart-container {
        height: 150px;
    }
    
    .stat-cards {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .stat-card {
        padding: 6px;
    }
    
    .production-lines {
        flex-direction: row;
        gap: 8px;
    }
    
    .production-line {
        flex: 1;
        min-width: 0;
    }
    
    .equipment-list {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .footer {
        padding: 4px 15px;
    }
    
    .footer-stats {
        flex-direction: row;
        gap: 10px;
    }
}

/* 超宽屏横屏模式 (高度极小) */
@media screen and (max-height: 400px) and (orientation: landscape) {
    .header {
        padding: 4px 10px;
    }
    
    .logo h1 {
        font-size: 14px;
    }
    
    .current-time {
        font-size: 10px;
    }
    
    .main-content {
        padding: 4px;
        gap: 4px;
    }
    
    .left-panel, .center-panel, .right-panel {
        padding: 6px;
        max-height: calc(100vh - 80px);
    }
    
    .chart-container {
        height: 120px;
    }
    
    .chart-card {
        padding: 4px;
        margin-bottom: 4px;
    }
    
    .chart-card h3 {
        font-size: 12px;
        margin-bottom: 4px;
    }
    
    .footer {
        padding: 2px 10px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    /* 触摸反馈动画 */
    .stat-card,
    .equipment-item,
    .coil-item,
    .alert-item,
    .chart-card {
        transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
        cursor: pointer;
    }
    
    .stat-card:active,
    .equipment-item:active,
    .coil-item:active,
    .alert-item:active,
    .chart-card:active {
        transform: scale(0.97);
        box-shadow: 0 4px 12px rgba(64, 224, 255, 0.2);
        background-color: rgba(64, 224, 255, 0.05);
    }
    
    /* 增大触摸目标 */
    .coil-item {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 12px;
    }
    
    .equipment-item {
        min-height: 64px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .stat-card {
        min-height: 85px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
    
    .alert-item {
        min-height: 50px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    /* 触摸滚动优化 */
    .left-panel,
    .center-panel,
    .right-panel {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        overscroll-behavior: contain;
    }
    
    /* 防止意外选择 */
    .chart-container,
    .progress-bar,
    .progress-fill {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
}

/* 高密度屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .progress-bar {
        border: 0.5px solid rgba(64, 224, 255, 0.3);
    }
    
    .chart-card,
    .stat-card,
    .equipment-item {
        border-width: 0.5px;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #0a1220 0%, #161e2a 50%, #0d1317 100%);
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .activeCoilPulse,
    .flowArrow,
    .warningBlink {
        animation: none !important;
    }
}

/* 节能模式优化 */
@media (prefers-reduced-motion: reduce) {
    .chart-container {
        opacity: 0.9;
    }
    
    .glassmorphism {
        backdrop-filter: none;
        background: rgba(255, 255, 255, 0.1);
    }
}

/* 移动设备专用样式 */
.mobile-device {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 低性能设备优化 */
.low-performance * {
    transition: none !important;
    animation: none !important;
}

.low-performance .glassmorphism {
    backdrop-filter: none;
    background: rgba(255, 255, 255, 0.08);
}

/* 上下文菜单样式 */
.context-menu {
    font-family: 'Microsoft YaHei', 'Arial', sans-serif;
    font-size: 14px;
    border: 1px solid rgba(64, 224, 255, 0.3);
    backdrop-filter: blur(10px);
    animation: menuFadeIn 0.2s ease-out;
}

.context-menu .menu-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.context-menu .menu-item:last-child {
    border-bottom: none;
}

.context-menu .menu-item:hover,
.context-menu .menu-item:active {
    background-color: rgba(64, 224, 255, 0.2);
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 硬件加速优化 */
.chart-container,
.stat-card,
.production-line,
.equipment-item {
    transform: translateZ(0);
    will-change: transform;
}

/* 滑动指示器 */
.swipe-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(64, 224, 255, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.swipe-indicator.show {
    opacity: 1;
}

/* 面板切换动画 */
.panel-transition {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 触摸反馈增强 */
@media (hover: none) and (pointer: coarse) {
    .context-menu .menu-item:active {
        background-color: rgba(64, 224, 255, 0.3);
        transform: scale(0.98);
    }
    
    /* 增强触摸目标 */
    .stat-card,
    .equipment-item,
    .coil-item {
        position: relative;
    }
    
    .stat-card::after,
    .equipment-item::after,
    .coil-item::after {
        content: '';
        position: absolute;
        top: -5px;
        left: -5px;
        right: -5px;
        bottom: -5px;
        z-index: -1;
    }
}

/* PWA 支持 */
@media all and (display-mode: standalone) {
    .header {
        padding-top: env(safe-area-inset-top, 20px);
    }
    
    .main-content {
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
}