/* 响应式视频容器样式 */
.responsive-video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 宽高比 */
    overflow: hidden;
    background: #000;
    border-radius: 8px;
}

.responsive-video-container iframe,
.responsive-video-container video,
.responsive-video-container embed,
.responsive-video-container object {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* 4:3 宽高比选项 */
.responsive-video-container.ratio-4-3 {
    padding-bottom: 75%; /* 4:3 宽高比 */
}

/* 21:9 宽高比选项 */
.responsive-video-container.ratio-21-9 {
    padding-bottom: 42.86%; /* 21:9 宽高比 */
}

/* 移动端优化 */
@media (max-width: 768px) {
    .responsive-video-container {
        margin: 10px 0;
        border-radius: 4px;
    }
}

/* 平板端优化 */
@media (min-width: 769px) and (max-width: 1024px) {
    .responsive-video-container {
        margin: 15px 0;
    }
}

/* PC端优化 */
@media (min-width: 1025px) {
    .responsive-video-container {
        margin: 20px 0;
        max-width: 100%;
    }
}

/* 加载状态样式 */
.responsive-video-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

.responsive-video-container iframe:not([src=""]) + ::before,
.responsive-video-container video[src] + ::before {
    display: none;
}

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

/* 全屏按钮样式 */
.video-fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    z-index: 10;
    transition: background 0.3s ease;
}

.video-fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* 错误状态样式 */
.responsive-video-container.error {
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
}

.responsive-video-container.error::before {
    display: none;
}

/* 通用视频样式类 */
.video-responsive {
    width: 100%;
    height: auto;
    max-width: 100%;
}

/* 兼容旧版本浏览器 */
.responsive-video-container {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* 高DPI屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .responsive-video-container {
        border-radius: 6px;
    }
}