* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: Arial, sans-serif;
    background-color: #202022;
    color: white;
    overflow: auto; /* 允许正常的页面滚动 */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.header h1 {
    font-size: 2.5rem;
    background: linear-gradient(45deg, #dda0dd, #7081BE);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 10px;
}

.header hr {
    border: none;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.3);
}

.filter-container {
    display: flex;
    justify-content: center;
    padding: 20px 0;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.filter-btn {
    background-color: rgba(221, 160, 221, 0); /* 按钮背景 */
    border: 1px solid #dda0dd; /* 按钮边框色 */
    border-radius: 20px;
    padding: 8px 20px;
    margin: 0 10px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.filter-btn:hover {
    background-color: rgba(221, 160, 221, 0.5); /* 按钮悬浮背景 */
}

.filter-btn.active {
    background-color: rgba(221, 160, 221, 1); /* 活跃筛选按钮背景 */
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
    padding: 20px 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    height: 200px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0); /* 图片介绍容器背景透明 */
    color: white;
    padding: 10px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .caption {
    transform: translateY(0);
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 50px;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
}

.lightbox img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border: 2px solid #fff;
}

#lightbox-caption {
    color: white;
    margin-top: 20px;
    font-size: 18px;
    text-align: center;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    .header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr;
    }
    .header h1 {
        font-size: 1.5rem;
    }
}