/* ========== 全局变量 极简白风格 ========== */
:root{
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg: #f8fafc;
    --card: #ffffff;
    --border: #e2e8f0;
    --text-1: #0f172a;
    --text-2: #475569;
    --text-3: #94a3b8;
    --radius: 10px;
}

*{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;
}
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;}

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

/* ========== 极简头部 下划线导航 ========== */
.site-header{
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 999;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.header-inner{
    width: 1200px;
    margin: 0 auto;
    height: 66px;
    display: flex;
    align-items: center;
    gap: 30px;
}
.logo h1{
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}
.main-nav{flex:1;overflow-x:auto;}
.main-nav::-webkit-scrollbar{display:none;}
.nav-list{
    display: flex;
    gap: 8px;
    white-space: nowrap;
}
.nav-link{
    position: relative;
    display: block;
    padding: 8px 16px;
    color: var(--text-2);
    font-size: 15px;
    font-weight: 500;
}
.nav-link::after{
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), #7c3aed);
    transition: all .3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}
.nav-link:hover{
    color: var(--primary);
}
.nav-link:hover::after,
.nav-link.active::after{
    width: 70%;
}
.nav-link.active{
    color: var(--primary);
    font-weight: 600;
}

/* 搜索框 */
.search-box form{display:flex;align-items:center;}
.search-box input{
    width: 220px;
    height: 36px;
    padding: 0 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px 0 0 8px;
    outline: none;
    color: var(--text-1);
    font-size: 14px;
}
.search-box input:focus{
    border-color: var(--primary);
    background: #fff;
}
.search-box button{
    height: 36px;
    padding: 0 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-size: 14px;
}
.search-box button:hover{
    background: var(--primary-hover);
}

/* ========== 卡片通用 ========== */
.card{
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}
.card-title{
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.card-title h2{
    font-size: 18px;
    font-weight: 600;
    color: var(--text-1);
}
.card-title .more{
    font-size: 13px;
    color: var(--text-3);
}
.card-title .more:hover{color: var(--primary);}

/* ========== 视频网格 ========== */
.vod-grid{
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}
.vod-card{
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all .3s ease;
}
.vod-card:hover{
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.1);
}
.vod-pic{
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--bg);
}
.vod-pic img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.vod-card:hover .vod-pic img{
    transform: scale(1.05);
    transition: transform .4s ease;
}
.vod-badge{
    position: absolute;
    top: 8px; left: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 2;
}
.vod-card-title{
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 22px 10px 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.85), 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;
}
.vod-info{
    padding: 12px 14px;
}
.vod-name{
    font-size: 14px;
    font-weight: 500;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vod-meta{
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-3);
    display: flex;
    justify-content: space-between;
}
.vod-score{
    color: #f59e0b;
    font-weight: 600;
}

/* ========== 排行榜 ========== */
.rank-box{
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}
.rank-title{
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.rank-list li{
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 14px;
}
.rank-list li:last-child{border-bottom:none;}
.rank-num{
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    background: var(--bg);
    color: var(--text-3);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}
.rank-num.top{
    background: var(--primary);
    color: #fff;
}
.rank-num.gold{
    background: #f59e0b;
    color: #fff;
}
.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-wrap{
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}
.filter-row{
    display: flex;
    align-items: flex-start;
    margin-bottom: 14px;
    gap: 12px;
    flex-wrap: wrap;
}
.filter-row:last-child{margin-bottom:0;}
.filter-label{
    width: 60px;
    color: var(--text-3);
    flex-shrink: 0;
    line-height: 30px;
    font-size: 14px;
}
.filter-items{
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.filter-item{
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-2);
    background: var(--bg);
    border: 1px solid transparent;
    white-space: nowrap;
}
.filter-item:hover{
    color: var(--primary);
    border-color: var(--primary);
}
.filter-item.active{
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

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

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

/* ========== 详情页头部 ========== */
.detail-head{
    background: var(--card);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 20px;
    display: flex;
    gap: 30px;
    border: 1px solid var(--border);
}
.detail-cover{
    width: 230px;
    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: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
}
.detail-info{flex:1;min-width:0;}
.detail-title{
    font-size: 28px;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 8px;
}
.detail-subtitle{
    color: var(--text-3);
    margin-bottom: 20px;
    font-size: 14px;
}
.detail-meta p{
    padding: 8px 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: 20px;
    padding: 12px 40px;
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
}
.play-btn:hover{
    background: var(--primary-hover);
    color: #fff;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.2);
}

/* ========== 播放源与集数 ========== */
.episodes-wrap{
    background: var(--card);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}
.source-tabs{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.source-tab{
    padding: 8px 18px;
    background: var(--bg);
    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: #fff;
    border-color: var(--primary);
}
.episodes-list{
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.episodes-list a{
    min-width: 88px;
    padding: 8px 18px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    text-align: center;
    color: var(--text-2);
    font-size: 14px;
}
.episodes-list a:hover{
    color: var(--primary);
    border-color: var(--primary);
}
.episodes-list a.active{
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ========== 详情页三大模块样式 ========== */
.movie-summary{
    background: var(--card);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}
.movie-summary .title{
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.movie-summary .theme{
    font-size: 17px;
    font-weight: 600;
    color: var(--text-1);
}
.mb10{margin-bottom:10px;}
.summary-con{
    color: var(--text-2);
    line-height: 1.9;
}
.my-dt{
    list-style: none;
}
.my-dt dd{
    padding: 6px 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 12px;
    background: var(--bg);
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-2);
}
.summary-con a.mr10:hover{
    background: #eff6ff;
    color: var(--primary);
}

/* ========== 播放页播放器 ========== */
.play-box{
    margin-bottom: 20px;
}
.player-wrap{
    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-wrap iframe,
.player-wrap video{
    width: 100% !important;
    height: 100% !important;
    display: block;
}
.play-title-bar{
    background: var(--card);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 16px 22px;
}
.play-title-bar h2{
    font-size: 17px;
    font-weight: 600;
    color: var(--text-1);
}

/* ========== 搜索页 ========== */
.search-tip{
    background: var(--card);
    border-radius: var(--radius);
    padding: 18px 22px;
    margin-bottom: 20px;
    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-box{
    background: var(--card);
    border-radius: var(--radius);
    padding: 80px 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: 30px 0;
    margin-top: 20px;
}
.footer-inner{
    width: 1200px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-3);
    font-size: 13px;
    line-height: 2;
}
.footer-links{
    margin-bottom: 10px;
}
.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){
    .container,
    .header-inner,
    .footer-inner{width:96%;}
    .vod-grid{grid-template-columns: repeat(4, 1fr);}
    .layout-side{width:260px;}
}

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

@media (max-width: 768px){
    .header-inner{
        flex-direction: column;
        height: auto;
        padding: 12px 0;
        gap: 12px;
    }
    .main-nav, .search-box{width:100%;}
    .search-box form{width:100%;}
    .search-box input{flex:1;}
    .vod-grid{grid-template-columns: repeat(2, 1fr);gap:12px;}
    .detail-title{font-size:22px;}
    .detail-head{padding:20px;}
    .container{padding-top: 130px;}

    /* 筛选栏手机端垂直布局 */
    .filter-row{
        flex-direction: column;
        gap: 8px;
    }
    .filter-label{
        width: 100%;
        line-height: 1.5;
        font-weight: 600;
        color: var(--text-2);
    }
    .filter-items{
        width: 100%;
    }
}

@media (max-width: 576px){
    .vod-grid{gap:10px;}
    .card, .episodes-wrap, .movie-summary{padding:16px;}
    .detail-title{font-size:20px;}
}
