*{box-sizing:border-box}:root{--bg:#152018;--panel:#213026;--accent:#a7c957;--text:#f5faef;--muted:#9aaa91;--line:color-mix(in srgb,var(--text) 18%,transparent)}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--text);font:15px/1.6 Arial,"Microsoft YaHei",sans-serif}a{color:inherit;text-decoration:none}img{display:block;max-width:100%}.site-shell{min-height:100vh}.top-head{min-height:78px;padding:0 max(22px,calc((100% - 1360px)/2));display:flex;align-items:center;gap:28px;background:var(--panel);border-bottom:1px solid var(--line)}.brand{font-weight:900;font-size:21px;white-space:nowrap}.brand small{display:block;color:var(--muted);font:10px monospace;letter-spacing:2px}.top-head nav{display:flex;gap:11px;flex:1}.top-head nav a,.navline a{padding:8px 10px}form{display:flex}input{min-width:0;background:transparent;color:var(--text);border:1px solid var(--line);padding:10px 12px}button{border:0;background:var(--accent);padding:0 16px;font-weight:800}.navline{display:flex;justify-content:center;gap:25px;padding:10px;border-bottom:1px solid var(--line)}.main{width:min(1360px,calc(100% - 40px));margin:26px auto 50px}.hero{overflow:hidden;background:var(--panel);border-radius:18px;margin-bottom:28px}.hero .hero-primary{min-height:380px}.block{padding:18px;background:var(--panel);border-radius:18px;margin:0 0 28px}.section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.section-title b{font-size:24px}.section-title a{color:var(--accent)}.cards,.list-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:20px}.cards>*{min-width:0}.portal-card,.item{min-width:0;background:var(--panel);overflow:hidden;border-radius:18px}.portal-card img,.item img{width:100%;aspect-ratio:3/4;object-fit:cover}.portal-card h3,.item strong{display:block;margin:8px 4px 2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.card-meta,.item small{display:block;color:var(--muted);font-size:11px;margin:0 4px 8px}.poster{position:relative}.poster em,.remark{position:absolute;right:4px;bottom:4px;background:var(--accent);color:#111;padding:3px 6px;font-size:10px;font-style:normal}.hot{background:var(--panel);padding:16px;border-radius:18px}.hot>div{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.hot>div>*:nth-child(n+7){display:none}.hot img{width:100%;aspect-ratio:2/3;object-fit:cover}.list-head{padding:20px 0;border-bottom:1px solid var(--line);margin-bottom:22px}.list-head>span,.detail-info>small,.play header small,.search-head small{font:10px monospace;color:var(--accent);letter-spacing:2px}.list-head h1,.search-head h1{font-size:38px;margin:5px 0 15px}.xxf-subcats,.xxf-pagination,.episodes{display:flex;flex-wrap:wrap;gap:8px}.xxf-subcats a,.xxf-pagination a,.xxf-pagination span,.episodes a{border:1px solid var(--line);padding:7px 11px}.xxf-page-wrap{display:flex;justify-content:center;margin:30px 0}.detail{display:grid;grid-template-columns:245px minmax(0,1fr) 260px;gap:21px}.detail-poster,.detail-info,.related{background:var(--panel);padding:16px;border-radius:18px}.detail-poster img{width:100%;aspect-ratio:2/3;object-fit:cover}.detail-info h1{font-size:40px;line-height:1.1;margin:8px 0 20px}.detail-info dl div{display:grid;grid-template-columns:60px 1fr;padding:7px 0;border-top:1px solid var(--line)}dt{color:var(--muted)}dd{margin:0}.summary{margin:20px 0;color:var(--muted)}.play-btn{display:inline-block;background:var(--accent);color:#111;padding:11px 20px;font-weight:900}.related>div{display:grid;grid-template-columns:1fr 1fr;gap:8px}.related>div>*:nth-child(n+7){display:none}.stage{background:#000;padding:6px;border-radius:18px;overflow:hidden}.stage video,.stage iframe{width:100%;min-height:520px}.play-bottom{display:grid;grid-template-columns:1fr 340px;gap:20px;margin-top:20px}.play-bottom>article,.play-bottom>aside{background:var(--panel);padding:18px;border-radius:18px}.search-head{display:grid;grid-template-columns:120px 1fr minmax(280px,480px);align-items:center;gap:16px;margin-bottom:24px}.footer{width:min(1360px,calc(100% - 40px));margin:0 auto;padding:25px 0;border-top:1px solid var(--line);display:flex;gap:20px;color:var(--muted)}.footer p{margin:0 0 0 auto}.site-shell{padding-left:250px}.side-head{position:fixed;inset:0 auto 0 0;width:250px;background:var(--panel);padding:30px 22px}.side-head nav{display:grid;margin:30px 0}.side-head nav a{padding:10px;border-left:4px solid var(--accent);margin:4px 0}.shelf-label{font:24px Georgia,serif;border-bottom:4px double var(--accent);padding-bottom:12px}.block{border-bottom:8px solid color-mix(in srgb,var(--panel) 70%,#000)}.item{box-shadow:inset 0 -8px 0 color-mix(in srgb,var(--accent) 30%,transparent)}
@media(max-width:1000px){.cards,.list-grid{grid-template-columns:repeat(4,1fr)}.detail{grid-template-columns:220px 1fr}.related{grid-column:1/-1}.home-two,.mag-cover,.home-grid,.dash,.paper-grid,.retro-grid,.neon-grid,.guide-grid,.mosaic{grid-template-columns:1fr}.festival-cols{column-count:1}.site-shell{padding-left:0!important}.side-head{position:static!important;width:auto!important;display:block!important}.side-head nav{display:flex!important;overflow:auto!important}}
@media(max-width:700px){.top-head{display:block;padding:14px 16px}.top-head nav{overflow:auto;margin:10px 0}.top-head form{display:none}.main{width:calc(100% - 24px);margin-top:14px}.cards,.list-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.detail,.play-bottom,.search-head{display:block}.detail-poster{max-width:260px;margin:0 auto 15px}.stage video,.stage iframe{min-height:230px}.footer{display:block;width:calc(100% - 24px)}.footer p{margin-top:8px}.hero{min-height:260px!important}.minimal-intro h1{font-size:44px}}

/* XXF_REMARK_POSITION_FIX_V1
 * 状态标签必须锁定在所属海报内部，
 * 防止 absolute 元素相对于页面定位。
 */
.posterbox {
    position: relative !important;
}

.posterbox .remark {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 5 !important;
    display: inline-block !important;
    width: auto !important;
    max-width: calc(100% - 16px) !important;
    margin: 0 !important;
}


/* XXF_EMPTY_HERO_REMOVE_V1
 * Hero内容已取消，因此同时取消Hero外壳占位。
 */
.hero:empty {
    display: none !important;
    min-height: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

/* ==========================================================
   XXF_PLAYER_SIZE_FIX_V2
   播放页统一尺寸
   ========================================================== */

.stage,
.player-stage {
    width: 100% !important;
    max-width: 960px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.stage video,
.stage iframe,
.player-stage video,
.player-stage iframe,
video.mv-player,
iframe.mv-player {
    display: block !important;
    box-sizing: border-box !important;

    width: 100% !important;
    max-width: 960px !important;

    min-height: 0 !important;
    max-height: 540px !important;

    aspect-ratio: 16 / 9 !important;

    margin-left: auto !important;
    margin-right: auto !important;

    object-fit: contain !important;
    background: #000 !important;
}

.stage video,
.player-stage video,
video.mv-player {
    height: auto !important;
}

.stage iframe,
.player-stage iframe,
iframe.mv-player {
    height: min(54vw, 540px) !important;
}

@media (max-width: 700px) {

    .stage,
    .player-stage {
        width: 100% !important;
        max-width: 100% !important;
    }

    .stage video,
    .stage iframe,
    .player-stage video,
    .player-stage iframe,
    video.mv-player,
    iframe.mv-player {
        width: 100% !important;
        max-width: 100% !important;

        min-height: 0 !important;
        max-height: none !important;

        aspect-ratio: 16 / 9 !important;
    }

    .stage video,
    .player-stage video,
    video.mv-player {
        height: auto !important;
    }

    .stage iframe,
    .player-stage iframe,
    iframe.mv-player {
        height: 56.25vw !important;
        max-height: 56.25vw !important;
    }
}

/* XXF_ALL_HOME_LAYOUT_FIX_V31_BEGIN */

/*
 * MOVIE002-080 首页布局安全层
 * 保留各模板主题视觉，只修复失控布局。
 */

body .site-shell{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    margin-left:auto !important;
    margin-right:auto !important;
}

body .main{
    width:min(1380px,calc(100% - 40px)) !important;
    max-width:1380px !important;
    min-width:0 !important;
    margin-left:auto !important;
    margin-right:auto !important;
    box-sizing:border-box !important;
}

/* 消除栏目整体漂移 */
body .main > .block,
body .main > .gallery-lead,
body .main > .mosaic,
body .main > .dashboard,
body .main > .content-grid{
    transform:none !important;
    left:auto !important;
    right:auto !important;
    margin-left:0 !important;
    margin-right:0 !important;
    box-sizing:border-box !important;
}

/* 普通栏目保持完整宽度 */
body .main > .block{
    width:100% !important;
    max-width:none !important;
    clear:both !important;
}

/* MOVIE035这类错位结构 */
body .gallery-lead{
    display:block !important;
    width:100% !important;
    max-width:none !important;
}

body .gallery-lead > .block{
    width:100% !important;
    max-width:none !important;
    margin-left:0 !important;
    margin-right:0 !important;
    transform:none !important;
}

/* mosaic/dashboard不能把主体压窄 */
body .mosaic,
body .dashboard{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
}

/* 禁止第一张卡片异常跨列 */
body .block .cards > *{
    grid-column:auto !important;
    grid-row:auto !important;
    transform:none !important;
}

body .block > .cards{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    box-sizing:border-box !important;
}

/* 卡片自身不能撑坏网格 */
body .portal-card,
body .card{
    min-width:0 !important;
    max-width:100% !important;
    box-sizing:border-box !important;
}

body .posterbox{
    width:100% !important;
    max-width:100% !important;
    overflow:hidden !important;
}

body .posterbox img{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    height:100% !important;
    object-fit:cover !important;
}

/* 热播区安全布局 */
body .hot{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    box-sizing:border-box !important;
}

body .main > .hot > div{
    display:grid !important;
    grid-template-columns:repeat(6,minmax(0,1fr)) !important;
    gap:14px !important;
}

body .main > .hot .portal-card{
    width:auto !important;
    max-width:none !important;
}

/* 空hero禁止制造巨大空白 */
body .hero:empty{
    display:none !important;
    min-height:0 !important;
    height:0 !important;
    margin:0 !important;
    padding:0 !important;
}

@media (min-width:1201px){
    body .main{
        width:min(1380px,calc(100% - 48px)) !important;
    }
}

@media (max-width:1200px){
    body .main{
        width:calc(100% - 32px) !important;
    }

    body .main > .hot > div{
        grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    }
}

@media (max-width:800px){
    body .main{
        width:calc(100% - 24px) !important;
    }

    body .main > .hot > div{
        grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    }
}

@media (max-width:560px){
    body .main{
        width:calc(100% - 20px) !important;
    }

    body .main > .hot > div{
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
        gap:10px !important;
    }
}

/* XXF_ALL_HOME_LAYOUT_FIX_V31_END */


/* XXF_HOME_LAYOUT_FINAL_V5_BEGIN
 *
 * 首页布局最终安全层。
 *
 * 只解决：
 * - 主体异常变窄
 * - 首页父级容器继续压缩内容
 * - section横向漂移
 * - 首张卡片异常跨列
 *
 * 不统一各模板原始cards列数。
 * 不修改detail/play/list核心结构。
 */

/*
 * site-shell自身不得把页面缩窄。
 * 保留特殊侧栏模板可能存在的正常padding，
 * 这里只阻止宽度和transform造成整体压缩。
 */
body .site-shell {
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    transform:none !important;
}

/*
 * main恢复成正常PC内容区域。
 *
 * 不采用固定1360/1440，
 * 这样不同模板仍保留自身视觉差异；
 * 这里只设一个安全上限1380。
 */
body .main {
    width:min(1380px,calc(100% - 40px)) !important;
    max-width:1380px !important;
    min-width:0 !important;

    margin-left:auto !important;
    margin-right:auto !important;

    transform:none !important;
}

/*
 * 首页常见外层结构不能再次限制main宽度。
 */
body .main > .mag-cover,
body .main > .mosaic,
body .main > .dashboard,
body .main > .home-two,
body .main > .home-grid,
body .main > .paper-grid,
body .main > .retro-grid,
body .main > .neon-grid,
body .main > .guide-grid,
body .main > .content-grid,
body .main > .gallery-lead {
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;

    margin-left:0 !important;
    margin-right:0 !important;

    transform:none !important;
}

/*
 * 这些父级内部元素允许正常收缩，
 * 但不能反过来把父容器撑坏或压窄。
 */
body .main > .mag-cover > *,
body .main > .mosaic > *,
body .main > .dashboard > *,
body .main > .home-two > *,
body .main > .home-grid > *,
body .main > .paper-grid > *,
body .main > .retro-grid > *,
body .main > .neon-grid > *,
body .main > .guide-grid > *,
body .main > .content-grid > *,
body .main > .gallery-lead > * {
    min-width:0 !important;
    max-width:100%;
}

/*
 * 普通栏目块始终使用父容器完整宽度。
 */
body .main > .block,
body .main .gallery-lead > .block {
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;

    margin-left:0 !important;
    margin-right:0 !important;

    transform:none !important;
}

/*
 * 清除原模板：
 * .block:nth-child(even){transform:translateX(...)}
 *
 * 这是目前电影/电视剧栏目左右漂移的重要来源。
 */
body .main .block:nth-child(n) {
    transform:none !important;
}

/*
 * 清除原模板：
 * .block:nth-child(odd) .cards>*:first-child{
 *     grid-column:span 2
 * }
 *
 * 不改变cards本身的4/5/6/7列设计。
 */
body .main .block .cards > * {
    grid-column:auto !important;
    min-width:0 !important;
}

/*
 * cards仍使用每套模板自己原来的列数。
 * 这里只保证grid不会产生最小内容宽度反撑。
 */
body .main .cards,
body .main .list-grid {
    width:100%;
    max-width:100%;
    min-width:0;
}

/*
 * 首页hot区域不能因为历史补丁留下的
 * max-width / width / transform 再次变窄。
 */
body .main > .hot,
body .main .mosaic .hot,
body .main .mag-cover .hot,
body .main .dashboard .hot {
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    transform:none !important;
}

/*
 * 手机和平板只修main宽度。
 * cards列数继续交给各模板原来的media规则。
 */
@media (max-width:1200px) {
    body .main {
        width:calc(100% - 32px) !important;
        max-width:none !important;
    }
}

@media (max-width:800px) {
    body .main {
        width:calc(100% - 24px) !important;
        max-width:none !important;
    }
}

@media (max-width:560px) {
    body .main {
        width:calc(100% - 20px) !important;
        max-width:none !important;
    }
}

/* XXF_HOME_LAYOUT_FINAL_V5_END */
