/* 微信浏览器视频播放兼容性样式 */
.bg-video video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: -1 !important;
    /* 微信浏览器特殊处理 */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    /* 防止微信浏览器全屏播放 */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 微信浏览器特殊样式 */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .bg-video video {
        /* 微信浏览器需要特殊处理 */
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
}

/* 确保视频容器正确显示 */
.bg-video {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    /* 微信浏览器特殊处理 */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* 微信浏览器中的视频播放提示 */
.wechat-video-tip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    z-index: 10000;
    display: none;
}

.wechat-video-tip.show {
    display: block;
}

/* 微信浏览器中的播放按钮 */
.wechat-play-button {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: pointer;
    display: none;
}

.wechat-play-button.show {
    display: flex;
}

.wechat-play-button::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 20px solid white;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 5px;
}

/* 微信浏览器中的视频加载状态 */
.wechat-video-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 9998;
    display: none;
}

.wechat-video-loading.show {
    display: block;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 微信浏览器中的错误提示 */
.wechat-video-error {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 0, 0.8);
    color: white;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    z-index: 10001;
    display: none;
}

.wechat-video-error.show {
    display: block;
}
