/* ========== 全局重置 & 基础样式 ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background: #fff;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}
a:hover {
    color: #000;
    text-decoration: underline;
}

ul, li {
    list-style: none;
}

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

input, button {
    border: none;
    outline: none;
    font-family: inherit;
}

h1, h2, h3, h4 {
    font-weight: 500;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}
.playcontainer {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* ========== 头部区域 ========== */
.header {
    border-bottom: 1px solid #eee;
    padding: 10px 0;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 99;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: #000;
    flex-shrink: 0;
}

/* 搜索框 */
.search-box {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 520px;
    min-width: 200px;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.search-box:focus-within {
    border-color: #000;
}

.search-input {
    flex: 1;
    height: 36px;
    padding: 0 14px;
    border: none;
    font-size: 14px;
    background: transparent;
}

.search-submit {
    height: 36px;
    padding: 0 18px;
    background: #000;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
}
.search-submit:hover {
    opacity: 0.85;
}

/* 快捷图标导航 */
.header-quick {
    display: flex;
    align-items: center;
    gap: 26px;
    flex-shrink: 0;
}

.header-quick a {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 15px;
    color: #666;
    white-space: nowrap;
    transition: color 0.2s;
    line-height: 1.2;
}

.header-quick .icon {
    font-size: 19px;
    line-height: 1;
    color: #444;
    font-weight: 500;
}

.header-quick a:hover {
    color: #000;
}
.header-quick a:hover .icon {
    color: #000;
}

/* 主导航 */
.nav {
    width: 100%;
    margin-top: 6px;
}

.nav ul {
    display: flex;
    align-items: center;
    justify-content: space-around;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.nav ul::-webkit-scrollbar {
    display: none;
}

.nav li {
    flex-shrink: 0;
}

.nav li a {
    display: block;
    font-size: 16px;
    color: #666;
    padding: 6px 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav li a.active {
    background-color: #1a1a1a;
    color: #fff;
    font-weight: 500;
}

.nav li a:hover {
    background-color: #f5f5f5;
    color: #000;
}
.nav li a.active:hover {
    background-color: #333;
    color: #fff;
}

/* ========== 通用模块 ========== */
/* 通栏广告 */
.ad-banner {
    width: 100%;
    background: #f8f8f8;
    border-bottom: 1px solid #eee;
    padding: 30px 0;
    overflow: hidden;
}

.ad-banner .container {
    padding: 0 10px;
}

.ad-banner a {
    display: block;
    outline: none;
}

.ad-banner img {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 4px;
    transition: opacity 0.2s;
}
.ad-banner img:hover {
    opacity: 0.92;
}

.ad-banner-empty {
    color: #999;
    font-size: 13px;
    padding: 8px 0;
    text-align: center;
}

/* 面包屑 */
.breadcrumb {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    color: #999;
}

.breadcrumb a {
    color: #666;
}
.breadcrumb a:hover {
    color: #000;
}

.breadcrumb span {
    margin: 0 6px;
}

/* 筛选区 */
.filter-wrap {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: nowrap;
    width: 100%;
}
.filter-row:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 2px 0;
    font-weight: 500;
}

.filter-list {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    min-width: 0;
}
.filter-list::-webkit-scrollbar {
    display: none;
}

.filter-tag {
    font-size: 13px;
    color: #999;
    padding: 3px 10px;
    border-radius: 4px;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 40px;
    text-align: center;
    border: 1px solid transparent;
}

.filter-tag.active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}
.filter-tag:hover:not(.active) {
    color: #000;
    border-color: #ddd;
}

/* 内容区块 */
.section {
    padding: 25px 0;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 6px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    border-left: 3px solid #000;
    padding-left: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
}

.section-title-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.section-sort {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.sort-tag {
    font-size: 13px;
    color: #999;
    padding: 3px 10px;
    border-radius: 4px;
    transition: all 0.2s;
    white-space: nowrap;
    min-width: 40px;
    text-align: center;
    border: 1px solid transparent;
}

.sort-tag.active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}
.sort-tag:hover:not(.active) {
    color: #000;
    border-color: #ddd;
}

.section-more {
    font-size: 13px;
    color: #999;
    margin-left: 6px;
}
.section-more:hover {
    color: #000;
}

.empty-tip {
    padding: 60px 0;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* ========== 视频列表 & 卡片 ========== */
.video-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    width: 100%;
    align-items: stretch;
}

.video-item {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.25s ease;
    padding-bottom: 6px;
}
.video-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.14), 0 3px 6px rgba(0,0,0,0.08);
}

.video-pic {
    width: 100%;
    padding-top: 66.67%;
    background: #f5f5f5;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    position: relative;
}

