/**
 * MB8 线条边框模板样式
 * 特色：简洁风格，2px边框，无圆角，Tabs导航
 * 版本：1.0.0
 */

/* ============================================================================
   基础样式重置
   ========================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

a:hover {
    color: #000;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol, dl {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ============================================================================
   头部区域
   ========================================================================= */
.site-header {
    background: #fff;
    border-bottom: 2px solid #000;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 0;
}

/* Logo */
.logo h1 {
    font-size: 28px;
    font-weight: bold;
    color: #000;
    border: 2px solid #000;
    padding: 8px 16px;
    display: inline-block;
}

/* 搜索框 */
.search-box {
    flex: 0 0 300px;
}

.search-form {
    display: flex;
    gap: 0;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #000;
    border-right: none;
    font-size: 14px;
    background: #fff;
}

.search-btn {
    padding: 10px 25px;
    background: #000;
    color: #fff;
    border: 2px solid #000;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

.search-btn:hover {
    background: #fff;
    color: #000;
}

/* ============================================================================
   Tabs 导航（已废弃，保留用于兼容）
   ========================================================================= */
.tabs-nav {
    background: #fff;
    border-bottom: 2px solid #000;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
}

.tabs-nav::-webkit-scrollbar {
    height: 2px;
}

.tabs-nav::-webkit-scrollbar-thumb {
    background: #000;
}

.tabs-container {
    display: flex;
    min-width: 100%;
}

.tab-item {
    display: inline-block;
    padding: 12px 20px;
    color: #666;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    border-right: 2px solid #e0e0e0;
}

.tab-item:first-child {
    border-left: 2px solid #e0e0e0;
}

.tab-item:hover,
.tab-item.active {
    color: #000;
    background: #f5f5f5;
    border-bottom: 2px solid #000;
}

/* ============================================================================
   子分类标签区域
   ========================================================================= */
.sub-categories {
    background: #fff;
    padding: 15px 0;
    border-bottom: 2px solid #e0e0e0;
}

.sub-cat-group {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.sub-cat-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sub-cat-title {
    display: inline-block;
    font-weight: bold;
    color: #000;
    margin-right: 10px;
    font-size: 14px;
    padding: 4px 8px;
    border-left: 2px solid #000;
}

.sub-cat-item {
    display: inline-block;
    margin: 3px 5px 3px 0;
}

.sub-cat-item a {
    display: inline-block;
    padding: 4px 12px;
    border: 2px solid #000;
    background: #fff;
    color: #000;
    font-size: 12px;
    transition: all 0.2s;
}

.sub-cat-item a:hover {
    background: #000;
    color: #fff;
}

/* ============================================================================
   主内容区域
   ========================================================================= */
.main-content {
    padding: 25px 0;
    min-height: calc(100vh - 400px);
}

/* 面包屑导航 */
.breadcrumb {
    padding: 10px 15px;
    background: #fff;
    border: 2px solid #e0e0e0;
    color: #666;
    font-size: 13px;
    margin-bottom: 15px;
}

.breadcrumb .separator {
    margin: 0 8px;
}

.breadcrumb .current {
    color: #000;
}

/* ============================================================================
   分类区块
   ========================================================================= */
.category-section {
    margin-bottom: 30px;
    background: #fff;
    padding: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #000;
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    color: #000;
}

.more-link {
    color: #666;
    font-size: 14px;
    border: 2px solid #000;
    padding: 4px 12px;
}

.more-link:hover {
    background: #000;
    color: #fff;
}

/* 视频网格 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.video-item {
    background: #fff;
    border: 2px solid #000;
    overflow: hidden;
    transition: transform 0.2s;
}

.video-item:hover {
    transform: translateY(-4px);
    box-shadow: 4px 4px 0 #000;
}

.video-thumb {
    position: relative;
    padding-bottom: 56.25%;
    background: #f0f0f0;
    overflow: hidden;
    border-bottom: 2px solid #000;
}

.video-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-name {
    padding: 10px;
    font-size: 13px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================================
   列表页
   ========================================================================= */
.page-header {
    background: #fff;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.page-title {
    font-size: 24px;
    font-weight: bold;
    color: #000;
}

/* ============================================================================
   播放页
   ========================================================================= */
.video-header {
    background: #fff;
    padding: 15px 20px;
    border: 2px solid #000;
    margin-bottom: 15px;
}

.video-title {
    font-size: 24px;
    font-weight: bold;
    color: #000;
}

.video-player-wrapper {
    margin-bottom: 20px;
    background: #000;
    border: 2px solid #000;
    overflow: hidden;
}

.video-player-wrapper iframe {
    width: 100%;
    height: 500px;
    display: block;
}

/* 选集列表 */
.episode-section {
    background: #fff;
    border: 2px solid #000;
    padding: 20px;
    margin-bottom: 20px;
}

.episode-title {
    font-size: 16px;
    margin-bottom: 15px;
    color: #000;
    padding-bottom: 10px;
    border-bottom: 2px solid #000;
}

.episode-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.episode-btn {
    display: inline-block;
    padding: 8px 15px;
    background: #fff;
    color: #000;
    border: 2px solid #000;
    font-size: 14px;
    transition: all 0.2s;
}

.episode-btn:hover,
.episode-btn.active {
    background: #000;
    color: #fff;
}

/* 播放提示 */
.play-tip {
    background: #000;
    color: #fff;
    text-align: center;
    padding: 12px;
    border: 2px solid #000;
    margin-bottom: 20px;
    font-weight: bold;
}

/* 推荐视频 */
.recommend-section {
    margin-top: 30px;
    padding: 20px;
    background: #fff;
}

/* ============================================================================
   分页导航
   ========================================================================= */
.pagination {
    text-align: center;
    padding: 30px 0;
}

.pagination__link {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 3px;
    border: 2px solid #000;
    color: #000;
    background: #fff;
    font-size: 14px;
    transition: all 0.2s;
}

.pagination__link:hover,
.pagination__link--current {
    background: #000;
    color: #fff;
}

/* ============================================================================
   底部版权区域
   ========================================================================= */
.site-footer {
    background: #fff;
    color: #333;
    padding: 30px 0;
    margin-top: 40px;
    border-top: 2px solid #000;
}

.footer-content {
    text-align: center;
}

.footer-content p {
    margin: 5px 0;
}

.footer-content a {
    color: #000;
    margin: 0 5px;
    border-bottom: 2px solid transparent;
}

.footer-content a:hover {
    border-bottom-color: #000;
}

/* ============================================================================
   响应式布局 - 平板
   ========================================================================= */
@media screen and (max-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .search-box {
        flex: 0 0 200px;
    }
}

/* ============================================================================
   响应式布局 - 移动端
   ========================================================================= */
@media screen and (max-width: 768px) {

    .header-top {
        flex-wrap: wrap;
    }

    .logo h1 {
        font-size: 22px;
        padding: 6px 12px;
    }

    .search-box {
        flex: 1 1 100%;
        order: 3;
    }

    .tab-item {
        padding: 10px 15px;
        font-size: 14px;
    }

    .sub-categories {
        padding: 10px 0;
    }

    .sub-cat-group {
        margin-bottom: 8px;
        padding-bottom: 8px;
    }

    .sub-cat-title {
        display: block;
        margin-bottom: 5px;
    }

    .sub-cat-item a {
        font-size: 11px;
        padding: 3px 10px;
    }

    .video-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .video-name {
        font-size: 12px;
        padding: 8px;
    }

    .pc_pagination {
        display: none;
    }

    .moble_pagination {
        display: inline-block;
    }

    .video-player-wrapper iframe {
        height: 300px;
    }

    .episode-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* ============================================================================
   响应式布局 - 小屏手机
   ========================================================================= */
@media screen and (max-width: 480px) {

    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .section-title {
        font-size: 16px;
    }

    .page-title,
    .video-title {
        font-size: 18px;
    }

    .video-player-wrapper iframe {
        height: 250px;
    }
}
