/* 简化版视频播放器样式 */


body {
    margin: 0;
    padding: 0;
}

.video-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;

}

/* tvtvideo 容器 */
.tvtvideo {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* 加载提示 */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

/* 错误提示 */
.error {
    text-align: center;
    padding: 40px;
    color: #e0412b;
    font-size: 16px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
}

/* 视频包装器 */
.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background-color: #000;
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 20px;
    height: 0; /* 确保padding-bottom生效 */
}

/* 视频加载提示 */
.video-loading-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: opacity 0.3s ease;
}

/* 加载动画 */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 加载文字 */
.loading-text {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
}

/* 视频元素 - 使用通用选择器匹配所有video元素 */
.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #000;
    max-width: 100%;
    max-height: 100%;
}

/* 兼容旧的ID选择器 */
#videoPlayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #000;
    max-width: 100%;
    max-height: 100%;
}

/* 视频封面图片 */
.video-cover-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 10;
    cursor: pointer;
    transition: opacity 0.3s;
    display: block;
}

/* 播放按钮图标 */
.video-cover-image .play-button-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: all 0.3s;
}

.video-cover-image:hover .play-button-icon {
    background: rgba(0,0,0,0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-cover-image .play-button-icon svg {
    width: 40px;
    height: 40px;
    fill: white;
}

/* 清晰度选择器 */
.quality-selector {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.quality-selector label {
    display: inline-block;
    margin-right: 10px;
    font-size: 14px;
    color: #666;
}

.quality-selector select {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
}

.quality-selector select:hover {
    border-color: #999;
}

.quality-selector select:focus {
    outline: none;
    border-color: #00A1D6;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .video-container {
        padding: 0px;
        min-height: auto;
    }
    
    .video-wrapper {
        padding-bottom: 56.25%;
    }
    
    .video-cover-image .play-button-icon {
        width: 70px;
        height: 70px;
    }
    
    .video-cover-image .play-button-icon svg {
        width: 35px;
        height: 35px;
    }
    
    .quality-selector {
        padding: 10px;
    }
    
    .quality-selector label {
        display: block;
        margin-bottom: 8px;
    }
    
    .quality-selector select {
        width: 100%;
    }
}