.video-pic img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    max-width: 100% !important;
    max-height: 100% !important;
    loading: lazy;
}

.video-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 6px;
    font-size: 11px;
    color: #fff;
    border-radius: 4px;
    background: rgba(0,0,0,0.7);
}
.badge-hot { background: rgba(220,38,38,0.9); }
.badge-new { background: rgba(16,185,129,0.9); }
.badge-finish { background: rgba(107,114,128,0.9); }

.video-title {
    font-size: 14px;
    line-height: 1.4;
    margin: 8px 6px 0;
    font-weight: 500;
    color: #222;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 2.8em;
}

.video-sub {
    font-size: 12px;
    color: #999;
    margin: 3px 6px 6px;
    display: flex;
    justify-content: space-between;
}

.video-tag-wrap, .video-tag {
    margin: 6px 6px 2px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tag-item {
    font-size: 11px;
    color: #666;
    padding: 2px 6px;
    border: 1px solid #eee;
    border-radius: 3px;
    transition: all 0.2s;
}
.tag-item:hover {
    border-color: #000;
    color: #000;
}

/* ========== 播放页专用 ========== */
.play-wrap {
    padding: 25px 0;
}

.play-title {
    font-size: 22px;
    font-weight: 600;
    color: #000;
    margin-bottom: 15px;
    line-height: 1.4;
}

.player-box {
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    position: relative;
}

.player-main {
    width: 100%;
    background: #000;
    height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s ease;
}

.player-box.fixed {
    position: fixed;
    bottom: ;: 10px;
    right: 10px;
    z-index: 9999;
    width: 320px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}
.player-box.fixed .player-main {
    height: 180px;
}

.source-tab {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.source-tab a {
    padding: 5px 14px;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
    border: 1px solid #eee;
    background: #fff;
}
.source-tab a.active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.episode-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
    gap: 8px;
    margin-bottom: 25px;
}

.episode-list a {
    display: block;
    padding: 6px 8px;
    text-align: center;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
    border: 1px solid #eee;
    background: #fff;
}
.episode-list a.active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.detail-info {
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-bottom: 25px;
}

.detail-info h2 {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    border-left: 3px solid #000;
    padding-left: 10px;
    margin-bottom: 12px;
}

.detail-info p {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
    text-indent: 2em;
}

/* ========== 分页 & 页脚 ========== */
.page-wrap {
    margin-top: 30px;
    text-align: center;
}

.page-list {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.page-list a, .page-list span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 13px;
    border-radius: 4px;
    color: #666;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.page-list a:hover {
    background: #f5f5f5;
    color: #000;
    border-color: #ddd;
}

.page-list .active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.page-list .disabled {
    color: #ccc;
    cursor: not-allowed;
}

.footer {
    border-top: 1px solid #eee;
    padding: 25px 0;
    margin-top: 40px;
    text-align: center;
    font-size: 13px;
    color: #999;
}

.footer p {
    margin-bottom: 5px;
}

/* ========== 响应式适配 ========== */
@media (max-width: 991px) {
    .video-list { grid-template-columns: repeat(3, 1fr); gap: 15px; }
    .section { padding: 20px 0; }
    .ad-banner { padding: 25px 0; }
    .header-quick { gap: 22px; }
    .search-box { max-width: 400px; }
    .filter-wrap { padding: 18px 0; }
    .filter-tag { padding: 3px 8px; min-width: 36px; }
    .section-head { margin-bottom: 12px; }
    .player-main { height: 360px; }
    .player-box.fixed { width: 280px; }
}

@media (max-width: 767px) {
    .header-inner { gap: 12px; align-items: center; }
    .logo { order: 1; }
    .search-box { display: none !important; }
    .header-quick {
        order: 2;
        gap: 18px;
        overflow-x: auto;
        padding-bottom: 2px;
    }
    .header-quick a {
        flex-direction: column;
        gap: 3px;
        font-size: 14px;
        text-align: center;
    }
    .header-quick .icon { font-size: 18px; }
    .nav { order: 3; width: 100%; }
    .nav ul { justify-content: flex-start; }
    .video-list { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .section { padding: 15px 0; }
    .ad-banner { padding: 20px 0; }
    .filter-wrap { padding: 15px 0; }
    .page-wrap { margin-top: 20px; }
    .video-title { min-height: 2.8em; }
    .section-head { margin-bottom: 10px; }
    .player-main { height: 240px; }
    .episode-list { grid-template-columns: repeat(auto-fill, minmax(65px, 1fr)); }
    .player-box.fixed {
        width: calc(100% - 20px);
        left: 10px;
        right: 10px;
        top: 10px;
    }
}