/* ===== 画册页 ===== */
.gallery-body { background: #141838; }

.back-link {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: color .2s;
}

.back-link:hover { color: #ffd86e; }

.gallery-main {
  min-height: 100vh;
  max-width: 1080px;
  margin: 0 auto;
  padding: 110px 5vw 60px;
  color: #fff;
}

.gallery-title {
  text-align: center;
  font-size: 30px;
  letter-spacing: 3px;
}

.gallery-sub {
  text-align: center;
  color: rgba(255,255,255,.6);
  font-size: 14px;
  margin: 10px 0 34px;
}

/* 大图展示区 */
.viewer {
  display: flex;
  align-items: center;
  gap: 14px;
}

.arrow {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  transition: background .2s, transform .2s;
}

.arrow:hover { background: rgba(255,255,255,.28); transform: scale(1.08); }

.stage {
  flex: 1;
  min-width: 0;
  background: rgba(255,255,255,.05);
  border-radius: 20px;
  padding: 18px;
  text-align: center;
}

.stage picture { display: block; }

.stage img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 58vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
  cursor: zoom-in;
  transition: transform .25s;
}

.caption h2 { font-size: 19px; margin-top: 16px; color: #ffd86e; }
.caption p { font-size: 14px; color: rgba(255,255,255,.72); margin-top: 4px; }

/* 缩略图 */
.thumbs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 30px;
}

.thumb {
  width: 92px;
  height: 92px;
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid transparent;
  cursor: pointer;
  padding: 0;
  background: none;
  opacity: .6;
  transition: opacity .2s, border-color .2s, transform .2s;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb:hover { opacity: 1; transform: translateY(-3px); }
.thumb.active { border-color: #ffd86e; opacity: 1; }

/* 页脚精简版 */
.footer.slim { padding: 26px 16px; background: transparent; }
.footer.slim .footer-line { border-top: none; padding-top: 0; }

/* 点击图片放大后的遮罩 */
body.lightbox-open { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 10, 28, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox picture {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 94vw;
  max-height: 92vh;
}

.lightbox img {
  max-width: 94vw;
  max-height: 92vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover { background: rgba(255,255,255,.28); }

/* 子页导航在手机上保持一行，别占太高 */
@media (max-width: 760px) {
  .gallery-body .navbar {
    flex-direction: row;
    padding: 12px 4vw;
  }
  .gallery-body .back-link { font-size: 14px; }
}

/* ===== 手机端 ===== */
@media (max-width: 640px) {
  .gallery-main { padding: 88px 4vw 40px; }
  .gallery-title { font-size: 24px; }
  .gallery-sub { margin-bottom: 24px; }

  /* 箭头叠在图片两侧，不再上下分家 */
  .viewer { position: relative; display: block; }
  .stage { padding: 10px; }
  .stage img { max-height: 52vh; }
  .caption h2 { font-size: 17px; }

  .arrow {
    position: absolute;
    top: 20vh;
    z-index: 3;
    width: 38px;
    height: 38px;
    font-size: 21px;
    background: rgba(10, 14, 40, .55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
  .arrow.prev { left: 8px; }
  .arrow.next { right: 8px; }

  .thumb { width: 72px; height: 72px; }
  .lightbox-close { top: 12px; right: 12px; }
}
