/* 模态框基础样式 */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    visibility: hidden;
    transition: visibility 0.3s;
}

.video-modal.active {
    visibility: visible;
}

.video-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal.active .video-modal-overlay {
    opacity: 1;
}

.video-modal-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.video-modal-content {
    position: relative;
    width: 100%;
    max-width: 1200px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
}

.video-modal.active .video-modal-content {
    transform: scale(1);
    opacity: 1;
}

/* 关闭按钮 - 放在内容区内部右上角 */
.video-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.video-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
}

/* 手机端按钮稍小 */
@media (max-width: 768px) {
    .video-modal-close {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
    
    .video-modal-container {
        padding: 10px;
    }
}

/* MP4 视频容器 - 16:9 */
.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    object-fit: contain;
}

/* iframe 容器 - 16:9 */
.video-wrapper-iframe {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
}

.video-wrapper-iframe iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}