/* 全局样式 */
body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
}
@media (min-width: 769px) { 
    body {
        width: 375px;  /* 限制 PC 端宽度为 iPhone 12 的 375px */
        margin: 0 auto; /* 居中显示 */
        transform: scale(1.5); /* 适当放大页面 */
        transform-origin: top center;
        overflow-x: hidden; /* 禁止横向滚动 */
    }
}

/* 瀑布流布局 */
.gallery {
    column-count: 3;  /* 一排三列 */
    column-gap: 10px; /* 列间距 */
    padding: 10px;
}

/* 每个图片块 */
.gallery-item {
    width: 100%;
    margin-bottom: 10px;
    break-inside: avoid; /* 防止图片被拆分 */

}

/* 图片样式：固定尺寸 + 圆角 */
.gallery-item img {
    width: 100%;
    height: 150px; /* 统一高度 */
    border-radius: 15px; /* 圆角 */
    display: block;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
}

/* 悬停时放大 */
.gallery-item img:hover {
    transform: scale(1.05);
}

/* 图片预览弹窗 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    display: none; /* 默认隐藏 */
}

/* 关闭按钮 */
.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

/* 预览大图 */
.preview-img {
    max-width: 80%;
    max-height: 80%;
    border-radius: 10px;
}
