.itmoo-video-player {
    max-width: 100%;
    margin: 20px 0;
    position: relative;
}

.video-container {
    position: relative;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    background: #000;
}

.video-container video {
    width: 100%;
    height: 100%;
    display: block;
    cursor: pointer;
}

/* 自定义控件样式 - 确保层级低于水印 */
.itmoo-custom-controls {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 8px 15px;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 500px;
    margin: 0 auto;
    z-index: 10; /* 确保层级低于水印 */
}

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

.controls-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    width: 100%;
    justify-content: flex-start;
}

/* 控制按钮样式 */
.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

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

.control-btn:active {
    transform: scale(0.95);
}

/* 播放/暂停按钮 - 更新颜色 */
.play-pause {
    background: linear-gradient(135deg, #4B9CD6, #316BA1);
    box-shadow: 0 2px 8px rgba(75, 156, 214, 0.4);
}

.play-pause:hover {
    background: linear-gradient(135deg, #316BA1, #2A5C8A);
    box-shadow: 0 4px 12px rgba(75, 156, 214, 0.6);
}

.play-pause .pause-icon {
    display: none;
}

.play-pause.playing .play-icon {
    display: none;
}

.play-pause.playing .pause-icon {
    display: block;
}

/* 音量按钮 */
.volume-btn {
    position: relative;
}

.volume-btn.muted .volume-icon::before {
    content: "🔇";
}

/* 进度条样式 - 更新颜色 */
.progress-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 150px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    transition: height 0.2s ease;
}

.progress-bar:hover {
    height: 6px;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #4B9CD6, #316BA1);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s ease;
    position: relative;
}

.progress::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.progress-bar:hover .progress::after {
    opacity: 1;
}

/* 时间显示 */
.time-display {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    min-width: 80px;
    font-family: 'Courier New', monospace;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
    text-align: center;
}

/* 音量控制 - 修复版本 */
.volume-container {
    position: relative;
}

/* 音量滑块层级 */
.volume-bar {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 80px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 10px 0;
    display: none;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 15; /* 中间层级 */
}
/* 修复：音量滑块显示状态 */
.volume-container.active .volume-bar {
    display: block;
}

.volume-level-container {
    position: relative;
    width: 4px;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 0 auto;
    cursor: pointer;
}

.volume-level {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, #4B9CD6, #316BA1);
    border-radius: 2px;
    transition: height 0.2s ease;
}

.volume-level::after {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.volume-level-container:hover .volume-level::after {
    opacity: 1;
}

.watermark {
    position: absolute;
    color: rgba(255, 255, 255, 0.7);
    font-size: 20px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    user-select: none;
    z-index: 20; /* 提高层级，确保在水印上方 */
    padding: 5px 10px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.player-controls {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    justify-content: center;
}

/* 播放器控制按钮 - 更新颜色 */
.player-controls button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #4B9CD6, #316BA1);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(75, 156, 214, 0.3);
}

.player-controls button:hover {
    background: linear-gradient(135deg, #316BA1, #2A5C8A);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(75, 156, 214, 0.4);
}

.player-controls button:active {
    transform: translateY(0);
}

.episodes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.episode {
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.episode:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

/* 剧集激活状态 - 更新颜色 */
.episode.active {
    background: linear-gradient(135deg, #4B9CD6, #316BA1);
    color: white;
    border-color: #316BA1;
    box-shadow: 0 4px 12px rgba(75, 156, 214, 0.3);
}

.episode-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.episode-number {
    font-size: 0.9em;
    opacity: 0.8;
}

/* 防止浏览器默认控件 */
.itmoo-video-player video::-webkit-media-controls {
    display: none !important;
}

.itmoo-video-player video::-webkit-media-controls-enclosure {
    display: none !important;
}

.itmoo-video-player video::-webkit-media-controls-panel {
    display: none !important;
}

.itmoo-video-player video::-webkit-media-controls-play-button {
    display: none !important;
}

.itmoo-video-player video::-webkit-media-controls-timeline {
    display: none !important;
}

.itmoo-video-player video::-webkit-media-controls-current-time-display {
    display: none !important;
}

.itmoo-video-player video::-webkit-media-controls-time-remaining-display {
    display: none !important;
}

.itmoo-video-player video::-webkit-media-controls-timeline-container {
    display: none !important;
}

.itmoo-video-player video::-webkit-media-controls-volume-slider {
    display: none !important;
}

.itmoo-video-player video::-webkit-media-controls-mute-button {
    display: none !important;
}

.itmoo-video-player video::-webkit-media-controls-fullscreen-button {
    display: none !important;
}

.itmoo-video-player video::-webkit-media-controls-download-button {
    display: none !important;
}

/* 加载动画 */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 5;
}

.video-loading.show {
    display: block;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #4B9CD6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .itmoo-custom-controls {
        padding: 6px 12px;
        gap: 8px;
        border-radius: 20px;
        bottom: 8px;
        left: 8px;
        right: 8px;
    }
    
    .control-btn {
        width: 32px;
        height: 32px;
        padding: 6px;
        font-size: 12px;
    }
    
    .progress-container {
        min-width: 120px;
        gap: 8px;
    }
    
    .time-display {
        font-size: 11px;
        min-width: 70px;
        padding: 3px 6px;
    }
    
    .episodes {
        grid-template-columns: 1fr;
    }
    
    .watermark {
        font-size: 16px;
    }
    
    .player-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .player-controls button {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .itmoo-custom-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }
    
    .progress-container {
        order: 3;
        flex-basis: 100%;
        margin-top: 5px;
    }
    
    .controls-bar {
        flex-wrap: wrap;
        gap: 8px;
    }
}
/* 视频统计叠加层 */
.video-stats-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    z-index: 15;
    backdrop-filter: blur(5px);
}

.play-count {
    display: flex;
    align-items: center;
    gap: 5px;
}

.play-count .icon {
    font-size: 14px;
}

.play-count .count {
    font-weight: bold;
    color: #4B9CD6;
}

/* 剧集统计 */
.episode-stats {
    margin-top: 5px;
    font-size: 11px;
    color: #6c757d;
}

.episode.active .episode-stats {
    color: rgba(255, 255, 255, 0.8);
}

/* 加载状态 */
.stats-overview.loading {
    opacity: 0.6;
    pointer-events: none;
}

.stats-overview.loading::after {
    content: '加载中...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 10;
}