/* 瀑布流布局 */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-auto-rows: 200px;
    grid-gap: 15px;
    padding: 15px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

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

.thumbnail {
    width: 100%;
    height:100%;
    object-fit: cover;
    border-radius: 5px;
    z-index: 998;
}

/* Lightbox 样式 */
.lightbox {
    display: none;
    position:fixed;
    z-index: 1002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}


.lightbox-content {
    display: block;
    margin: auto;
    max-width: 90%;
    max-height: 90%;
    top: 5%;
    position: relative;
    animation: zoom 0.3s;
}

.lightbox-caption {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  text-align: center;
  padding: 8px 16px;
  background: rgba(0,0,0,0.7);
  border-radius: 4px;
}

@keyframes zoom {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

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