/* ========== 全局变量 炭黑霓虹风 ========== */
:root{
    --primary: #00f0ff;
    --primary-2: #00b8c4;
    --bg: #0a0a0f;
    --bg-2: #12121a;
    --card: #171722;
    --border: #232330;
    --text-1: #e8e8f0;
    --text-2: #a0a0b0;
    --text-3: #66667a;
    --radius: 8px;
}

*{margin:0;padding:0;box-sizing:border-box;}
body{
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text-1);
    line-height: 1.6;
    font-size: 14px;
    -webkit-overflow-scrolling: touch;
}
a{text-decoration:none;color:inherit;transition:all .25s ease;}
ul{list-style:none;}
img{max-width:100%;display:block;}
.clearfix::after{content:"";display:block;clear:both;}

/* ========== 公共容器 ========== */
.page-container{
    width: 1200px;
    margin: 0 auto;
    padding: 80px 0 30px;
}
.content-wrap{
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.content-main{flex:1;min-width:0;}
.content-side{width:280px;flex-shrink:0;}

/* ========== 顶部导航 ========== */
.site-header{
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 999;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
}
.header-wrap{
    width: 1200px;
    margin: 0 auto;
    height: 66px;
    display: flex;
    align-items: center;
    gap: 30px;
}
.logo-box h2{
    font-size: 21px;
    font-weight: 800;
    color: var(--primary);
    text-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
    letter-spacing: 1px;
}
.nav-box{flex:1;overflow-x:auto;}
.nav-box::-webkit-scrollbar{display:none;}
.nav-list{
    display: flex;
    gap: 4px;
    white-space: nowrap;
}
.nav-item{
    display: block;
    padding: 8px 18px;
    border-radius: 6px;
    color: var(--text-2);
    font-size: 15px;
    font-weight: 500;
}
.nav-item:hover{
    color: var(--primary);
    background: rgba(0, 240, 255, 0.08);
}
.nav-item.active{
    color: #0a0a0f;
    background: var(--primary);
    font-weight: 600;
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.25);
}

/* 搜索框 */
.search-form form{display:flex;align-items:center;}
.search-form input{
    width: 200px;
    height: 34px;
    padding: 0 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 6px 0 0 6px;
    outline: none;
    color: var(--text-1);
    font-size: 14px;
}
.search-form input:focus{
    border-color: var(--primary);
    background: rgba(255,255,255,0.06);
}
.search-form button{
    height: 34px;
    padding: 0 16px;
    background: var(--primary);
    color: #0a0a0f;
    border: none;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}
.search-form button:hover{
    background: var(--primary-2);
}

/* ========== 卡片通用 ========== */
.card-box{
    background: var(--card);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
}
.card-head{
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.card-head h2{
    font-size: 17px;
    font-weight: 600;
    color: var(--text-1);
    position: relative;
    padding-left: 10px;
}
.card-head h2::before{
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background: var(--primary);
    border-radius: 2px;
}
.card-head .more-link{
    font-size: 13px;
    color: var(--text-3);
}
.card-head .more-link:hover{color: var(--primary);}

/* ========== 视频网格 ========== */
.video-list{
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}
.video-item{
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all .3s ease;
}
.video-item:hover{
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(0, 240, 255, 0.1);
}
.video-pic{
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--bg-2);
}
.video-pic img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.video-item:hover .video-pic img{
    transform: scale(1.05);
    transition: transform .4s ease;
}
.video-tag{
    position: absolute;
    top: 8px; left: 8px;
    background: var(--primary);
    color: #0a0a0f;
    font-size: 12px;
    padding: 2px 7px;
    border-radius: 4px;
    z-index: 2;
    font-weight: 600;
}
.video-name-over{
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 22px 10px 8px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.2), transparent);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    z-index: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.video-info{
    padding: 10px 12px;
}
.video-title{
    font-size: 14px;
    font-weight: 500;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.video-meta{
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-3);
    display: flex;
    justify-content: space-between;
}
.video-score{
    color: var(--primary);
    font-weight: 600;
}

/* ========== 排行榜 ========== */
.rank-box{
    background: var(--card);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
}
.rank-title{
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text-1);
}
.rank-list li{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 14px;
}
.rank-list li:last-child{border-bottom:none;}
.rank-num{
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    background: var(--bg-2);
    color: var(--text-3);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}
