/* ====== Video.js自定义样式 ====== */
/* 覆盖Video.js默认样式 */
/* /var/www/naoneng/app/static/css/video-js-custom.css */
/* 版本: 2.0.3 | 修复: 移除冲突的transform样式，修复视频居中问题 */

.video-js {
    width: 100%;
    height: 100%; 
    background-color: #000;
    overflow: hidden;
    font-family: "PingFang SC", "Helvetica Neue", Arial, sans-serif;        
    display: block !important;
    margin: 0 auto !important;
	position: relative;
}

/* 大播放按钮 */
.vjs-big-play-button {
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    line-height: 60px;
    font-size: 24px;
    color: #000;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.2s, background-color 0.2s;
    z-index: 10;
}

.vjs-big-play-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background-color: rgba(255, 255, 255, 1);
}

.vjs-big-play-button .vjs-icon-placeholder:before {
    line-height: 60px;
}

/* 控制条 */
.vjs-control-bar {
    background: rgba(0, 0, 0, 0.7);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    height: 40px;
    font-size: 12px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    z-index: 5;
}

/* 进度条 */
.vjs-progress-control {
    flex: 1;
    margin: 0 10px;
    height: 6px;
    min-width: 60px;
}

.vjs-progress-holder {
    height: 6px;
    margin: 0;
    border-radius: 3px;
    background-color: rgba(255, 255, 255, 0.2);
}

.vjs-play-progress {
    background-color: #007aff;
    border-radius: 3px;
}

.vjs-load-progress {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.vjs-slider {
    background-color: rgba(255, 255, 255, 0.2);
}

.vjs-play-progress:before {
    font-size: 12px;
    top: -3px;
}

/* 按钮样式 */
.vjs-button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.vjs-button:hover {
    color: #fff;
}

.vjs-button > .vjs-icon-placeholder:before {
    line-height: 32px;
    font-size: 18px;
}

/* 播放/暂停按钮 */
.vjs-play-control {
    order: 1;
}

/* 音量控制 */
.vjs-volume-panel {
    order: 2;
    margin-right: 10px;
}

.vjs-volume-bar {
    height: 6px;
    margin: 13px 0;
    width: 60px;
}

.vjs-volume-level {
    background-color: rgba(255, 255, 255, 0.8);
}

/* 当前时间 */
.vjs-current-time {
    order: 3;
    margin: 0 5px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

/* 时间分隔符 */
.vjs-time-divider {
    order: 4;
    margin: 0 2px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* 总时长 */
.vjs-duration {
    order: 5;
    margin: 0 5px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

/* 全屏按钮 */
.vjs-fullscreen-control {
    order: 6;
    margin-right: 0;
}

/* 隐藏不需要的组件 */
.vjs-remaining-time,
.vjs-playback-rate,
.vjs-chapters-button,
.vjs-descriptions-button,
.vjs-subtitles-button,
.vjs-captions-button,
.vjs-audio-button,
.vjs-picture-in-picture-control {
    display: none;
}

/* 鼠标悬停时显示控制条 */
.video-js:hover .vjs-control-bar {
    opacity: 1;
    visibility: visible;
}

/* === 关键修复：移除冲突的transform样式 === */
/* 让Video.js自行控制视频元素布局 */
.vjs-tech {    
    width: 100% !important;
    height: 100% !important;
	position: absolute;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
}

/* === 修复视频居中问题 === */
/* 确保视频流容器正确居中内容 */
.video-feed-container {
    width: 100%;
    height: 100%;
    background-color: #000;
    position: relative;  /* 添加相对定位 */
}

.video-item {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .vjs-control-bar {
        height: 36px;
        font-size: 11px;
        padding: 0 8px;
    }
    
    .vjs-big-play-button {
        width: 50px;
        height: 50px;
        line-height: 50px;
        font-size: 20px;
    }
    
    .vjs-big-play-button .vjs-icon-placeholder:before {
        line-height: 50px;
    }
    
    .vjs-button {
        width: 28px;
        height: 28px;
    }
    
    .vjs-button > .vjs-icon-placeholder:before {
        line-height: 28px;
        font-size: 16px;
    }
    
    .vjs-volume-bar {
        width: 50px;
    }
    
    .vjs-current-time,
    .vjs-time-divider,
    .vjs-duration {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .vjs-control-bar {
        height: 32px;
        font-size: 10px;
        padding: 0 6px;
    }
    
    .vjs-big-play-button {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 16px;
    }
    
    .vjs-big-play-button .vjs-icon-placeholder:before {
        line-height: 40px;
    }
    
    .vjs-button {
        width: 24px;
        height: 24px;
    }
    
    .vjs-button > .vjs-icon-placeholder:before {
        line-height: 24px;
        font-size: 14px;
    }
    
    .vjs-volume-bar {
        width: 40px;
    }
    
    .vjs-current-time,
    .vjs-time-divider,
    .vjs-duration {
        font-size: 10px;
    }
    
    /* 小屏幕隐藏时间分隔符 */
    .vjs-time-divider {
        display: none;
    }
    
    .vjs-current-time,
    .vjs-duration {
        margin: 0 2px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .vjs-control-bar {
        opacity: 1;
        visibility: visible;
    }
    
    .vjs-volume-panel {
        margin-right: 5px;
    }
    
    .vjs-volume-bar {
        width: 40px;
    }
}