/* source: v8_header.php */
/* GLOBAL FLOATING ADS FIX */
.floating-ad-container {
    position: absolute !important;
    top: 50%;
    transform: translateY(-50%) !important;
    z-index: 999999 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    transition: top 0.5s cubic-bezier(0.23, 1, 0.32, 1) !important;
}
.floating-ad-container-left {
    left: 10px !important;
    right: auto !important;
}
.floating-ad-container-right {
    right: 10px !important;
    left: auto !important;
}

/* Hide standalone ads to prevent FOUC (Flash of Unstyled Content) layout shift */
.floating-ad, .floating-ad-esi {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Reveal and format them correctly once JS wraps them in the container */
.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: 140px !important;
    display: block !important;
    margin: 0 !important;
}

.floating-ad img, .floating-ad-esi img {
    width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
    display: block !important;
    margin: 0 !important;
}
@media screen and (max-width: 768px) {
    .floating-ad-container .floating-ad, 
    .floating-ad-container .floating-ad-esi {
        width: 110px !important;
    }
}

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

/* source: v8_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; }

#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;
}