.rank-num.top{
    background: var(--primary);
    color: #0a0a0f;
}
.rank-num.gold{
    background: linear-gradient(135deg, #00f0ff, #00b8c4);
    color: #0a0a0f;
}
.rank-name{
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-2);
}
.rank-name:hover{color: var(--primary);}
.rank-hits{
    font-size: 12px;
    color: var(--text-3);
    flex-shrink: 0;
}

/* ========== 筛选栏 移动端滑动修复版 ========== */
.filter-box{
    background: var(--card);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
}
.filter-line{
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}
.filter-line:last-child{margin-bottom:0;}
.filter-label{
    width: 56px;
    color: var(--text-3);
    flex-shrink: 0;
    line-height: 28px;
    font-size: 14px;
    font-weight: 500;
}
.filter-items{
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
}
.filter-items::-webkit-scrollbar{
    height: 4px;
}
.filter-items::-webkit-scrollbar-track{
    background: var(--bg-2);
    border-radius: 2px;
}
.filter-items::-webkit-scrollbar-thumb{
    background: var(--primary);
    border-radius: 2px;
}
.filter-item{
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-2);
    background: var(--bg-2);
    border: 1px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
}
.filter-item:hover{
    color: var(--primary);
    border-color: var(--primary);
}
.filter-item.active{
    background: var(--primary);
    color: #0a0a0f;
    border-color: var(--primary);
}

/* ========== 分页 ========== */
.page-list{
    margin: 24px 0;
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.page-list a{
    min-width: 34px;
    height: 34px;
    padding: 0 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    line-height: 34px;
    text-align: center;
    color: var(--text-2);
    font-size: 14px;
}
.page-list a:hover{
    border-color: var(--primary);
    color: var(--primary);
}
.page-list a.current{
    background: var(--primary);
    color: #0a0a0f;
    border-color: var(--primary);
}

/* ========== 面包屑 ========== */
.crumbs-nav{
    font-size: 14px;
    color: var(--text-3);
    margin-bottom: 14px;
}
.crumbs-nav a:hover{color: var(--primary);}

/* ========== 详情页头部 ========== */
.detail-head{
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 18px;
    display: flex;
    gap: 24px;
    border: 1px solid var(--border);
}
.detail-cover{
    width: 220px;
    flex-shrink: 0;
    position: relative;
}
.detail-cover img{
    width: 100%;
    border-radius: 8px;
    aspect-ratio: 3/4;
    object-fit: cover;
    border: 1px solid var(--border);
}
.detail-state{
    position: absolute;
    top: 10px; right: 10px;
    background: var(--primary);
    color: #0a0a0f;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
}
.detail-body{flex:1;min-width:0;}
.detail-title{
    font-size: 26px;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 8px;
}
.detail-sub{
    color: var(--text-3);
    margin-bottom: 18px;
    font-size: 14px;
}
.detail-meta p{
    padding: 6px 0;
    color: var(--text-2);
    font-size: 14px;
    border-bottom: 1px dashed var(--border);
}
.detail-meta label{
    color: var(--text-3);
    display: inline-block;
    width: 70px;
    font-weight: 500;
}
.play-btn{
    display: inline-block;
    margin-top: 18px;
    padding: 10px 36px;
    background: var(--primary);
    color: #0a0a0f;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
}
.play-btn:hover{
    background: var(--primary-2);
    color: #0a0a0f;
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.2);
}

/* ========== 播放源与集数（CSS折叠隐藏） ========== */
.play-source{
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
}
.source-tab-list{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.source-tab{
    padding: 7px 16px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-2);
    cursor: pointer;
    font-size: 14px;
}
.source-tab:hover{
    color: var(--primary);
    border-color: var(--primary);
}
.source-tab.active{
    background: var(--primary);
    color: #0a0a0f;
    border-color: var(--primary);
}

/* 集数折叠核心样式 */
.episode-list{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-height: 120px;
    overflow: hidden;
    transition: max-height .3s ease;
}
.episode-list.unfold{
    max-height: 2000px;
}
.episode-list a{
    min-width: 80px;
    padding: 7px 14px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    text-align: center;
    color: var(--text-2);
    font-size: 14px;
}
.episode-list a:hover{
    color: var(--primary);
    border-color: var(--primary);
}
.episode-list a.active{
    background: var(--primary);
    color: #0a0a0f;
    border-color: var(--primary);
}
.more-ep-btn{
    margin-top: 14px;
    text-align: center;
}
.more-ep-btn span{
    display: inline-block;
    padding: 5px 20px;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}
