/* 视频弹窗遮罩层 */
.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent; /* 移除黑色背景 */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999; /* 确保在最顶层，超过播放条的z-index */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none; /* 让点击穿透遮罩层 */
}

.video-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 视频容器 */
.video-container {
    position: relative;
    width: 60%;
    max-width: 533px;
    background: #000;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    /* 保持16:9比例的容器或者自适应 */
    display: flex;
    flex-direction: column;
    pointer-events: auto; /* 恢复视频区域的点击交互 */
}

/* 视频播放器 */
#video-player {
    width: 100%;
    max-height: 80vh;
    display: block;
    outline: none;
}

/* 关闭按钮 */
.close-video {
    position: absolute;
    top: -40px;
    right: 0;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    color: white;
    font-size: 24px;
    line-height: 28px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-video:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .video-container {
        width: 100%;
        border-radius: 0;
    }
    
    .close-video {
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.5);
        z-index: 10001;
    }
}
