/* ===== StarFlix Dark Theme Reset ===== */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;-webkit-tap-highlight-color:transparent}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei","Helvetica Neue",sans-serif;color:#fff;background:#0a0a0a;line-height:1.6;min-height:100vh;-webkit-font-smoothing:antialiased}
a{color:#ccc;text-decoration:none;transition:color .2s}
a:hover{color:#fff}
img{max-width:100%;height:auto;display:block}
ul,ol{list-style:none}
button{cursor:pointer;border:none;outline:none;font-family:inherit}
input,select,textarea{font-family:inherit;outline:none}

/* ===== Scrollbar ===== */
::-webkit-scrollbar{width:6px;height:6px}
::-webkit-scrollbar-track{background:#0a0a0a}
::-webkit-scrollbar-thumb{background:#333;border-radius:3px}
::-webkit-scrollbar-thumb:hover{background:#555}

/* ===== Layout ===== */
.wrap{max-width:1400px;margin:0 auto;padding:0 40px}

/* ===== Header ===== */
.header{position:fixed;top:0;left:0;right:0;z-index:1000;background:linear-gradient(180deg,rgba(0,0,0,.95) 0%,rgba(0,0,0,.85) 60%,transparent 100%);transition:background .3s}
.header.scrolled{background:rgba(10,10,10,.97);backdrop-filter:blur(12px)}
.header-inner{
    display:flex;
    align-items:center;
    height:64px;
    gap:24px;
    max-width:1400px;
    margin:0 auto;
    padding:0 40px;
    /* 核心：两端固定，中间区域自动占位 */
    justify-content: space-between;
}

/* Logo 左侧固定，禁止压缩 */
.header-logo{
    display:flex;
    align-items:center;
    gap:8px;
    flex-shrink:0;
}
.header-logo .logo-text{font-size:22px;font-weight:700;color:#e50914;letter-spacing:3px;text-transform:uppercase;line-height:1}
.header-logo .logo-icon{width:32px;height:32px;background:#e50914;border-radius:6px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.header-logo .logo-icon svg{width:18px;height:18px;fill:#fff}

/* 新增导航外层nav容器，用来居中导航 */
nav {
    flex: 1;
    display: flex;
    justify-content: center;
}
/* Nav 导航栏自身不拉伸 */
.header-nav{
    display:flex;
    gap:4px;
    flex-shrink:0;
}
.header-nav a{display:block;padding:6px 14px;font-size:13px;color:#ccc;border-radius:4px;transition:all .2s;white-space:nowrap}
.header-nav a:hover{color:#fff;background:rgba(255,255,255,.08)}
.header-nav a.active{color:#fff;font-weight:600}

/* Search 右侧固定，取消flex:1，限制最大宽度不拉伸 */
.header-search-wrap{
    flex-shrink: 0;
    width: 400px;
}
.header-search{display:flex;width:100%}
.header-search input{flex:1;height:36px;border:1px solid rgba(255,255,255,.15);border-right:none;border-radius:6px 0 0 6px;padding:0 14px;font-size:13px;color:#fff;background:rgba(255,255,255,.06);transition:all .2s}
.header-search input::placeholder{color:#666}
.header-search input:focus{border-color:rgba(229,9,20,.5);background:rgba(255,255,255,.1)}
.header-search button{height:36px;padding:0 18px;background:#e50914;color:#fff;border:none;border-radius:0 6px 6px 0;font-size:13px;white-space:nowrap;transition:background .2s}
.header-search button:hover{background:#f40612}

/* 移动端补充（可选，小屏隐藏搜索，显示汉堡菜单） */
.menu-toggle {
    display: none;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}
@media (max-width: 992px) {
  nav{
    flex: 0;
  }
    .header-search-wrap {
        display: none;
    }
    .menu-toggle {
        display: block;
    }
    .header-nav {
        display: none;
    }
}

/* Right nav */
.header-actions{display:flex;align-items:center;gap:12px;flex-shrink:0}

/* Mobile toggle */
.menu-toggle{display:none;background:none;border:none;font-size:24px;color:#ccc;padding:4px 8px}

@media(max-width:1024px){
  .header-nav{display:none;position:absolute;top:64px;left:0;right:0;background:rgba(10,10,10,.98);backdrop-filter:blur(12px);flex-direction:column;padding:12px 40px;gap:0;border-top:1px solid #222}
  .header-nav.show{display:flex}
  .menu-toggle{display:block}
  .header-nav a{padding:12px 0;border-bottom:1px solid #1a1a1a;font-size:14px}
  .header-nav a:last-child{border-bottom:none}
  .header-search-wrap{max-width:100%}
}
@media(max-width:640px){
  .wrap,.header-inner{padding:0 16px}
  .header-inner{height:56px;gap:12px}
  .header-logo .logo-text{font-size:18px;letter-spacing:2px}
  .header-nav{top:56px;padding:8px 16px}
  .header-nav.show{display:flex}
}

/* ===== Hero Banner ===== */
.hero-banner{position:relative;width:100%;height:75vh;min-height:500px;max-height:800px;overflow:hidden;margin-bottom:0}
.hero-banner .banner-bg{position:absolute;inset:0;background-size:cover;background-position:center top;background-repeat:no-repeat;transition:opacity .6s}
.hero-banner .banner-bg::after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,rgba(10,10,10,.4) 0%,rgba(10,10,10,.2) 30%,rgba(10,10,10,.9) 100%),linear-gradient(90deg,rgba(10,10,10,.85) 0%,rgba(10,10,10,.3) 50%,rgba(10,10,10,.1) 100%)}
.hero-banner .banner-content{position:absolute;bottom:15%;left:60px;max-width:520px;z-index:2}
.hero-banner .banner-content h1{font-size:42px;font-weight:700;color:#fff;margin-bottom:12px;line-height:1.2;text-shadow:0 2px 8px rgba(0,0,0,.5)}
.hero-banner .banner-content .banner-meta{display:flex;flex-wrap:wrap;gap:12px;font-size:13px;color:#ccc;margin-bottom:16px}
.hero-banner .banner-content .banner-meta span{color:#666;font-weight:600}
.hero-banner .banner-content .banner-desc{font-size:14px;color:#ccc;line-height:1.7;margin-bottom:20px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.hero-banner .banner-content .banner-btns{display:flex;gap:12px;flex-wrap:wrap}
.hero-banner .banner-content .btn-play{display:inline-flex;align-items:center;gap:6px;padding:10px 28px;background:#e50914;color:#fff;font-size:15px;font-weight:600;border-radius:6px;transition:all .2s}
.hero-banner .banner-content .btn-play:hover{background:#f40612;transform:scale(1.03)}
.hero-banner .banner-content .btn-play svg{width:18px;height:18px;fill:#fff}
.hero-banner .banner-content .btn-secondary{display:inline-flex;align-items:center;gap:6px;padding:10px 24px;background:rgba(255,255,255,.15);color:#fff;font-size:14px;font-weight:500;border-radius:6px;transition:all .2s;border:1px solid rgba(255,255,255,.2)}
.hero-banner .banner-content .btn-secondary:hover{background:rgba(255,255,255,.25);border-color:rgba(255,255,255,.4)}
.hero-banner .banner-content .btn-info{display:inline-flex;align-items:center;gap:6px;padding:10px 24px;background:rgba(109,109,110,.7);color:#fff;font-size:14px;font-weight:500;border-radius:6px;transition:all .2s}
.hero-banner .banner-content .btn-info:hover{background:rgba(109,109,110,.9)}
.banner-dots{position:absolute;bottom:8%;right:60px;z-index:2;display:flex;gap:8px}
.banner-dots .dot{width:10px;height:10px;border-radius:50%;background:rgba(255,255,255,.4);cursor:pointer;transition:all .3s}
.banner-dots .dot.active{background:#e50914;width:24px;border-radius:5px}

@media(max-width:768px){
  .hero-banner{height:60vh;min-height:400px}
  .hero-banner .banner-content{left:24px;bottom:12%;right:24px;max-width:100%}
  .hero-banner .banner-content h1{font-size:28px}
  .hero-banner .banner-content .banner-desc{font-size:13px;-webkit-line-clamp:2}
  .hero-banner .banner-content .banner-btns{gap:8px}
  .hero-banner .banner-content .btn-play,.hero-banner .banner-content .btn-secondary,.hero-banner .banner-content .btn-info{padding:8px 18px;font-size:13px}
  .banner-dots{right:24px;bottom:10%}
}

/* ===== Section ===== */
.main-content{padding:0 40px;max-width:1400px;margin:0 auto;margin-top: 65px;}
.hero-banner+.main-content{margin-top:0}
.section-row{margin-bottom:44px}
.section-row:last-child{margin-bottom:0}
.section-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}
.section-header h2{font-size:20px;font-weight:700;color:#fff}
.section-header .more-link{font-size:13px;color:#aaa;display:flex;align-items:center;gap:4px;transition:color .2s}
.section-header .more-link:hover{color:#e50914}
.section-header .more-link svg{width:12px;height:12px;fill:#aaa;transition:fill .2s}
.section-header .more-link:hover svg{fill:#e50914}

/* ===== Horizontal Scroll Row ===== */
.scroll-row{display:flex;gap:10px;overflow-x:auto;scroll-behavior:smooth;padding-bottom:8px;-ms-overflow-style:none;scrollbar-width:none}
.scroll-row::-webkit-scrollbar{display:none}
.scroll-row .poster-card{flex:0 0 calc(16.666% - 8.5px);min-width:150px;text-align:center}
.scroll-row .poster-card .poster-wrap{position:relative;width:100%;aspect-ratio:2/3;background:#1a1a1a;border-radius:6px;overflow:hidden;transition:transform .3s,box-shadow .3s}
.scroll-row .poster-card:hover .poster-wrap{transform:scale(1.05);box-shadow:0 8px 24px rgba(0,0,0,.5);z-index:2}
.scroll-row .poster-card .poster-wrap img{width:100%;height:100%;object-fit:cover}
.scroll-row .poster-card .poster-wrap .placeholder-poster{width:100%;height:100%;background:linear-gradient(135deg,#1a1a1a,#2a2a2a);display:flex;align-items:center;justify-content:center;color:#444;font-size:12px}
.scroll-row .poster-card .rating-badge{position:absolute;top:6px;left:6px;background:#e50914;color:#fff;font-size:11px;font-weight:700;padding:2px 6px;border-radius:3px;z-index:1}
.scroll-row .poster-card .poster-title{display:block;margin-top:8px;font-size:13px;color:#ccc;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transition:color .2s}
.scroll-row .poster-card:hover .poster-title{color:#fff}
.scroll-row .poster-card .poster-year{font-size:11px;color:#666;margin-top:2px}

@media(max-width:1024px){
  .scroll-row .poster-card{flex:0 0 calc(20% - 8px);min-width:130px}
}
@media(max-width:768px){
  .main-content{padding:0 16px}
  .scroll-row .poster-card{flex:0 0 calc(33.33% - 7px);min-width:100px}
}
@media(max-width:480px){
  .scroll-row .poster-card{flex:0 0 calc(50% - 5px);min-width:90px}
}

/* ===== Grid Layout (List Pages) ===== */
.mt{margin-top: 40px;}
.poster-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:12px}
.poster-grid .poster-card{text-align:center}
.poster-grid .poster-card .poster-wrap{position:relative;width:100%;aspect-ratio:2/3;background:#1a1a1a;border-radius:6px;overflow:hidden;transition:transform .3s,box-shadow .3s}
.poster-grid .poster-card:hover .poster-wrap{transform:translateY(-3px);box-shadow:0 6px 20px rgba(0,0,0,.5)}
.poster-grid .poster-card .poster-wrap img{width:100%;height:100%;object-fit:cover}
.poster-grid .poster-card .poster-wrap .placeholder-poster{width:100%;height:100%;background:linear-gradient(135deg,#1a1a1a,#2a2a2a);display:flex;align-items:center;justify-content:center;color:#444;font-size:12px}
.poster-grid .poster-card .rating-badge{position:absolute;top:6px;left:6px;background:#e50914;color:#fff;font-size:10px;font-weight:700;padding:2px 6px;border-radius:3px;z-index:1}
.poster-grid .poster-card .poster-title{display:block;margin-top:8px;font-size:12px;color:#ccc;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transition:color .2s}
.poster-grid .poster-card:hover .poster-title{color:#fff}
.poster-grid .poster-card .poster-year{font-size:11px;color:#666;margin-top:2px}

@media(max-width:1200px){
  .poster-grid{grid-template-columns:repeat(6,1fr)}
}
@media(max-width:768px){
  .poster-grid{grid-template-columns:repeat(4,1fr);gap:10px}
}
@media(max-width:480px){
  .poster-grid{grid-template-columns:repeat(3,1fr);gap:8px}
}

/* ===== Page Header (List pages) ===== */
.page-header{padding:24px 0 16px}
.page-header h1{font-size:24px;font-weight:700;color:#fff}
.page-header .page-subtitle{font-size:13px;color:#999;margin-top:4px}

/* ===== Filter Bars ===== */
.filter-section{margin-bottom:20px}
.filter-row{display:flex;align-items:flex-start;margin-bottom:10px;gap:10px}
.filter-row:last-child{margin-bottom:0}
.filter-label{flex-shrink:0;font-size:12px;color:#888;padding:5px 0;min-width:48px;font-weight:500}
.filter-tags{display:flex;flex-wrap:wrap;gap:6px}
.filter-tags a{display:inline-block;padding:4px 12px;font-size:12px;color:#999;border:1px solid rgba(255,255,255,.1);border-radius:20px;transition:all .2s;white-space:nowrap}
.filter-tags a:hover{color:#fff;border-color:rgba(255,255,255,.3)}
.filter-tags a.active{background:#e50914;color:#fff;border-color:#e50914;font-weight:600}

/* Sort bar */
.sort-bar{display:flex;align-items:center;justify-content:space-between;padding:12px 0;border-bottom:1px solid #1a1a1a;margin-bottom:16px}
.sort-bar .sort-tabs{display:flex;gap:4px}
.sort-bar .sort-tabs a{font-size:13px;color:#999;padding:4px 14px;border-radius:4px;transition:all .2s}
.sort-bar .sort-tabs a:hover{color:#fff}
.sort-bar .sort-tabs a.active{color:#fff;background:rgba(255,255,255,.1);font-weight:600}
.sort-bar .result-count{font-size:13px;color:#666}

/* ===== Detail Page (hero) ===== */
.detail-hero{position:relative;padding:100px 40px 60px;min-height:450px;overflow:hidden}
.detail-hero .hero-bg{position:absolute;inset:0;background-size:cover;background-position:center 20%;background-repeat:no-repeat;filter:blur(40px) brightness(.4);transform:scale(1.1)}
.detail-hero .hero-overlay{position:absolute;inset:0;background:linear-gradient(180deg,rgba(10,10,10,.6) 0%,rgba(10,10,10,.95) 100%)}
.detail-hero .hero-inner{position:relative;z-index:1;display:flex;gap:32px;max-width:1400px;margin:0 auto}
.detail-hero .hero-poster{width:220px;flex-shrink:0}
.detail-hero .hero-poster img{width:100%;border-radius:8px;box-shadow:0 8px 30px rgba(0,0,0,.6)}
.detail-hero .hero-poster .placeholder-poster{width:100%;aspect-ratio:2/3;background:linear-gradient(135deg,#1a1a1a,#2a2a2a);border-radius:8px;display:flex;align-items:center;justify-content:center;color:#444}
.detail-hero .hero-info{flex:1;min-width:0}
.detail-hero .hero-info h1{font-size:32px;font-weight:700;color:#fff;margin-bottom:10px}
.detail-hero .hero-info .hero-meta{display:flex;flex-wrap:wrap;gap:8px 16px;font-size:13px;color:#aaa;margin-bottom:10px}
.detail-hero .hero-info .hero-meta .score{color:#46d369;font-weight:700;font-size:15px}
.detail-hero .hero-info .hero-tags{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:14px}
.detail-hero .hero-info .hero-tags a{font-size:12px;color:#aaa;border:1px solid #333;padding:2px 10px;border-radius:4px;transition:all .2s}
.detail-hero .hero-info .hero-tags a:hover{color:#fff;border-color:#555}
.detail-hero .hero-info .hero-crew{font-size:13px;color:#999;line-height:1.8;margin-bottom:14px}
.detail-hero .hero-info .hero-crew strong{color:#ccc;font-weight:500}
.detail-hero .hero-info .hero-btns{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}
.detail-hero .hero-info .hero-btns .btn-play{display:inline-flex;align-items:center;gap:6px;padding:10px 28px;background:#e50914;color:#fff;font-size:15px;font-weight:600;border-radius:6px;transition:all .2s;border:none}
.detail-hero .hero-info .hero-btns .btn-play:hover{background:#f40612}
.detail-hero .hero-info .hero-btns .btn-play svg{width:16px;height:16px;fill:#fff}
.detail-hero .hero-info .hero-btns .btn-icon{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border:1px solid rgba(255,255,255,.2);border-radius:50%;color:#fff;font-size:16px;background:rgba(255,255,255,.05);transition:all .2s}
.detail-hero .hero-info .hero-btns .btn-icon:hover{border-color:rgba(255,255,255,.5);background:rgba(255,255,255,.1)}
.detail-hero .hero-info .hero-desc{font-size:14px;color:#aaa;line-height:1.8;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.detail-hero .hero-info .hero-desc.expanded{-webkit-line-clamp:unset}

@media(max-width:768px){
  .detail-hero{padding:80px 16px 40px}
  .detail-hero .hero-inner{flex-direction:column;align-items:center;text-align:center}
  .detail-hero .hero-poster{width:160px}
  .detail-hero .hero-info h1{font-size:24px}
  .detail-hero .hero-info .hero-meta{justify-content:center}
  .detail-hero .hero-info .hero-tags{justify-content:center}
  .detail-hero .hero-info .hero-btns{justify-content:center}
}

/* ===== Player Section ===== */
.player-section{max-width:1400px;margin:0 auto;padding:0 40px 32px}
.player-container{width:100%;aspect-ratio:16/9;background:#000;border-radius:8px;overflow:hidden;position:relative}
.player-container iframe{width:100%;height:100%;border:none}
.player-container .play-placeholder{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:rgba(255,255,255,.3)}
.play-placeholder .play-triangle{width:0;height:0;border-style:solid;border-width:24px 0 24px 42px;border-color:transparent transparent transparent rgba(255,255,255,.6);margin-bottom:20px;cursor:pointer;transition:border-color .2s}
.play-placeholder .play-triangle:hover{border-color:transparent transparent transparent #e50914}

/* ===== Episode List ===== */
.episode-section{max-width:1400px;margin:0 auto;padding:0 40px 32px}
.episode-section .ep-heading{font-size:16px;font-weight:600;color:#fff;margin-bottom:12px}
.source-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}
.source-tabs .tab-btn{padding:6px 16px;font-size:13px;color:#999;border:1px solid #333;border-radius:20px;background:transparent;cursor:pointer;transition:all .2s}
.source-tabs .tab-btn:hover{color:#fff;border-color:#555}
.source-tabs .tab-btn.active{background:#e50914;color:#fff;border-color:#e50914}
.episode-list{display:none;flex-wrap:wrap;gap:8px}
.episode-list.active{display:flex}
.episode-list a{display:inline-block;padding:6px 14px;font-size:13px;color:#ccc;border:1px solid #2a2a2a;border-radius:4px;transition:all .2s}
.episode-list a:hover{color:#fff;border-color:#555}
.episode-list a.active{background:#e50914;color:#fff;border-color:#e50914}

/* ===== Related Section ===== */
.related-section{max-width:1400px;margin:0 auto;padding:0 40px 40px}
.related-section h2{font-size:18px;font-weight:700;color:#fff;margin-bottom:16px}

/* ===== Comments Section ===== */
.comments-section{max-width:1400px;margin:0 auto;padding:0 40px 48px}
.comments-section h2{font-size:18px;font-weight:700;color:#fff;margin-bottom:16px}

/* ===== Pagination ===== */
.pagination{display:flex;justify-content:center;align-items:center;gap:4px;padding:32px 0}
.pagination a,.pagination span{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:34px;padding:0 10px;font-size:13px;color:#999;border:1px solid #2a2a2a;border-radius:4px;transition:all .2s}
.pagination a:hover{color:#fff;border-color:#555;background:rgba(255,255,255,.05)}
.pagination a.active,.pagination span.active{background:#e50914;color:#fff;border-color:#e50914;font-weight:600}
.pagination span.dots{border-color:transparent;color:#666}
.pagination .prev-next{font-size:12px}
.pagination .page-info{font-size:12px;color:#666;margin:0 8px}

/* ===== Footer ===== */
.footer{background:#0a0a0a;border-top:1px solid #1a1a1a;padding:32px 40px 24px}
.footer-inner{max-width:1400px;margin:0 auto}
.footer-links{display:flex;justify-content:center;gap:24px;margin-bottom:12px;flex-wrap:wrap}
.footer-links a{font-size:12px;color:#666;transition:color .2s}
.footer-links a:hover{color:#ccc}
.footer-copy{text-align:center;font-size:12px;color:#555}

@media(max-width:768px){
  .footer{padding:24px 16px}
}

/* ===== Back to Top ===== */
.back-to-top{position:fixed;bottom:30px;right:30px;width:42px;height:42px;background:rgba(229,9,20,.85);color:#fff;border:none;border-radius:50%;font-size:18px;cursor:pointer;display:none;align-items:center;justify-content:center;z-index:99;transition:all .2s}
.back-to-top:hover{background:#e50914;transform:translateY(-2px)}
.back-to-top.show{display:flex}

/* ===== Utility ===== */
.d-none{display:none}
.text-center{text-align:center}
.mb-16{margin-bottom:16px}

/* ===== Friend Links ===== */
.friend-links{display:flex;flex-wrap:wrap;gap:10px;padding:16px 0;border-top:1px solid #1a1a1a;margin-top:16px}
.friend-links a{font-size:12px;color:#555;transition:color .2s}
.friend-links a:hover{color:#ccc}

/* ===== Sub-category menu ===== */
.sub-menu{display:flex;flex-wrap:wrap;gap:6px;padding:12px 0}
.sub-menu a{display:inline-block;padding:4px 14px;font-size:12px;color:#999;border:1px solid #2a2a2a;border-radius:20px;transition:all .2s}
.sub-menu a:hover{color:#fff;border-color:#444}
.sub-menu a.active{background:#e50914;color:#fff;border-color:#e50914}

/* ===== Active filter tags display ===== */
.active-tags{display:flex;flex-wrap:wrap;gap:6px;padding:8px 0}
.active-tags .tag-item{display:inline-flex;align-items:center;gap:4px;padding:3px 10px;background:#1a1a1a;border:1px solid #2a2a2a;border-radius:20px;font-size:12px;color:#ccc}
.active-tags .tag-item .close{color:#666;font-size:14px;cursor:pointer;line-height:1}
.active-tags .tag-item .close:hover{color:#e50914}

/* ============================================================
   手机 App 风格（Netflix 式）  max-width: 768px
   ============================================================ */
@media (max-width: 768px) {
  body {
    padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px));
    -webkit-tap-highlight-color: transparent;
  }

  /* 顶部：紧凑 App Bar */
  .header-inner {
    height: 52px;
    padding: 0 14px;
    gap: 10px;
  }
  .header-logo .logo-text {
    font-size: 16px;
    letter-spacing: 1.5px;
  }
  .header-logo .logo-icon {
    width: 26px;
    height: 26px;
    border-radius: 5px;
  }
  .header-icons {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
  }
  .header-icon-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
  }
  .header-icon-btn svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
  }
  .menu-toggle {
    width: 34px;
    height: 34px;
    padding: 0;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    line-height: 1;
  }

  /* 轮播：更像 App 首页头图 */
  .hero-banner {
    height: 50vh;
    min-height: 280px;
    max-height: 420px;
  }
  .hero-banner .banner-content {
    left: 14px;
    right: 14px;
    bottom: 12%;
  }
  .hero-banner .banner-content h1 {
    font-size: 21px;
    margin-bottom: 6px;
  }
  .hero-banner .banner-content .banner-meta {
    font-size: 11px;
    gap: 8px;
    margin-bottom: 8px;
  }
  .hero-banner .banner-content .banner-desc {
    display: none;
  }
  .hero-banner .banner-content .btn-play,
  .hero-banner .banner-content .btn-info {
    padding: 9px 16px;
    font-size: 13px;
    border-radius: 8px;
  }
  .banner-dots {
    right: 14px;
    bottom: 6%;
  }
  .banner-dots .dot {
    width: 6px;
    height: 6px;
  }
  .banner-dots .dot.active {
    width: 16px;
  }

  /* 内容区：边距收紧 */
  .main-content {
    padding: 0 14px;
    margin-top: 52px;
  }
  .section-row {
    margin-bottom: 22px;
  }
  .section-header {
    margin-bottom: 10px;
  }
  .section-header h2 {
    font-size: 15px;
    font-weight: 700;
  }
  .section-header .more-link {
    font-size: 12px;
  }

  /* 横滑行：一屏约 3.2 张卡 */
  .scroll-row {
    gap: 8px;
    margin: 0 -14px;
    padding: 0 14px 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .scroll-row .poster-card {
    flex: 0 0 30%;
    min-width: 0;
    scroll-snap-align: start;
  }
  .scroll-row .poster-card .poster-wrap,
  .poster-grid .poster-card .poster-wrap {
    border-radius: 8px;
  }
  .poster-title {
    font-size: 11px !important;
    margin-top: 5px !important;
  }
  .poster-year {
    font-size: 10px !important;
  }
  .rating-badge {
    font-size: 9px !important;
    padding: 1px 4px !important;
  }

  /* 列表页 / 搜索页：3 列网格 */
  .poster-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }

  /* 筛选栏：横向滚动 */
  .filter-bar,
  .filter-row {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  /* 详情页 */
  .detail-hero,
  .vod-detail-hero {
    min-height: 46vh;
  }
  .episode-list,
  .play-list {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
  }

  /* 页脚压缩 */
  .footer {
    padding: 18px 14px;
    font-size: 12px;
  }
  .footer-links {
    flex-wrap: wrap;
    gap: 8px 12px;
    justify-content: center;
  }
  .back-to-top {
    bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  }
}

/* 底部 App 标签栏（仅手机显示） */
.app-tabbar {
  display: none;
}
@media (max-width: 768px) {
  .app-tabbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(10, 10, 10, 0.96);
    backdrop-filter: blur(14px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    align-items: center;
    justify-content: space-around;
  }
  .app-tabbar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 100%;
    color: #8a8a8a;
    font-size: 10px;
    line-height: 1;
    transition: color 0.2s;
  }
  .app-tabbar a svg {
    width: 21px;
    height: 21px;
    fill: currentColor;
  }
  .app-tabbar a.active {
    color: #e50914;
    font-weight: 600;
  }
  .app-tabbar a.active svg {
    filter: drop-shadow(0 0 6px rgba(229, 9, 20, 0.55));
  }
}

/* 手机端顶部搜索图标（桌面隐藏） */
.header-icons {
  display: none;
}

/* 修复长标题把栅格撑宽导致页面横向溢出 */
.poster-card {
  min-width: 0;
}
.poster-grid .poster-card .poster-title,
.scroll-row .poster-card .poster-title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 播放页：手机全屏铺满 */
@media (max-width: 768px) {
  .player-section {
    max-width: 100%;
    padding: 52px 0 12px !important;
  }
  .player-container {
    border-radius: 0;
    width: 100%;
  }
  .player-section + div {
    padding: 0 14px 12px !important;
  }
}

/* ============================================================
   手机端：更小的字 + 更大的视频（视觉优先）
   ============================================================ */
@media (max-width: 768px) {
  body { font-size: 13px; }

  /* 播放页：视频顶到最上、铺满宽度 */
  .player-section {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }
  .player-container {
    border-radius: 0 !important;
    width: 100% !important;
    aspect-ratio: 16 / 9;
  }
  /* 播放页隐藏顶部导航，让视频占满首屏 */
  body.play-page .header { display: none; }


  /* 文字整体缩小 */
  .page-header h1 { font-size: 16px !important; }
  .page-subtitle { font-size: 11px !important; }
  .section-header h2 { font-size: 14px !important; }
  .section-header .more-link { font-size: 11px !important; }
  .poster-title { font-size: 10px !important; margin-top: 3px !important; line-height: 1.25 !important; }
  .poster-year { font-size: 9px !important; margin-top: 1px !important; }
  .rating-badge { font-size: 8px !important; padding: 0 3px !important; line-height: 13px !important; }

  /* 播放页信息区 */
  .now-playing { font-size: 11px !important; padding: 8px 12px !important; color: #999; }
  .ep-heading { font-size: 12px !important; margin: 10px 0 6px !important; }
  .source-tabs { gap: 6px !important; padding: 0 12px 6px !important; }
  .source-tabs .tab-btn { font-size: 11px !important; padding: 5px 12px !important; }
  .episode-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px !important;
    padding: 0 12px 10px !important;
  }
  .episode-list a {
    font-size: 11px !important;
    padding: 7px 4px !important;
    text-align: center;
    border-radius: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .related-section { padding: 0 12px !important; }
  .related-section h2 { font-size: 13px !important; margin-bottom: 8px !important; }
}

/* 手机端按钮不换行、标题更紧凑 */
@media (max-width: 768px) {
  .hero-banner .banner-content h1 {
    font-size: 18px !important;
    line-height: 1.3 !important;
    max-height: 2.6em;
    overflow: hidden;
  }
  .hero-banner .banner-btns { gap: 8px !important; }
  .hero-banner .banner-btns a {
    white-space: nowrap;
    font-size: 12px !important;
    padding: 8px 14px !important;
  }
}


/* ============================================================
   播放页终极优化：视频最大化 + 线路/选集最简化
   （片头 15 秒静默自动跳过，页面不出现任何按钮/文案）
   ============================================================ */
body.play-page { background: #000; }
body.play-page .player-section {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}
body.play-page .player-container {
  width: 100% !important;
  max-width: 100% !important;
  border-radius: 0 !important;
  margin: 0 auto;
  background: #000;
  aspect-ratio: 16 / 9;
  /* 宽屏下用整屏高度上限，视频尽力铺到最大 */
  max-height: calc(100svh - 56px);
}
body.play-page .player-container iframe { display: block; }

/* 竖屏手机：视频 16:9 满宽，已经到边 */
@media (max-width: 768px) {
  body.play-page .player-container {
    aspect-ratio: 16 / 9;
    max-height: none;
  }
}
/* 横屏 / 矮屏：视频直接占满整屏高度，接近全屏观看 */
@media (orientation: landscape) and (max-height: 640px) {
  body.play-page .player-container {
    aspect-ratio: auto !important;
    height: 100svh !important;
    max-height: 100svh !important;
  }
  body.play-page .episode-section,
  body.play-page .now-playing { display: none !important; }
}

/* 线路 + 选集：紧凑化 */
body.play-page .episode-section {
  max-width: 100% !important;
  padding: 6px 8px 2px !important;
  margin: 0 !important;
}
body.play-page .ep-heading { display: none !important; }
body.play-page .source-tabs {
  gap: 5px !important;
  padding: 0 0 5px !important;
  margin: 0 !important;
}
body.play-page .source-tabs .tab-btn {
  font-size: 10px !important;
  padding: 3px 9px !important;
  border-radius: 4px !important;
  line-height: 1.5 !important;
  color: #999 !important;
}
body.play-page .source-tabs .tab-btn.active { background: #e50914 !important; color: #fff !important; }
body.play-page .episode-list {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 4px !important;
  padding: 0 !important;
  margin: 0 !important;
  max-height: 96px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
body.play-page .episode-list a {
  font-size: 10px !important;
  padding: 4px 2px !important;
  min-height: 0 !important;
  line-height: 1.4 !important;
  border-radius: 4px !important;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.play-page .now-playing { display: none !important; }
body.play-page .related-section { padding: 10px 8px 70px !important; }
body.play-page .related-section h2 { font-size: 12px !important; margin: 6px 0 8px !important; }

/* 播放页：桌面端给固定导航留出高度，视频不被遮挡 */
@media (min-width: 769px) {
  body.play-page .player-section { padding-top: 62px !important; }
}


/* ============================================================
   播放页版块：视觉优先（图片为主，文字压到最小）
   ============================================================ */
/* 线路：不再是红色按钮，纯文字 */
body.play-page .source-tabs { gap: 10px !important; padding: 4px 0 4px !important; }
body.play-page .source-tabs .tab-btn {
  color: #6f6f6f !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-weight: 400 !important;
}
body.play-page .source-tabs .tab-btn.active {
  color: #dcdcdc !important;
  background: transparent !important;
  border: 0 !important;
  font-weight: 500 !important;
  position: relative;
}
body.play-page .source-tabs .tab-btn.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 2px; border-radius: 1px;
  background: #e50914;
}

@media (max-width: 768px) {
  /* 线路文字最小 */
  body.play-page .source-tabs .tab-btn { font-size: 9px !important; line-height: 1.3 !important; }
  /* 选集：8 列紧凑小格，灰字，当前集淡红底 */
  body.play-page .episode-list {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 3px !important;
    max-height: 84px;
    overflow-y: auto;
  }
  body.play-page .episode-list a {
    flex: 0 0 auto !important;
    font-size: 9px !important;
    font-weight: 400 !important;
    padding: 2px 6px !important;
    line-height: 1.3 !important;
    border: 1px solid #232323 !important;
    border-radius: 3px !important;
    background: transparent !important;
    color: #8a8a8a !important;
    letter-spacing: -0.2px;
  }
  body.play-page .episode-list a.active {
    color: #fff !important;
    background: rgba(229,9,20,.16) !important;
    border-color: #c1121f !important;
    font-weight: 500 !important;
  }
  /* 相关推荐：海报更大、文字最小 */
  body.play-page .related-section { padding: 8px 8px 62px !important; }
  body.play-page .related-section h2 {
    font-size: 10px !important; font-weight: 400 !important;
    color: #6f6f6f !important; margin: 4px 0 6px !important; letter-spacing: .5px;
  }
  body.play-page .related-section .scroll-row { gap: 6px !important; }
  body.play-page .related-section .scroll-row .poster-card { flex: 0 0 28% !important; min-width: 0 !important; }
  body.play-page .related-section .poster-wrap { border-radius: 4px !important; }
  body.play-page .related-section .poster-title {
    font-size: 9px !important; margin-top: 3px !important;
    line-height: 1.2 !important; color: #999 !important; letter-spacing: -0.2px;
  }
  body.play-page .related-section .poster-year { display: none !important; }
  body.play-page .related-section .rating-badge {
    font-size: 8px !important; padding: 0 3px !important; line-height: 12px !important;
    background: rgba(0,0,0,.62) !important; border-radius: 2px !important; font-weight: 500 !important;
  }
  /* 底部 tabbar 再小一点 */
  .app-tabbar { height: calc(52px + env(safe-area-inset-bottom, 0px)) !important; }
  .app-tabbar a { font-size: 9px !important; gap: 2px !important; }
  .app-tabbar a svg { width: 19px !important; height: 19px !important; }
}

/* ============================================================
   列表/筛选页：导航目录极简化（首屏直接给海报）
   ============================================================ */
/* 工具条：筛选按钮 + 排序 */
.list-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0 8px;
}
.filter-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  line-height: 1.5;
  color: #9a9a9a;
  background: rgba(255,255,255,.05);
  border: 1px solid #262626;
  border-radius: 3px;
  padding: 1px 8px;
  cursor: pointer;
}
.filter-toggle i { font-style: normal; font-size: 9px; color: #777; }
.filter-toggle.on { color: #fff; border-color: #7a1a1f; background: rgba(229,9,20,.14); }
.list-tools .sort-tabs { display: flex; gap: 2px; margin-left: auto; }
.list-tools .sort-tabs a {
  font-size: 11px;
  line-height: 1.5;
  color: #8a8a8a;
  padding: 1px 8px;
  border-radius: 3px;
}
.list-tools .sort-tabs a.active { color: #fff; background: rgba(255,255,255,.1); font-weight: 500; }

@media (max-width: 768px) {
  /* 页头与筛选整体压缩 */
  .main-content { margin-top: 54px !important; padding: 0 10px !important; }
  .page-header { padding: 2px 0 4px !important; }
  .page-header h1 { font-size: 15px !important; font-weight: 600 !important; color: #e6e6e6 !important; }
  .page-header .page-subtitle { display: none !important; }

  /* 子分类：单行横滑小胶囊 */
  .sub-menu {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    gap: 4px !important;
    padding: 3px 0 5px !important;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .sub-menu::-webkit-scrollbar { display: none; }
  .sub-menu a {
    flex: 0 0 auto;
    padding: 1px 8px !important;
    font-size: 10px !important;
    line-height: 1.6 !important;
    border: 1px solid #232323 !important;
    border-radius: 3px !important;
    color: #8a8a8a !important;
    white-space: nowrap;
  }
  .sub-menu a.active {
    color: #fff !important;
    background: rgba(229,9,20,.16) !important;
    border-color: #c1121f !important;
  }

  /* 筛选面板：默认收起，点“筛选”才展开 */
  .filter-section { display: none; margin: 0 0 6px !important; }
  .filter-section.open { display: block; }
  .filter-row {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 0 4px !important;
  }
  .filter-label {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    font-size: 9px !important;
    color: #5f5f5f !important;
    padding: 0 !important;
    font-weight: 400 !important;
  }
  .filter-tags {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    gap: 4px !important;
    padding-bottom: 1px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .filter-tags::-webkit-scrollbar { display: none; }
  .filter-tags a {
    flex: 0 0 auto;
    padding: 1px 7px !important;
    font-size: 10px !important;
    line-height: 1.6 !important;
    color: #8a8a8a !important;
    border: 1px solid #232323 !important;
    border-radius: 3px !important;
    background: transparent !important;
    white-space: nowrap;
  }
  .filter-tags a.active {
    color: #fff !important;
    background: rgba(229,9,20,.16) !important;
    border-color: #c1121f !important;
    font-weight: 500 !important;
  }
  .active-tags { gap: 4px !important; padding: 4px 0 !important; }
  .active-tags .tag-item {
    padding: 1px 7px !important;
    font-size: 10px !important;
    border-radius: 3px !important;
    background: rgba(255,255,255,.05) !important;
    border-color: #262626 !important;
    color: #999 !important;
  }

  /* 海报墙：3 列紧凑，只留图片和名字 */
  .poster-grid { gap: 6px !important; }
  .poster-year { display: none !important; }
  .section-row .section-header h2 { font-size: 10px !important; color: #6f6f6f !important; font-weight: 400 !important; }
  .paging { padding: 10px 0 !important; font-size: 10px !important; }
}
/* 桌面端：筛选常显，隐藏“筛选”按钮 */
@media (min-width: 769px) {
  .filter-section { display: block; margin-bottom: 12px; }
  .filter-toggle { display: none; }
  .list-tools { padding: 0 0 10px; }
}

/* 工具条不换行、排序字不被挤断 */
.list-tools { flex-wrap: nowrap !important; }
.filter-toggle { flex: 0 0 auto !important; white-space: nowrap !important; }
.list-tools .sort-tabs { flex: 0 0 auto !important; margin-left: auto !important; gap: 0 !important; }
.list-tools .sort-tabs a { white-space: nowrap !important; }

/* 全站手机端字号再压一档（视觉优先） */
@media (max-width: 768px) {
  body { font-size: 12px; }
  .page-header h1 { font-size: 14px !important; }
  .sub-menu a { font-size: 9px !important; padding: 1px 7px !important; }
  .filter-toggle { font-size: 10px !important; }
  .list-tools .sort-tabs a { font-size: 10px !important; padding: 1px 7px !important; }
  .poster-title, .scroll-row .poster-card .poster-title { font-size: 9px !important; margin-top: 2px !important; }
  .filter-tags a { font-size: 9px !important; padding: 1px 6px !important; }
  .section-header h2, .section-row .section-header h2 { font-size: 10px !important; }
  .hero-banner .banner-content h1 { font-size: 16px !important; }
  .hero-banner .banner-meta, .hero-banner .page-subtitle { font-size: 9px !important; }
  .paging a, .paging span { font-size: 10px !important; padding: 3px 7px !important; }
}

/* 播放页：竖屏手机视频至少占 2/5 屏高（画面填满，两侧少量裁切） */
@media (max-width: 768px) and (orientation: portrait) {
  body.play-page .player-section { padding: 0 !important; }
  body.play-page .player-container {
    aspect-ratio: auto !important;
    height: 50vh;          /* 老浏览器兜底 */
    height: 50svh !important;
    min-height: 260px;
    max-height: 72vh;
    max-height: 72svh;
    width: 100% !important;
    background: #000;
  }
  body.play-page .player-container iframe {
    height: 100% !important;
    width: 100% !important;
  }
}
/* 横屏 / 全屏时仍然原样完整显示，不裁切 */
@media (max-width: 768px) and (orientation: landscape) {
  body.play-page .player-container {
    aspect-ratio: auto !important;
    height: 100svh !important;
    max-height: 100svh !important;
  }
}

/* 播放页下半部分压暗，避免海报过亮抢视线 */
body.play-page .related-section img,
body.play-page .scroll-row .poster-wrap img {
  filter: brightness(.62) saturate(.85);
  transition: filter .2s;
}
body.play-page .related-section a:active img { filter: brightness(.85) saturate(1); }
body.play-page .related-section .poster-wrap { background: #0d0d0d !important; }
body.play-page .episode-list a { border-color: #1c1c1c !important; }

/* 播放页：底部导航缩小 + 下滑自动收起（上滑回来） */
@media (max-width: 768px) {
  body.play-page .app-tabbar {
    height: calc(44px + env(safe-area-inset-bottom, 0px)) !important;
    background: rgba(8, 8, 8, .82) !important;
    border-top: 1px solid rgba(255, 255, 255, .05) !important;
    backdrop-filter: blur(10px);
    transition: transform .25s ease, opacity .25s ease;
  }
  body.play-page .app-tabbar a { font-size: 8px !important; gap: 1px !important; }
  body.play-page .app-tabbar a svg { width: 17px !important; height: 17px !important; }
  body.play-page.tabbar-hidden .app-tabbar {
    transform: translateY(115%);
    opacity: 0;
    pointer-events: none;
  }
  body.play-page .related-section { padding-bottom: 54px !important; }
}

/* 播放器上方轻提示 */
.ok-toast {
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translate(-50%, -6px);
  z-index: 50;
  max-width: 80%;
  padding: 5px 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, .66);
  color: #fff;
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.ok-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================
   手机端 App 化：隐藏页脚、去掉网页痕迹
   ============================================================ */
@media (max-width: 768px) {
  /* 隐藏整块页脚（RSS/蜘蛛/版权）与返回顶部按钮，HTML 仍保留给搜索引擎 */
  .footer,
  .back-to-top {
    display: none !important;
  }
  /* 不显示滚动条 */
  html, body { scrollbar-width: none; -ms-overflow-style: none; }
  html::-webkit-scrollbar,
  body::-webkit-scrollbar,
  *::-webkit-scrollbar { width: 0 !important; height: 0 !important; display: none; }

  /* 去掉网页手感：点击高亮、长按选中、下拉刷新回弹 */
  html, body {
    overscroll-behavior-y: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    background: #0a0a0a;
  }
  input, textarea, .mac_input, .search-input { -webkit-user-select: text; user-select: text; }
  img, a { -webkit-user-drag: none; }
  a, button { -webkit-tap-highlight-color: transparent; }

  /* 页面底部不再留页脚空白 */
  body { padding-bottom: 0 !important; }
  main, .main-content { padding-bottom: 56px; }
}

/* 手机端彻底禁止横向滚动（App 手感） */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100%;
    width: 100%;
    position: relative;
  }
  img, video, iframe, table { max-width: 100%; }
}
