/* source: v31_header.php */
* { box-sizing: border-box; margin: 0; padding: 0; }
        body {
            background-color: #121212;
            color: #e0e0e0;
            font-family: Arial, sans-serif;
            font-size: 13.5px;
            line-height: 1.4;
            padding-top: 54px;
        }
        a { color: #ffffff; text-decoration: none; transition: color 0.2s; }
        a:hover { color: #ff8a00; }
        img { display: block; width: 100%; height: auto; }

        /* 顶部导航：紧凑、黑橙 */
        .v31-header {
            position: fixed; top: 0; left: 0; right: 0; height: 54px;
            background-color: #1b1b1b; z-index: 1000;
            border-bottom: 2px solid #ff8a00;
        }
        .v31-nav {
            max-width: 1200px; margin: 0 auto; height: 100%;
            display: flex; align-items: center; justify-content: space-between; padding: 0 10px;
        }
        .v31-logo {
            font-size: 20px; font-weight: bold; color: #ff8a00 !important;
            text-transform: uppercase; display: flex; align-items: center; gap: 4px; flex-shrink: 0;
        }
        .v31-logo span { background: #ff8a00; color: #000; padding: 2px 6px; border-radius: 3px; font-weight: 900; }
        .v31-menu { display: flex; gap: 15px; overflow: hidden; }
        .v31-menu a { font-size: 13.5px; color: #bbb; font-weight: bold; white-space: nowrap; }
        .v31-menu a:hover, .v31-menu a.active { color: #ff8a00; }

        /* 搜索框 */
        .v31-search-container { display: flex; align-items: center; background: #2a2a2a; border-radius: 4px; border: 1px solid #333; overflow: hidden; height: 32px; }
        .v31-search-input { background: none; border: none; padding: 5px 10px; color: #fff; outline: none; font-size: 12px; width: 140px; transition: width 0.3s; }
        .v31-search-input:focus { width: 200px; }
        .v31-search-submit { background: #ff8a00; border: none; color: #000; font-weight: bold; padding: 0 12px; cursor: pointer; height: 100%; font-size: 12px; }

        .v31-mobile-menu-btn { display: none; background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; }

        @media (max-width: 768px) {
            .v31-menu { display: none; }
            .v31-search-container { display: none; }
            .v31-mobile-menu-btn { display: block; }
            .v31-menu.show {
                display: flex; flex-direction: column; position: absolute; top: 54px; left: 0; right: 0;
                background: #1b1b1b; padding: 15px; border-bottom: 2px solid #ff8a00; gap: 12px; z-index: 999;
            }
        }

        /* 图片强制提亮去遮罩 */
        .thumbnail img, .lazy, .lozad { opacity: 1 !important; filter: none !important; backdrop-filter: none !important; }

        /* 悬浮广告图标容器 */
        .floating-ad-container { position: fixed; top: 50%; transform: translateY(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
        .floating-ad-container-left { left: 6px; right: auto; }
        .floating-ad-container-right { right: 6px; left: auto; }
        .floating-ad, .floating-ad-esi { position: absolute; opacity: 0; pointer-events: none; }
        .floating-ad-container .floating-ad, .floating-ad-container .floating-ad-esi {
            position: relative !important; opacity: 1 !important; pointer-events: auto !important;
            top: auto !important; left: auto !important; right: auto !important;
            transform: none !important; width: 110px !important; display: block !important; margin: 0 !important;
        }
        .floating-ad img, .floating-ad-esi img { width: 100% !important; height: auto !important; border-radius: 6px !important; box-shadow: 0 3px 10px rgba(0,0,0,0.4) !important; }
        @media (max-width: 768px) { .floating-ad-container .floating-ad, .floating-ad-container .floating-ad-esi { width: 80px !important; } }

        /* 弹窗广告全局样式 */
        .ad-popup-mask {
            display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.85); z-index: 99998; align-items: center; justify-content: center;
        }
        .ad-popup-card { background: #1b1b1b; border: 2px solid #ff8a00; border-radius: 6px; max-width: 460px; width: 92%; overflow: hidden; box-shadow: 0 0 30px rgba(255,138,0,0.3); }
        .ad-popup-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: rgba(255,138,0,0.1); border-bottom: 1px solid #333; }
        .ad-popup-title { color: #ff8a00; font-weight: bold; font-size: 13px; }
        .ad-popup-x { cursor: pointer; color: #ff8a00; font-size: 18px; line-height: 1; padding: 2px 6px; }
        .ad-popup-body { padding: 14px; }
        .ad-popup-content img { max-width: 100%; border-radius: 4px; }
        .ad-popup-footer { padding: 10px 14px 14px; text-align: center; }
        .ad-btn-close { background: #ff8a00; color: #000; border: none; border-radius: 3px; padding: 8px 24px; font-weight: bold; cursor: pointer; }

        #header-ads-container { max-width: 1200px; margin: 0 auto; padding: 0 10px; }

/* source: v31_header.php */
html,body{overflow-x:hidden !important;max-width:100vw;}

/* source: v31_index.php */
/* SpankBang 高密度无缝布局 */
    .v31-content { max-width: 1200px; margin: 0 auto; padding: 15px 10px; }
    
    .v31-title {
        font-size: 18px; font-weight: bold; color: #ffffff; margin: 15px 0 10px;
        display: flex; justify-content: space-between; align-items: center;
    }
    .v31-title a { font-size: 12px; color: #ff8a00; font-weight: normal; }

    /* 无间距紧凑网格 */
    .v31-grid {
        display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
    }
    @media (min-width: 768px) { .v31-grid { grid-template-columns: repeat(4, 1fr); } }
    @media (min-width: 1024px) { .v31-grid { grid-template-columns: repeat(5, 1fr); } }

    .v31-card {
        background-color: #1b1b1b; border-radius: 4px; overflow: hidden;
        transition: transform 0.2s; position: relative; border: 1px solid #222;
    }
    .v31-card:hover { transform: scale(1.03); border-color: #ff8a00; }
    .v31-card-img { position: relative; aspect-ratio: 16/10; background: #000; overflow: hidden; }
    .v31-card-img img { width: 100%; height: 100%; object-fit: cover; }
    .v31-card-duration {
        position: absolute; bottom: 4px; right: 4px; background: rgba(0,0,0,0.8);
        color: #ff8a00; font-size: 10px; padding: 2px 4px; border-radius: 2px; font-weight: bold;
    }
    .v31-card-title-wrap { padding: 8px; }
    .v31-card-title {
        font-size: 12.5px; font-weight: bold; color: #fff; display: block;
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .v31-card:hover .v31-card-title { color: #ff8a00; }

/* source: v31_list.php */
.v31-content { max-width: 1200px; margin: 0 auto; padding: 15px 10px; }

    .v31-breadcrumb { font-size: 13px; color: #ffffff !important; margin-bottom: 15px; font-weight: bold; }
    .v31-breadcrumb a { color: #ffffff !important; opacity: 0.8; }
    .v31-breadcrumb a:hover { color: #ff8a00 !important; }

    /* 筛选条件样式 */
    .v31-filter-box {
        background: #1b1b1b; border: 1px solid #222; border-radius: 4px;
        padding: 12px 15px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    }
    .v31-filter-label { color: #ffffff !important; font-weight: bold; font-size: 13.5px; }
    .v31-filter-item {
        color: #ffffff !important; font-size: 12.5px; text-decoration: none; padding: 5px 12px;
        border-radius: 3px; border: 1px solid transparent; transition: all 0.2s; opacity: 0.85;
    }
    .v31-filter-item:hover { color: #ff8a00 !important; background: rgba(255, 255, 255, 0.05); opacity: 1; }
    .v31-filter-item.active-filter {
        background: rgba(255, 138, 0, 0.15) !important; border-color: #ff8a00 !important;
        color: #ff8a00 !important; font-weight: bold; opacity: 1;
    }

    /* 专题横幅 */
    .v31-topic-header {
        position: relative; border-radius: 4px; overflow: hidden; border: 1px solid #ff8a00;
        padding: 25px; background-size: cover; background-position: center; margin-bottom: 20px;
    }
    .v31-topic-mask {
        position: absolute; top: 0; left: 0; right: 0; bottom: 0;
        background: linear-gradient(180deg, rgba(18,18,18,0.9) 0%, rgba(18,18,18,0.7) 100%);
    }
    .v31-topic-content { position: relative; z-index: 2; max-width: 700px; }

    .v31-title-bar {
        font-size: 14.5px; font-weight: bold; color: #ffffff !important; margin-bottom: 12px;
        border-left: 3px solid #ff8a00; padding-left: 8px; text-transform: uppercase;
    }

    /* 网格与卡片 */
    .v31-grid {
        display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
    }
    @media (min-width: 768px) { .v31-grid { grid-template-columns: repeat(4, 1fr); } }
    @media (min-width: 1024px) { .v31-grid { grid-template-columns: repeat(5, 1fr); } }

    .v31-card {
        background-color: #1b1b1b; border-radius: 4px; overflow: hidden;
        transition: transform 0.2s; position: relative; border: 1px solid #222;
    }
    .v31-card:hover { transform: translateY(-3px); border-color: #ff8a00; }
    .v31-card-img { position: relative; aspect-ratio: 16/10; overflow: hidden; }
    .v31-card-img img { width: 100%; height: 100%; object-fit: cover; }
    .v31-card-duration {
        position: absolute; bottom: 4px; right: 4px; background: rgba(0,0,0,0.8);
        color: #ff8a00; font-size: 10px; padding: 2px 4px; border-radius: 2px;
    }
    .v31-card-title-wrap { padding: 8px; }
    .v31-card-title {
        font-size: 12.5px; font-weight: bold; color: #fff; display: block;
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }

    /* 分页 */
    .v31-pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 25px; }
    .v31-pagination a, .v31-pagination span {
        padding: 6px 12px; background: #1b1b1b; border: 1px solid #333;
        color: #ffffff; border-radius: 3px; font-size: 12px; transition: 0.2s; text-decoration: none;
    }
    .v31-pagination a:hover { border-color: #ff8a00; color: #ff8a00; }
    .v31-pagination span.current { background: rgba(255, 138, 0, 0.15); border-color: #ff8a00; color: #ff8a00; font-weight: bold; }

/* source: v31_play.php */
/* SpankBang 独占样式 */
    .v31-breadcrumb { font-size: 13px; color: #ffffff !important; margin-bottom: 15px; font-weight: bold; }
    .v31-breadcrumb a { color: #ffffff !important; opacity: 0.8; }
    .v31-breadcrumb a:hover { color: #ff8a00 !important; }

    .v31-play-layout { display: flex; flex-direction: column; gap: 15px; }
    @media (min-width: 992px) { .v31-play-layout { flex-direction: row; } }
    .v31-play-main { flex: 2.2; min-width: 0; }
    .v31-play-side { flex: 0.8; }

    .v31-player-container {
        position: relative !important; overflow: hidden !important; background: #000 !important;
        width: 100% !important; border-radius: 4px !important; border: 1px solid #ff8a00 !important;
        margin-bottom: 20px;
    }
    #video-player {
        background: #000 !important; width: 100% !important; height: auto !important;
        aspect-ratio: 16/9 !important; display: block !important;
    }

    /* 广告 */
    #player-pre-ad {
        position: absolute; top: 0; left: 0; width: 100%; height: 100%;
        z-index: 1001; background: #000; display: flex; align-items: center; justify-content: center;
    }
    #player-pre-ad img { width: 100%; height: 100%; object-fit: cover; }
    #ad-timer {
        position: absolute; top: 15px; right: 15px; background: rgba(0,0,0,0.85);
        color: #ff8a00; padding: 4px 10px; border-radius: 4px; font-size: 11.5px;
        z-index: 1002; border: 1px solid #ff8a00;
    }
    #ad-skip {
        position: absolute; bottom: 25px; right: 20px; background: #ff8a00; color: #000 !important;
        padding: 6px 16px; border-radius: 3px; font-size: 12.5px; font-weight: bold; cursor: pointer;
        z-index: 1002; border: 1px solid #000;
    }

    /* 详情卡片 */
    .v31-side-card {
        background: #1b1b1b; border: 1px solid #222; border-radius: 4px;
        padding: 15px; margin-bottom: 15px;
    }
    .v31-side-info-row { display: flex; gap: 12px; margin-bottom: 15px; }
    .v31-side-info-row img { width: 80px; height: 105px; object-fit: cover; border-radius: 3px; border: 1px solid #333; }
    
    .v31-ep-btn {
        display: inline-block; padding: 6px 12px; background: #262626; border: 1px solid #333;
        color: #ddd !important; border-radius: 3px; font-size: 11.5px; margin: 2px; transition: 0.2s;
    }
    .v31-ep-btn:hover { border-color: #ff8a00; color: #fff !important; }
    .v31-ep-btn.active-ep { border-color: #ff8a00 !important; color: #ff8a00 !important; background: rgba(255,138,0,0.1) !important; font-weight: bold; }

    .v31-box { background: #1b1b1b; border: 1px solid #222; border-radius: 4px; padding: 15px; margin-bottom: 20px; }
    .v31-title-bar {
        font-size: 14.5px; font-weight: bold; color: #ffffff !important; margin-bottom: 12px;
        border-left: 3px solid #ff8a00; padding-left: 8px; text-transform: uppercase;
    }

    .v31-cmt-card { border-bottom: 1px solid #262626; padding-bottom: 12px; margin-bottom: 12px; }
    .v31-cmt-card:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

    /* ===【修复】推荐视频封面图统一尺寸=== */
    .v31-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin-top: 15px !important;
        margin-bottom: 30px !important;
    }
    @media (min-width: 768px) {
        .v31-grid {
            grid-template-columns: repeat(4, 1fr) !important;
        }
    }
    @media (min-width: 1024px) {
        .v31-grid {
            grid-template-columns: repeat(5, 1fr) !important;
        }
    }
    .v31-card {
        position: relative !important;
        background: #181818 !important;
        border-radius: 4px !important;
        overflow: hidden !important;
        border: 1px solid #222 !important;
        transition: all 0.2s ease !important;
    }
    .v31-card:hover {
        border-color: #ff8a00 !important;
    }
    .v31-card-duration {
        position: absolute !important;
        bottom: 4px !important;
        right: 4px !important;
        background: rgba(0,0,0,0.8) !important;
        color: #ff8a00 !important;
        font-size: 10px !important;
        padding: 1px 4px !important;
        border-radius: 2px !important;
        z-index: 10 !important;
    }
    .v31-card-title-wrap {
        padding: 8px !important;
    }
    .v31-card-title {
        font-size: 13px !important;
        font-weight: bold !important;
        color: #ccc !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
    }
    .v31-card:hover .v31-card-title { color: #fff !important; }

    .v31-card-img {
        position: relative !important;
        aspect-ratio: 16 / 9 !important;
        overflow: hidden !important;
        background: #0f0f0f;
        width: 100%;
    }
    .v31-card-img img {
        position: absolute !important;
        top: 0 !important; left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center top !important;
        display: block !important;
    }

#video-player { aspect-ratio: 16/9; }
@media (max-width: 768px) {
    /* 播放器本身改为4:3 */
    #video-player { aspect-ratio: 4/3 !important; height: auto !important; }
    /* 所有父容器同步改为4:3，防止absolute定位的播放器溢出遮挡标题 */
    div.player-wrapper,
    div.player-box,
    div.player-container,
    div.video-player-wrap,
    div.portal-player-wrap,
    div.video-container,
    div.embed-responsive,
    div.media-player,
    div.play-box,
    div.play-wrap,
    div.player-inner {
        aspect-ratio: 4/3 !important;
    }
}

/* 旧版手机浏览器 aspect-ratio 兼容 */
/* 确保#video-player有高度（兼容不支持aspect-ratio的旧浏览器）*/
@supports not (aspect-ratio: 16/9) {
    #video-player { position:relative; height:0; padding-bottom:56.25%; min-height:0; }
    #video-player .art-video-player { position:absolute; top:0; left:0; width:100%; height:100%; min-height:0; }
}
@media (max-width: 768px) {
    @supports not (aspect-ratio: 4/3) {
        #video-player { padding-bottom:75%; }
    }
}


/* ===== 核心修复：强制所有播放器父容器不截断控制栏 ===== */
div.player-wrapper,
div.player-box,
div.player-container,
div.video-player-wrap,
div.portal-player-wrap,
div.video-container,
div.embed-responsive,
div.media-player,
div.play-box,
div.play-wrap,
div.player-inner {
    overflow: visible !important;
}

/* source: v31_play.php */
/* 防止手机端页面左右滑动 */
html { overflow-x: hidden !important; max-width: 100vw !important; }
body { overflow-x: hidden !important; }
#video-player { max-width: 100% !important; box-sizing: border-box !important; }
.art-video-player { max-width: 100% !important; overflow-x: hidden !important; }
.art-video-player { overflow: visible !important; }
.art-video-player .art-bottom { position:absolute!important; bottom:0!important; top:auto!important; left:0!important; right:0!important; background:linear-gradient(transparent,rgba(0,0,0,0.8))!important; display:flex!important; flex-direction:column!important; }
.art-video-player .art-bottom .art-progress { order:-1!important; height:8px!important; cursor:pointer!important; }
.art-video-player .art-bottom .art-progress .art-control-progress-played { background:linear-gradient(90deg,#ff4500,#ff8c00)!important; height:8px!important; border-radius:4px!important; }
.art-video-player .art-bottom .art-progress .art-control-progress-inner { height:8px!important; border-radius:4px!important; background:rgba(255,255,255,0.2)!important; }
.art-video-player .art-bottom .art-progress .art-control-progress-indicator { width:14px!important; height:14px!important; top:-3px!important; background:#fff!important; box-shadow:0 0 6px rgba(255,69,0,0.9)!important; }
.art-video-player .art-bottom .art-controls { height:44px!important; }
.art-video-player .art-bottom .art-controls .art-control { color:#fff!important; opacity:1!important; visibility:visible!important; }
.art-video-player .art-bottom .art-controls .art-control svg,.art-video-player .art-bottom .art-controls .art-control svg path { fill:#fff!important; opacity:1!important; }
.art-video-player .art-bottom .art-controls .art-control-time { color:#fff!important; }
.art-video-player .art-mini-progress,.art-video-player .art-progress-mini { display:none!important; height:0!important; opacity:0!important; }
/* 播放按钮绝对居中 PC+手机 */
.art-video-player .art-mask { position:absolute!important; top:0!important; left:0!important; width:100%!important; height:100%!important; display:flex!important; align-items:center!important; justify-content:center!important; }
.art-video-player .art-mask .art-state { position:static!important; top:auto!important; left:auto!important; right:auto!important; bottom:auto!important; transform:none!important; }

/* source: v31_footer.php */
.v31-footer {
        background-color: #111; color: #777; padding: 35px 15px 25px;
        border-top: 2px solid #ff8a00; font-size: 12px; margin-top: 25px;
    }
    .v31-foot-container { max-width: 1200px; margin: 0 auto; }
    .v31-foot-title { color: #ff8a00; font-weight: bold; margin-bottom: 12px; font-size: 12.5px; text-transform: uppercase; }
    .v31-foot-grid {
        display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 18px;
    }
    @media (min-width: 480px) { .v31-foot-grid { grid-template-columns: repeat(3, 1fr); } }
    @media (min-width: 768px) { .v31-foot-grid { grid-template-columns: repeat(5, 1fr); } }
    @media (min-width: 1024px) { .v31-foot-grid { grid-template-columns: repeat(6, 1fr); } }
    .v31-foot-grid a { color: #555; text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: bold; font-size: 11.5px; }
    .v31-foot-grid a:hover { color: #ff8a00; }
    .v31-foot-info { border-top: 1px solid #222; padding-top: 12px; display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
    .v31-disclaimer { max-width: 900px; font-size: 10.5px; color: #444; line-height: 1.5; }
    .v31-copyright { color: #ff8a00; font-weight: bold; font-size: 11px; }

    /* 返回顶部按钮 */
    .back-to-top {
        position: fixed;
        bottom: 30px;
        right: 30px;
        width: 45px;
        height: 45px;
        border-radius: 50%;
        background-color: #ff8a00;
        color: #000000;
        border: none;
        outline: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(0,0,0,0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 9999;
    }
    .back-to-top.show {
        opacity: 1;
        visibility: visible;
    }
    .back-to-top:hover {
        background-color: #ffa534;
        transform: translateY(-3px);
    }
    .back-to-top svg {
        width: 22px;
        height: 22px;
    }
