.header-bg {
    position: fixed;
    left: 0; top: 0; right: 0;
    height: 320px;
    width: 100vw;
    background: url('header-bg.jpg') center center/cover no-repeat;
    z-index: 0;
    transition: opacity 0.6s cubic-bezier(.25,.8,.25,1);
    pointer-events: none;
}
.header-bg.hide {
    opacity: 0;
}
.header-bg.visible {
    opacity: 1;
}
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: #f5f5f7;
    font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;
    color: #1d1d1f;
    overflow-x: hidden;
}
.gallery-container {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 48px;
    background: #f5f5f7;
}
.gallery-title {
    font-size: 2.2rem;
    color: #1d1d1f;
    font-weight: 600;
    margin-bottom: 2.5rem;
    letter-spacing: 0.01em;
    font-family: inherit;
}
.gallery {
    display: flex;
    gap: 2vw;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1200px;
    width: 100vw;
    margin: 0 auto;
}
.gallery-item {
    position: relative;
    width: 220px;
    height: 320px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 4px 16px 0 rgba(0,0,0,0.10);
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(.25,.8,.25,1), box-shadow 0.3s cubic-bezier(.25,.8,.25,1);
    background: #fff;
}
.gallery-item:hover {
    transform: scale(1.04) translateY(-6px);
    box-shadow: 0 12px 32px 0 rgba(0,0,0,0.13);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.4s cubic-bezier(.25,.8,.25,1);
    filter: brightness(1) saturate(1.1);
}
.gallery-item:hover img {
    filter: brightness(1.08) saturate(1.2);
}
.gallery-item .overlay {
    display: none;
}
/* 预览弹窗 */
.preview-modal {
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(245,245,247,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.4s cubic-bezier(.25,.8,.25,1);
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
/* 预览弹窗内容扩展 */
.preview-img-box {
    background: #fff;
    border-radius: 32px;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.10);
    padding: 2vw;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: popIn 0.4s cubic-bezier(.25,.8,.25,1);
    position: relative;
}
.preview-thumbs {
    display: flex;
    gap: 12px;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}
.preview-thumb {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border 0.2s;
    background: #f5f5f7;
}
.preview-thumb.active {
    border: 2px solid #0071e3;
}
.prev-btn, .next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(245,245,247,0.7);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 2;
    transition: background 0.2s;
}
.prev-btn:hover, .next-btn:hover {
    background: #e0e0e6;
}
.prev-btn { left: 8px; }
.next-btn { right: 8px; }
@keyframes popIn {
    0% { transform: scale(0.96); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.preview-img {
    max-width: 70vw;
    max-height: 70vh;
    border-radius: 24px;
    box-shadow: 0 4px 24px 0 rgba(0,0,0,0.10);
    margin-bottom: 1.5rem;
    background: #fff;
    object-fit: contain;
    transition: box-shadow 0.3s cubic-bezier(.25,.8,.25,1);
}
.close-btn {
    background: #f5f5f7;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 2rem;
    color: #1d1d1f;
    cursor: pointer;
    box-shadow: 0 2px 8px 0 rgba(0,0,0,0.08);
    transition: background 0.2s, transform 0.2s;
}
.close-btn:hover {
    background: #e0e0e6;
    transform: scale(1.08);
}
@media (max-width: 900px) {
    .gallery {
        gap: 3vw;
    }
    .gallery-item {
        width: 44vw;
        height: 62vw;
        min-width: 120px;
        min-height: 170px;
        max-width: 220px;
        max-height: 320px;
    }
}
@media (max-width: 600px) {
    .gallery-container {
        padding-top: 16px;
    }
    .gallery-title {
        font-size: 1.3rem;
        margin-bottom: 1.2rem;
    }
    .gallery {
        gap: 4vw;
    }
    .gallery-item {
        width: 90vw;
        height: 54vw;
        min-width: 90px;
        min-height: 90px;
        max-width: 100vw;
        max-height: 60vw;
    }
    .preview-img {
        max-width: 96vw;
        max-height: 60vh;
    }
    .preview-img-box {
        padding: 2vw 0.5vw;
    }
}
