﻿

/* ===== 企业图库 Lightbox ===== */
.gl-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    touch-action: pan-y;
}
.gl-lightbox.gl-active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}
.gl-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.gl-stage {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 1100px;
    height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}
.gl-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    background: #1a1a1a;
    animation: gl-fade-in 0.3s ease;
}
@keyframes gl-fade-in {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* 关闭按钮 */
.gl-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.gl-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

/* 上一张/下一张 */
.gl-prev,
.gl-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.gl-prev { left: 30px; }
.gl-next { right: 30px; }
.gl-prev:hover,
.gl-next:hover {
    background: rgba(77, 171, 247, 0.6);
    border-color: rgba(77, 171, 247, 0.8);
    transform: translateY(-50%) scale(1.08);
}

/* 计数 */
.gl-counter {
    position: absolute;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    letter-spacing: 1px;
}

/* 标题 */
.gl-caption {
    position: absolute;
    bottom: 110px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    color: rgba(255, 255, 255, 0.92);
    font-size: 15px;
    text-align: center;
    max-width: 80%;
    line-height: 1.5;
    padding: 0 20px;
}

/* 缩略图条 */
.gl-thumbs {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 8px;
    max-width: 90%;
    overflow-x: auto;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    scrollbar-width: thin;
}
.gl-thumbs::-webkit-scrollbar { height: 4px; }
.gl-thumbs::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }
.gl-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.55;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.gl-thumb:hover {
    opacity: 0.85;
}
.gl-thumb.gl-thumb-active {
    opacity: 1;
    border-color: #4dabf7;
    box-shadow: 0 0 12px rgba(77, 171, 247, 0.5);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .gl-stage {
        width: 100%;
        height: 60vh;
        padding: 0 10px;
    }
    .gl-img {
        border-radius: 4px;
    }
    .gl-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    .gl-prev,
    .gl-next {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    .gl-prev { left: 8px; }
    .gl-next { right: 8px; }
    .gl-counter {
        top: 18px;
        font-size: 15px;
        padding: 4px 12px;
    }
    .gl-caption {
        bottom: 90px;
        font-size: 15px;
        max-width: 90%;
    }
    .gl-thumbs {
        bottom: 12px;
        max-width: 95%;
    }
    .gl-thumb {
        width: 48px;
        height: 48px;
    }
}

/* 触屏点击提示 */
@media (hover: none) {
    .gl-prev:hover,
    .gl-next:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: translateY(-50%);
    }
    .gl-close:hover {
        background: rgba(255, 255, 255, 0.12);
        transform: rotate(0deg);
    }
}

/* 黑夜模式适配 */
html.dark-mode-preload-active .gl-lightbox .gl-backdrop {
    background: rgba(5, 10, 20, 0.95);
}


/* ===== plist-card 弹图模式 ===== */
.plist-card {
    cursor: pointer;
}
.plist-zoom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    pointer-events: none;
}
.plist-img {
    position: relative;
    overflow: hidden;
}
.plist-card:hover .plist-zoom {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.plist-card:hover .plist-img img {
    transform: scale(1.06);
    filter: brightness(0.7);
    transition: all 0.3s ease;
}
