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

.gallery-intro {
  text-align: center;
  margin-bottom: 40px;
}

.gallery-intro h2 {
  font-size: 2.5rem;
  color: #ffffff;
  margin-bottom: 10px;
}

.gallery-intro p {
  font-size: 1.1rem;
  background: linear-gradient(90deg, #00e5ff, #448aff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gallery-filter {
  text-align: center;
  margin-bottom: 30px;
}

.filter-btn {
  background: none;
  border: 2px solid #b0bec5;
  padding: 10px 20px;
  margin: 0 5px;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 30px;
  transition: all 0.3s ease;
  color: #ffffff;
}

.filter-btn:hover {
  background: #e0f7fa;
  color: #00acc1;
}

.filter-btn.active {
  background: #00acc1;
  color: #ffffff;
  border-color: #00acc1;
}

.gallery-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 每行固定4列 */
  gap: 20px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
}

.gallery-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
}

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

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

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* 模态框样式 */
.gallery-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(207, 216, 220, 0.8);
  align-items: center;
  justify-content: center;
}

.modal-content {
  max-width: 90%;
  max-height: 80vh;
  display: block;
  margin: 70px auto;
  border-radius: 10px;
}

.modal-caption {
  text-align: center;
  color: #263238;
  margin-top: 20px;
}

.modal-caption h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #546e7a;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.close-modal:hover {
  color: #00acc1;
}

.modal-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  padding: 0 20px;
}

.modal-prev,
.modal-next {
  background: rgba(176, 190, 197, 0.7);
  border: none;
  color: #ffffff;
  font-size: 24px;
  padding: 10px;
  cursor: pointer;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.modal-prev:hover,
.modal-next:hover {
  background: rgba(0, 172, 193, 0.8);
}
