* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
    color: #ffffff;
}

.container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
}

/* 顶部标题栏 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    position: relative;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(0, 162, 255, 0.2);
}

.back-btn {
    background: rgba(0, 162, 255, 0.15);
    border: 1px solid #00a2ff;
    color: #00a2ff;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 0 8px rgba(0, 162, 255, 0.3);
}

.back-btn:hover {
    background: rgba(0, 162, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 162, 255, 0.6);
    transform: translateY(-1px);
}

.title {
    display: flex;
    align-items: center;
    gap: 30px;
    font-size: 25px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 25px rgba(0, 162, 255, 0.8), 0 0 50px rgba(0, 162, 255, 0.4);
    letter-spacing: 2px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.title-line {
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00a2ff 50%, transparent);
    box-shadow: 0 0 15px rgba(0, 162, 255, 1), 0 0 30px rgba(0, 162, 255, 0.5);
    position: relative;
}

.title-line::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #00d4ff 50%, transparent);
    animation: shimmer 2s infinite;
}

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

.title-text {
    white-space: nowrap;
    position: relative;
}

.title-text::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00a2ff, transparent);
    box-shadow: 0 0 10px rgba(0, 162, 255, 0.8);
}

.datetime {
    font-size: 20px;
    color: #00a2ff;
    text-shadow: 0 0 15px rgba(0, 162, 255, 0.8);
    font-weight: 500;
    letter-spacing: 1px;
}

/* 生产信息区域 */
.production-info {
    display: flex;
    justify-content: center;
    gap: 50px;
    padding: 18px 30px;
    flex-shrink: 0;
    background: rgba(0, 162, 255, 0.08);
    border: 1px solid rgba(0, 162, 255, 0.25);
    border-left: none;
    border-right: none;
    backdrop-filter: blur(10px);
    margin: 0;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-label {
    color: #00a2ff;
    font-size: 14px;
    font-weight: 500;
}

.info-value {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* 四宫格视频区域 */
.video-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 15px;
    width: 100%;
    height: 100%;
    flex: 1;
    padding: 15px;
    overflow: hidden;
}

.video-panel {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(0, 162, 255, 0.35);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 25px rgba(0, 162, 255, 0.25), inset 0 0 30px rgba(0, 162, 255, 0.05);
    transition: all 0.3s ease;
}

.video-panel:hover {
    border-color: rgba(0, 162, 255, 0.6);
    box-shadow: 0 0 30px rgba(0, 162, 255, 0.4);
    transform: translateY(-2px);
}

.panel-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    padding: 12px 18px;
    z-index: 10;
    border-bottom: 1px solid rgba(0, 162, 255, 0.2);
}

.panel-header h3 {
    font-size: 16px;
    color: #00a2ff;
    text-shadow: 0 0 12px rgba(0, 162, 255, 0.9);
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.video-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.video-container video,
.video-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    z-index: 1;
}

/* video2 全屏显示样式 */
#video2 {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 2 !important;
}

/* 尝试通过 CSS 设置 iframe 内部 img 样式（如果同源） */
#video2 img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: cover !important;
}

/* video2 的容器确保没有额外空间 */
.video-panel:has(#video2) .video-container,
.video-panel .video-container:has(#video2) {
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

/* 确保 video2 的父容器也是全屏 */
.video-panel:has(#video2) {
    overflow: hidden;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
}

.overlay-content {
    text-align: center;
    padding: 20px;
}

.overlay-text {
    color: #00a2ff;
    font-size: 14px;
    margin: 5px 0;
    text-shadow: 0 0 10px rgba(0, 162, 255, 0.8);
}

.overlay-value {
    color: #ffffff;
    font-size: 48px;
    font-weight: bold;
    margin: 10px 0;
    text-shadow: 0 0 20px rgba(0, 162, 255, 0.8);
}

.overlay-value-large {
    color: #ff6b00;
    font-size: 56px;
    font-weight: bold;
    margin: 10px 0;
    text-shadow: 0 0 20px rgba(255, 107, 0, 0.8);
}

.overlay-progress {
    margin-top: 20px;
}

.progress-bar {
    width: 200px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00a2ff, #00d4ff);
    box-shadow: 0 0 10px rgba(0, 162, 255, 0.8);
    transition: width 0.3s ease;
}

.progress-text {
    color: #00a2ff;
    font-size: 16px;
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 1600px) {
    .title {
        font-size: 25px;
    }
    
    .title-line {
        width: 100px;
    }
    
    .datetime {
        font-size: 18px;
    }
}

@media (max-width: 1200px) {
    .header {
        padding: 20px 30px;
    }
    
    .title {
        font-size: 32px;
    }
    
    .title-line {
        width: 80px;
    }
    
    .production-info {
        gap: 30px;
        padding: 15px 20px;
    }
    
    .video-grid {
        gap: 12px;
        padding: 12px;
    }
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }
    
    .title {
        position: static;
        transform: none;
        font-size: 28px;
    }
    
    .production-info {
        flex-direction: column;
        gap: 12px;
        padding: 12px 15px;
    }
    
    .overlay-value {
        font-size: 36px;
    }
    
    .overlay-value-large {
        font-size: 42px;
    }
}

/* 加载动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.video-container::before {
    /* content: '加载中...'; */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #00a2ff;
    font-size: 18px;
    z-index: 1;
    animation: pulse 2s infinite;
    pointer-events: none;
}

.video-container video.loaded ~ .video-container::before {
    display: none;
}