.more-ep-btn span:hover{
    background: rgba(0, 240, 255, 0.06);
}

/* ========== 详情页三大模块 ========== */
.movie-summary{
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
}
.movie-summary .title{
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.movie-summary .theme{
    font-size: 16px;
    font-weight: 600;
    color: var(--text-1);
}
.mb10{margin-bottom:10px;}
.summary-con{
    color: var(--text-2);
    line-height: 1.8;
}
.my-dt{
    list-style: none;
}
.my-dt dd{
    padding: 5px 0;
    font-size: 14px;
    line-height: 1.8;
}
.my-dt em{
    font-style: normal;
    color: var(--text-3);
    margin-right: 4px;
}
.my-dt b{
    color: var(--text-1);
    font-weight: 600;
}
.my-dt a{
    color: var(--primary);
}
.my-dt a:hover{
    text-decoration: underline;
}
.text-overflow{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.summary-con a.mr10{
    display: inline-block;
    margin: 4px 10px 4px 0;
    padding: 4px 10px;
    background: var(--bg-2);
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-2);
}
.summary-con a.mr10:hover{
    background: rgba(0, 240, 255, 0.06);
    color: var(--primary);
}

/* ========== 播放页播放器 ========== */
.player-box{
    margin-bottom: 18px;
}
.player-area{
    width: 100%;
    background: #000;
    border-radius: var(--radius) var(--radius) 0 0;
    aspect-ratio: 16/9;
    overflow: hidden;
    border: 1px solid var(--border);
    border-bottom: none;
}
.player-area iframe,
.player-area video{
    width: 100% !important;
    height: 100% !important;
    display: block;
}
.player-title{
    background: var(--card);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 14px 20px;
}
.player-title h2{
    font-size: 16px;
    font-weight: 600;
    color: var(--text-1);
}

/* ========== 搜索页 ========== */
.search-tip{
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    font-size: 15px;
    color: var(--text-2);
}
.search-tip em{
    color: var(--primary);
    font-style: normal;
    font-weight: 600;
    margin: 0 4px;
}
.empty-tip{
    background: var(--card);
    border-radius: var(--radius);
    padding: 70px 20px;
    text-align: center;
    color: var(--text-3);
    font-size: 15px;
    border: 1px solid var(--border);
}

/* ========== 底部页脚 ========== */
.site-footer{
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 26px 0;
    margin-top: 20px;
}
.footer-wrap{
    width: 1200px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-3);
    font-size: 13px;
    line-height: 2;
}
.footer-links{
    margin-bottom: 8px;
}
.footer-links a{
    margin: 0 10px;
    color: var(--text-2);
}
.footer-links a:hover{color: var(--primary);}
.copyright{font-weight:500;margin-bottom:4px;}

/* ========== 响应式自适应 ========== */
@media (max-width: 1200px){
    .page-container,
    .header-wrap,
    .footer-wrap{width:96%;}
    .video-list{grid-template-columns: repeat(4, 1fr);}
    .content-side{width:260px;}
}

@media (max-width: 900px){
    .content-wrap{flex-direction: column;}
    .content-side{width:100%;}
    .video-list{grid-template-columns: repeat(3, 1fr);}
    .detail-head{flex-direction: column;}
    .detail-cover{
        width: 100%;
        max-width: 240px;
        margin: 0 auto;
    }
    .detail-title{text-align: center;}
}

@media (max-width: 720px){
    .header-wrap{
        flex-direction: column;
        height: auto;
        padding: 10px 0;
        gap: 10px;
    }
    .nav-box, .search-form{width:100%;}
    .search-form form{width:100%;}
    .search-form input{flex:1;}
    .video-list{grid-template-columns: repeat(2, 1fr);gap:10px;}
    .detail-title{font-size:22px;}
    .detail-head{padding:18px;}
    .page-container{padding-top: 120px;}
}

@media (max-width: 520px){
    .video-list{gap:8px;}
    .card-box, .play-source, .movie-summary{padding:14px;}
    .detail-title{font-size:20px;}
    
    /* 手机端筛选垂直布局，标签独占一行 */
    .filter-label{width:100%; line-height: 1.5; font-weight: 600; color: var(--text-2);}
    .filter-line{flex-direction: column;gap:6px;}
    .filter-items{
        width: 100%;
    }
}
