body, html { 
    margin: 0; padding: 0; height: 100%; overflow: hidden; 
    background: #000 url('../img/bg.jpg') no-repeat center center; 
    background-size: cover;
}
#artplayer { width: 100%; height: 100%; background: transparent; }

/* 广告遮罩层 */
.ad-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 9999; background: #000; display: none;
    flex-direction: column; justify-content: center; align-items: center;
}
.ad-content { max-width: 100%; max-height: 100%; cursor: pointer; }
.ad-timer {
    position: absolute; top: 20px; right: 20px;
    background: rgba(0,0,0,0.5); color: #fff;
    padding: 5px 10px; border-radius: 4px; font-size: 14px;
    cursor: pointer; pointer-events: auto;
    z-index: 10000;
}

/* 暂停广告专用 */
#ad-pause { background: rgba(0,0,0,0.7); }

.pause-ad-wrapper {
    position: relative;
    width: 666px;
    height: 366px;
    max-width: 100%;
    max-height: 100%;
}
.pause-ad-content {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pause-ad-top-right {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    z-index: 10;
}
.pause-ad-badge {
    background: rgba(0,0,0,0.5);
    color: #fff;
    padding: 5px 10px;
    font-size: 14px;
    pointer-events: none;
}
.pause-ad-close {
    background: #f44336;
    color: #fff;
    padding: 5px 10px;
    font-size: 14px;
    cursor: pointer;
}

.error-msg { color: #fff; text-align: center; margin-top: 20%; font-family: sans-serif; }

/* 强制隐藏 ArtPlayer 右键菜单版本号 */
.art-contextmenu a[href*="artplayer"] { display: none !important; }

/* 仅在初始加载阶段（body有loading类）隐藏播放器内部 Loading，防止双图标重叠 */
body.loading .art-layer-loading { display: none !important; }

/* 自定义暂停状态图标位置：右下角 */
.art-video-player .art-state {
    top: auto !important;
    left: auto !important;
    bottom: 60px !important;
    right: 20px !important;
    transform: none !important;
    position: absolute !important;
    margin: 0 !important;
}
/* 调整图标大小，避免太大 */
.art-video-player .art-state img {
    width: 60px;
    height: 60px;
}

/* 旋转按钮 (浮动层) */
.art-layer-rotate {
    display: none; /* 默认隐藏 (PC不显示) */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 60; /* 提高层级 */
}

/* 锁定按钮 (浮动层) */
.art-layer-lock {
    display: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 60; /* 提高层级 */
}

/* 移动端显示并优化 */
@media (max-width: 768px) {
    .art-layer-rotate {
        display: flex;
        width: 40px;
        height: 40px;
        right: 15px;
        background: rgba(0, 0, 0, 0.5);
    }
    .art-layer-rotate svg {
        width: 22px;
        height: 22px;
    }
    
    /* 锁定按钮 */
    .art-layer-lock {
        display: flex;
        width: 40px;
        height: 40px;
        left: 15px;
        background: rgba(0, 0, 0, 0.5);
    }
    .art-layer-lock svg {
        width: 22px;
        height: 22px;
    }

    /* 交互显示逻辑 */
    .art-video-player.art-hover .art-layer-rotate,
    .art-video-player.art-hover .art-layer-lock {
        opacity: 1;
        pointer-events: auto;
    }

    /* --- 锁定模式 (仅移动端) --- */
    .art-locked-mode .art-layer-lock {
        opacity: 1 !important;
        pointer-events: auto !important;
        display: flex !important;
        z-index: 100 !important;
    }
    
    .art-locked-mode .art-lock-mask {
        display: block !important;
    }

    .art-locked-mode .art-controls,
    .art-locked-mode .art-layer-rotate,
    .art-locked-mode .art-mask,
    .art-locked-mode .art-state {
        display: none !important;
        pointer-events: none !important;
    }
}

/* 锁定遮罩层基础 (全局隐藏) */
.art-lock-mask {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 95;
}
