.gallery-container {
  max-width: 1200px;
  margin: 60px auto 40px;
  padding: 0 20px;
}
.gallery-header {
  text-align: center;
  margin-bottom: 40px;
}
.gallery-title {
  font-size: 2.5em;
  font-weight: 600;
  margin-bottom: 16px;
}
.gallery-description {
  font-size: 1.1em;
  color: #666;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}
.gallery-grid {
  position: relative;
  margin-bottom: 60px;
  width: 100%;
}
.gallery-column {
  width: calc(33.333% - 16px);
  float: left;
  margin: 0 8px;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  background-color: #fff;
  margin-bottom: 24px;
  break-inside: avoid;
  opacity: 0; /* 初始透明，用于淡入效果 */
}
.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 30px rgba(0,0,0,0.12);
}
.gallery-image-wrapper {
  width: 100%;
  position: relative;
  overflow: hidden;
}
.gallery-image-wrapper img {
  position: relative;
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
  cursor: pointer;
}
.gallery-item:hover .gallery-image-wrapper img {
  transform: scale(1.05);
}
.gallery-caption {
  padding: 16px;
  font-size: 0.95em;
  color: #333;
  line-height: 1.5;
}
/* 返回顶部按钮样式 */
.back-to-top {
  position: fixed;
  right: 30px;
  bottom: 30px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: #ee936c;
  color: #fff;
  text-align: center;
  line-height: 45px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 99;
  box-shadow: 0 3px 12px rgba(0,0,0,0.15);
  font-size: 1.2rem;
}
.back-to-top.visible {
  opacity: 0.8;
}
.back-to-top:hover {
  opacity: 1;
  transform: translateY(-3px);
}
/* 图片灯箱样式覆盖 - 增强选择器特异性 */
.lg-backdrop {
  background-color: rgba(0,0,0,0.85) !important;
}
.lg-toolbar,
.lg-outer {
  background-color: transparent !important;
}
.lg-toolbar .lg-icon:hover,
.lg-actions .lg-next:hover,
.lg-actions .lg-prev:hover {
  color: #ee936c !important;
}
/* 图片标题样式 - 调整为正常大小 */
body .lg-sub-html {
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0.2) 80%, rgba(0,0,0,0) 100%) !important;
  padding-bottom: 30px !important;
  padding-top: 40px !important;
  opacity: 1 !important;
  bottom: 0 !important;
  max-width: 100% !important;
}
/* 调整标题样式为正常大小 */
body .lg-outer .lg-sub-html h4,
body .lg-sub-html h4.lg-caption,
.lg-sub-html h4 {
  color: #fff !important;
  font-size: 1.5rem !important; /* 正常字体大小 */
  margin: 0 !important;
  padding: 0 20px !important;
  text-align: center !important;
  font-weight: 400 !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
  letter-spacing: 1.2px !important; /* 增加字体间距 */
  line-height: 1.4 !important;
  max-width: 100% !important;
  font-family: inherit !important;
}
/* 响应式调整字体大小 */
@media screen and (max-width: 992px) {
  body .lg-outer .lg-sub-html h4,
  body .lg-sub-html h4.lg-caption,
  .lg-sub-html h4 {
    font-size: 1.8rem !important;
  }
}
@media screen and (max-width: 768px) {
  .gallery-column {
    width: calc(50% - 16px);
  }
  .gallery-title {
    font-size: 2em;
  }
  body .lg-outer .lg-sub-html h4,
  body .lg-sub-html h4.lg-caption,
  .lg-sub-html h4 {
    font-size: 1.6rem !important;
  }
}
@media screen and (max-width: 480px) {
  .gallery-column {
    width: calc(100% - 16px);
  }
  .gallery-caption {
    padding: 12px;
    font-size: 0.85em;
  }
  body .lg-outer .lg-sub-html h4,
  body .lg-sub-html h4.lg-caption,
  .lg-sub-html h4 {
    font-size: 1.4rem !important;
  }
}
/* 清除浮动 */
.gallery-grid::after {
  content: "";
  display: table;
  clear: both;
}
