/**
 * 审核面板 - 视频播放器扩展样式（自 style.css 迁出）
 * 含：视频预览壳、range 滑块、全屏、视频名称、#videoPlayer、控制栏、进度条
 * 字体：Microsoft YaHei
 */

/* 视频播放器样式 */
.video-preview-modal {
    backdrop-filter: blur(8px);
}

.video-player-container input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

.video-player-container input[type="range"]::-webkit-slider-track {
    background: rgba(255, 255, 255, 0.3);
    height: 4px;
    border-radius: 2px;
}

.video-player-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background: var(--text-accent);
    height: 12px;
    width: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.video-player-container input[type="range"]::-webkit-slider-thumb:hover {
    background: #ffffff;
    transform: scale(1.2);
}

.video-player-container input[type="range"]::-moz-range-track {
    background: rgba(255, 255, 255, 0.3);
    height: 4px;
    border-radius: 2px;
    border: none;
}

.video-player-container input[type="range"]::-moz-range-thumb {
    background: var(--text-accent);
    height: 12px;
    width: 12px;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.video-player-container input[type="range"]::-moz-range-thumb:hover {
    background: #ffffff;
    transform: scale(1.2);
}

/* 视频控制栏动画 */
.video-controls-container {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 全屏状态下的样式调整 */
.video-player-container:fullscreen {
    background: #000;
    width: 100vw !important;
    height: 100vh !important;
}

.video-player-container:fullscreen .video-controls-container {
    padding: 30px 20px 20px;
}

.video-player-container:fullscreen video {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    object-fit: contain;
}

/* 视频容器响应式调整 */
.video-preview-content {
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                height 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* 确保视频在不同比例下都能正确显示 */
.video-player-container video {
    display: block;
    margin: 0 auto;
}

/* 视频名称显示 - 左上角 */
.video-name-display {
    position: absolute;
    top: 15px;
    left: 15px;
    transform: translateY(-10px);
    background: rgba(0, 0, 0, 0.8);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
    font-weight: 500;
    z-index: 100;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    max-width: calc(100% - 30px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    text-align: left;
}

.video-name-display.show {
    opacity: 1;
    transform: translateY(0);
}

.video-name-text {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.3;
    text-align: left;
}

/* 对比模式下的视频名称显示调整 */
.compare-video-name {
    top: 10px;
    left: 10px;
    transform: translateY(-10px);
    font-size: 11px;
    padding: 6px 10px;
    max-width: calc(100% - 20px);
    text-align: left;
}

.compare-video-name.show {
    opacity: 1;
    transform: translateY(0);
}

.compare-video-section:hover .video-name-display {
    opacity: 1;
    transform: translateY(0);
}

.video-container:hover .video-name-display {
    opacity: 1;
    transform: translateY(0);
}

.video-container.title-manually-hidden:hover .video-name-display {
    opacity: 0 !important;
    transform: translateY(-10px) !important;
}

.video-container:fullscreen .video-name-display,
.video-container:-webkit-full-screen .video-name-display,
.video-container:-moz-full-screen .video-name-display,
.video-container:-ms-fullscreen .video-name-display {
    position: fixed;
    top: 20px;
    left: 20px;
    transform: none;
    z-index: 9999;
}

#videoPlayer {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
    object-fit: contain;
    -webkit-media-controls: none;
    -webkit-media-controls-panel: none;
    -webkit-media-controls-play-button: none;
    -webkit-media-controls-timeline: none;
    -webkit-media-controls-current-time-display: none;
    -webkit-media-controls-time-remaining-display: none;
    -webkit-media-controls-mute-button: none;
    -webkit-media-controls-volume-slider: none;
    -webkit-media-controls-fullscreen-button: none;
    -webkit-media-controls-download-button: none;
    -webkit-media-controls-cast-button: none;
    -webkit-media-controls-overlay-play-button: none;
    -webkit-media-controls-overlay-enclosure: none;
    pointer-events: auto;
}

#videoPlayer:fullscreen {
    object-fit: contain !important;
    width: 100vw !important;
    height: 100vh !important;
}

.video-container:fullscreen {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #000 !important;
}
.video-container:fullscreen video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

.video-container:-webkit-full-screen {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #000 !important;
}
.video-container:-webkit-full-screen video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

.video-container:-moz-full-screen {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #000 !important;
}
.video-container:-moz-full-screen video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

.video-container:-ms-fullscreen {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #000 !important;
}
.video-container:-ms-fullscreen video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

/* 固定的视频控制栏 */
.video-controls-bar {
    background: var(--bg-card);
    border-top: 1px solid var(--border-primary);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    overflow: visible;
}

.custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 16px 20px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-container:hover .custom-controls {
    opacity: 1;
}

.control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

#playPauseBtn,
#playPauseBtn1,
#playPauseBtn2 {
    min-width: 40px;
    width: 40px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#playPauseBtn:hover,
#playPauseBtn1:hover,
#playPauseBtn2:hover {
    transform: scale(1.05);
}

.time-display {
    color: var(--text-primary);
    font-size: 12px;
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
    min-width: 40px;
    text-align: center;
}

.progress-container {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: visible;
}

.video-controls-bar .progress-bar,
.video-individual-controls .progress-bar {
    width: 100%;
    height: 100%;
    border-radius: 3px;
    overflow: visible !important;
    position: relative;
}

.progress-bar {
    width: 100%;
    height: 100%;
    border-radius: 3px;
    overflow: visible;
    position: relative;
}

.progress {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.1s ease;
    border-radius: 3px;
}
