/**
 * 精工之声 - 视频弹窗样式
 * 严格样式隔离，使用 px 单位，避免全站 rem 基准影响
 */

/* ==================== 弹窗遮罩层 ==================== */
.vv-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    animation: vv-fadeIn 0.3s forwards;
    overflow-y: auto;
}

@keyframes vv-fadeIn {
    to { opacity: 1; }
}

/* ==================== 弹窗容器 ==================== */
.vv-lightbox-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    background: #1a1a1a;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    animation: vv-scaleIn 0.3s forwards;
    overflow: hidden;
}

@keyframes vv-scaleIn {
    to { transform: scale(1); }
}

/* ==================== 关闭按钮 ==================== */
.vv-lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s;
    padding: 0;
}

.vv-lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.vv-lightbox-close svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

/* ==================== 视频播放器区域 ==================== */
.vv-lightbox-video-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 比例 */
    background: #000;
}

.vv-lightbox-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ==================== 视频信息区 ==================== */
.vv-lightbox-info {
    padding: 24px;
    background: #1a1a1a;
}

.vv-lightbox-title {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.vv-lightbox-meta {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 16px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.vv-meta-date,
.vv-meta-views {
    display: inline-block;
}

.vv-lightbox-description {
    font-size: 15px;
    color: #ccc;
    line-height: 1.6;
    margin: 0;
}

.vv-lightbox-description p {
    margin: 0 0 12px 0;
}

.vv-lightbox-description p:last-child {
    margin-bottom: 0;
}

/* ==================== 加载状态 ==================== */
.vv-lightbox-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #000;
    color: #fff;
    z-index: 5;
}

.vv-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: vv-spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes vv-spin {
    to { transform: rotate(360deg); }
}

.vv-lightbox-loading p {
    font-size: 14px;
    color: #ccc;
    margin: 0;
}

/* 错误信息 */
.vv-error-message {
    text-align: center;
    padding: 20px;
}

.vv-error-message p {
    font-size: 16px;
    color: #ff6b6b;
    margin: 0 0 20px 0;
}

.vv-error-message button {
    padding: 10px 30px;
    background: #fff;
    color: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.vv-error-message button:hover {
    background: #f0f0f0;
}

/* ==================== 响应式设计 ==================== */

/* 平板及以下 */
@media (max-width: 768px) {
    .vv-lightbox-overlay {
        padding: 0;
        align-items: flex-start;
    }

    .vv-lightbox-container {
        max-width: 100%;
        border-radius: 0;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    .vv-lightbox-video-wrap {
        flex-shrink: 0;
    }

    .vv-lightbox-info {
        padding: 20px 16px;
        flex: 1;
    }

    .vv-lightbox-title {
        font-size: 18px;
    }

    .vv-lightbox-meta {
        font-size: 13px;
    }

    .vv-lightbox-description {
        font-size: 14px;
    }

    .vv-lightbox-close {
        width: 36px;
        height: 36px;
        top: 12px;
        right: 12px;
    }

    .vv-lightbox-close svg {
        width: 20px;
        height: 20px;
    }
}

/* 小屏手机 */
@media (max-width: 480px) {
    .vv-lightbox-info {
        padding: 16px 12px;
    }

    .vv-lightbox-title {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .vv-lightbox-meta {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .vv-lightbox-description {
        font-size: 13px;
    }
}

/* ==================== 样式重置（作用域限制）==================== */
/* 确保弹窗内的元素不受全站样式影响 */
.vv-lightbox-overlay * {
    box-sizing: border-box;
}

.vv-lightbox-container h1,
.vv-lightbox-container h2,
.vv-lightbox-container h3,
.vv-lightbox-container h4,
.vv-lightbox-container h5,
.vv-lightbox-container h6,
.vv-lightbox-container p,
.vv-lightbox-container button {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 确保视频控件正常显示 */
.vv-lightbox-video::-webkit-media-controls-panel {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
}

/* ==================== 辅助功能 ==================== */
.vv-lightbox-close:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

/* 暗色模式兼容（可选）*/
@media (prefers-color-scheme: dark) {
    .vv-lightbox-overlay {
        background: rgba(0, 0, 0, 0.95);
    }
}


