/* ===== 灯箱 Lightbox 覆盖层样式 ===== */
/* 全屏遮罩：默认隐藏，.active 时淡入显示 */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.88);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    cursor: default;
}

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

/* 居中展示未压缩原图：等比完整呈现，最大占视口 90% */
.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    background-color: #fff;
    cursor: grab;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
    transition: transform 0.08s ease-out;
}

.lightbox-img.zoomed {
    cursor: grab;
    transition: none;
}

.lightbox-img.grabbing {
    cursor: grabbing;
}

/* 右上角圆形关闭按钮：站点强调色描边，hover 变亮并旋转 */
.lightbox-close {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #3498db;
    background-color: rgba(31, 45, 61, 0.6);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    z-index: 2;
}

.lightbox-close:hover {
    background-color: #3498db;
    border-color: #5dade2;
    transform: rotate(90deg);
}

/* 底部缩放工具条 */
.lightbox-toolbar {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 999px;
    background-color: rgba(31, 45, 61, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2;
}

.lightbox-tool {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    border: 2px solid #3498db;
    background-color: transparent;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.lightbox-tool:hover {
    background-color: #3498db;
    border-color: #5dade2;
}

/* 操作提示文字 */
.lightbox-hint {
    position: fixed;
    bottom: 84px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    letter-spacing: 0.3px;
    pointer-events: none;
    z-index: 2;
}

/* ===== 页面内缩略图态：暗示可点击放大 ===== */
.zoomable {
    cursor: zoom-in;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.zoomable:hover {
    filter: brightness(1.05);
}

/* 悬停提示：点击图片放大（JS 自动为可放大图片包裹 .zoom-wrap 并插入 .zoom-hint） */
.zoom-wrap {
    position: relative;
    display: inline-block;
    line-height: 0;
    vertical-align: top;
    max-width: 100%;
}

.zoom-hint {
    position: absolute;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 3;
}

.zoom-wrap:hover .zoom-hint {
    opacity: 1;
}
