/* 播放列表选项卡样式 */

/* 隐藏单选按钮 */
.tab-container input[type="radio"] {
    display: none;
}

/* 选项卡标签容器 */
.tab-labels {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

/* 选项卡标签样式 */
.tab-label {
    flex: 1;
    padding: 15px 20px;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    text-align: center;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    border-right: 1px solid #e0e0e0;
    user-select: none;
}

.tab-label:last-child {
    border-right: none;
}

.tab-label:hover {
    background: #e9ecef;
    color: #333;
}

/* 激活状态的选项卡标签 - 支持最多5个选项卡 */
.tab-container input[type="radio"]:nth-child(1):checked ~ .tab-labels .tab-label:nth-child(1) {
    background: #007bff;
    color: white;
}

.tab-container input[type="radio"]:nth-child(2):checked ~ .tab-labels .tab-label:nth-child(2) {
    background: #28a745;
    color: white;
}

.tab-container input[type="radio"]:nth-child(3):checked ~ .tab-labels .tab-label:nth-child(3) {
    background: #dc3545;
    color: white;
}

.tab-container input[type="radio"]:nth-child(4):checked ~ .tab-labels .tab-label:nth-child(4) {
    background: #ffc107;
    color: #212529;
}

.tab-container input[type="radio"]:nth-child(5):checked ~ .tab-labels .tab-label:nth-child(5) {
    background: #6f42c1;
    color: white;
}

.tab-container input[type="radio"]:nth-child(6):checked ~ .tab-labels .tab-label:nth-child(6) {
    background: #fd7e14;
    color: white;
}

.tab-container input[type="radio"]:nth-child(7):checked ~ .tab-labels .tab-label:nth-child(7) {
    background: #20c997;
    color: white;
}

.tab-container input[type="radio"]:nth-child(8):checked ~ .tab-labels .tab-label:nth-child(8) {
    background: #6610f2;
    color: white;
}

/* 选项卡内容容器 */
.tab-content {
    position: relative;
}

/* 隐藏所有选项卡内容 */
.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

/* 显示对应的选项卡内容 - 支持最多8个选项卡 */
.tab-container input[type="radio"]:nth-child(1):checked ~ .tab-content .tab-pane:nth-child(1),
.tab-container input[type="radio"]:nth-child(2):checked ~ .tab-content .tab-pane:nth-child(2),
.tab-container input[type="radio"]:nth-child(3):checked ~ .tab-content .tab-pane:nth-child(3),
.tab-container input[type="radio"]:nth-child(4):checked ~ .tab-content .tab-pane:nth-child(4),
.tab-container input[type="radio"]:nth-child(5):checked ~ .tab-content .tab-pane:nth-child(5),
.tab-container input[type="radio"]:nth-child(6):checked ~ .tab-content .tab-pane:nth-child(6),
.tab-container input[type="radio"]:nth-child(7):checked ~ .tab-content .tab-pane:nth-child(7),
.tab-container input[type="radio"]:nth-child(8):checked ~ .tab-content .tab-pane:nth-child(8) {
    display: block;
}

/* 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 选项卡图标样式 */
.tab-label i {
    margin-right: 8px;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tab-label {
        padding: 12px 10px;
        font-size: 14px;
    }
    
    .tab-label i {
        margin-right: 5px;
    }
    
    .tab-labels {
        flex-wrap: wrap;
    }
    
    .tab-label {
        min-width: 120px;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .tab-label:last-child {
        border-bottom: none;
    }
}

/* 原始播放列表隐藏（JavaScript处理后会显示选项卡版本） */
.pingshu-grid.original-playlist {
    display: none;
}

/* 播放列表容器样式优化 */
.episode-list .tab-container {
    margin-top: 10px;
}

.related-pingshu .tab-container {
    margin-top: 10px;
}

/* 选项卡内的播放列表样式 */
.tab-pane .pingshu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 0;
}

.tab-pane .pingshu-grid li {
    list-style: none;
    margin: 0;
}

.tab-pane .pingshu-grid li a {
    display: block;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-decoration: none;
    color: #495057;
    text-align: center;
    transition: all 0.2s ease;
}

.tab-pane .pingshu-grid li a:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
}

/* 当前播放集数高亮 */
.tab-pane .pingshu-grid li a.current {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

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

/* 无播放列表时的提示 */
.no-playlist-message {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
}
