/* HLS视频容器样式 */
.hls-container {
    margin: 20px 0;
    overflow: hidden;
    border-radius: 8px;
}

/* 视频标题样式 */
.hls-title {
    padding: 15px 20px;
    background-color: #f0f0f0;
    font-size: 18px;
    font-weight: bold;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
}

/* 暗色模式下的视频标题样式 */
body.dark .hls-title {
    background-color: #2d2d2d;
    color: #ffffff;
    border-bottom: 1px solid #444;
}

/* HLS播放器包装器 */
.hls-player-wrapper {
    position: relative;
    width: 100%;
    background-color: #000;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
}

/* ArtPlayer容器 */
.artplayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
}

/* ArtPlayer控制栏样式 */
.artplayer .artplayer-app {
    border-radius: 8px;
    overflow: hidden;
}

/* ArtPlayer底部控制栏 */
.artplayer .artplayer-info {
    border-radius: 0 0 8px 8px;
}

/* ArtPlayer全屏时的样式 */
.artplayer-fullscreen .artplayer {
    border-radius: 0;
}

.artplayer-fullscreen .artplayer .artplayer-app {
    border-radius: 0;
    overflow: visible;
}

.artplayer-fullscreen .artplayer .artplayer-info {
    border-radius: 0;
}

/* 修复网页全屏按钮和弹幕的圆角问题 */
.artplayer .artplayer-setting-item,
.artplayer .artplayer-fullscreen-web,
.artplayer .artplayer-fullscreen,
.artplayer .artplayer-danmuku,
.artplayer .artplayer-danmuku-item {
    border-radius: 0 !important;
}

/* 确保只有主要容器有圆角，子元素保持默认样式 */
.artplayer .artplayer-video,
.artplayer .artplayer-cover {
    border-radius: inherit;
}

/* 加载动画 */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border: 8px solid rgba(255, 255, 255, 0.3);
    border-top: 8px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.video-loading.show {
    display: block;
}

/* 加载动画背景遮罩 */
.video-loading::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    z-index: -1;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

/* 视频切换标签样式 */
.video-tabs {
    display: flex;
    flex-wrap: wrap;
    padding: 10px 20px;
}

.video-tab {
    padding: 8px 16px;
    margin: 5px;
    min-width: 90px;
    text-align: center;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.3s ease;
}

.video-tab:hover {
    background-color: #f0f0f0;
    color: #333;
}

.video-tab.active {
    background-color: #3498db;
    color: white;
    border-color: #2980b9;
}

body.dark .video-tab {
    background-color: #222;
    border: 1px solid #222;
    color: #666;
}

body.dark .video-tab:hover {
    background-color: #424242;
    color: #9f9f9f;
}

body.dark .video-tab.active {
    background-color: #233e50;
    color: #9f9f9f;
}

/* 手机端：321px - 479px  满足最小宽度时固定3列 */
@media screen and (min-width: 321px) and (max-width: 479px) {
    .video-tab {
        min-width: 88px;
    }
}

/* 小屏手机：≤320px  强制固定最小宽度并居中 */
@media screen and (max-width: 320px) {
    .video-tab {
        min-width: 100px;
    }
}

/* 平板端：480px - 767px  满足最小宽度时固定6列 */
@media screen and (min-width: 480px) and (max-width: 767px) {
    .video-tab {
        min-width: 85px;
    }
}