/* 详情页背景遮罩 */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9); /* 加深背景，突出图片 */
    display: none; /* 由 JS 控制显示 */
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
    backdrop-filter: blur(8px); /* 背景毛玻璃 */
}

/* 详情页内容容器 */
.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 95vw; /* 占据屏幕宽度的 95% */
    max-height: 95vh; /* 占据屏幕高度的 95% */
    width: 100%;
}

/* 调大图片显示大小 */
#lb-img {
    max-width: 100%;
    max-height: 75vh; /* 图片最大占据高度的 75%，留出空间给下方的分享按钮 */
    object-fit: contain; /* 保持比例 */
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    background-color: #000; /* 图片未加载出时的底色 */
}

.lb-tools {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.lb-tools button, .lb-tools a {
    background: rgba(255,255,255,0.2);
    border: 1px solid #fff;
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: 0.3s;
}

.lb-tools button:hover, .lb-tools a:hover {
    background: #fff;
    color: #000;
}

.lb-share-group {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #eee;
}

/* 分享栏容器 */
/*.lb-share-toolbar {*/
/*    margin-top: 20px;*/
/*    display: flex;*/
/*    justify-content: center;*/
/*    align-items: center;*/
/*    gap: 15px;*/
/*    background: rgba(0, 0, 0, 0.4); !* 半透明深色背景 *!*/
/*    padding: 12px 20px;*/
/*    border-radius: 50px; !* 胶囊形状 *!*/
/*    backdrop-filter: blur(5px);*/
/*}*/

/* 分享工具栏位置优化 */
.lb-share-toolbar {
    margin-top: 25px; /* 增加与图片的间距 */
    width: auto;
    min-width: 280px;
    display: flex;
    justify-content: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 25px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 通用按钮样式 */
.share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s;
    border: none;
    cursor: pointer;
    overflow: hidden;
    padding: 0;
}

.share-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* 图标大小控制 */
.share-btn img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.share-btn svg {
    width: 20px;
    height: 20px;
    stroke: #333;
}

/* 链接和下载按钮背景色微调 */
.link-btn { background-color: #f1f5f9; }
.down-btn { background-color: var(--primary); }
.down-btn svg { stroke: #fff; }

/* 移动端适配 */
@media (max-width: 480px) {
    .share-btn {
        width: 36px;
        height: 36px;
    }

    #lb-img {
        max-height: 65vh; /* 移动端图片稍微减小，防止遮挡按钮 */
    }
    .lb-share-toolbar {
        gap: 10px;
        padding: 10px 15px;
    }
}