/* lightbox.css — 全屏灯箱大图预览与滚轮缩放 */

.lightbox {
  position: fixed; inset: 0; z-index: 220;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12, 13, 16, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0; transition: opacity 160ms;
  overflow: hidden;
}
.lightbox.show { opacity: 1; }
.lb-stage {
  position: relative;
  margin: 0; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.lb-stage img {
  max-width: 92vw; max-height: 88vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.5);
  background: transparent;
  cursor: zoom-in;
  user-select: none;
  touch-action: none;
  transform-origin: center center;
  will-change: transform;
  opacity: 0; transition: opacity 140ms;
}
.lb-stage img.ready { opacity: 1; }
.lb-stage img.is-zoomed { cursor: grab; }
.lb-stage img.is-dragging { cursor: grabbing; }

/* 大图加载中：居中细环 */
.lb-spin {
  position: absolute; inset: 0; margin: auto;
  width: 26px; height: 26px;
  border: 3px solid rgba(255, 255, 255, 0.22);
  border-top-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  animation: lb-spin 800ms linear infinite;
  visibility: hidden;
  pointer-events: none;
}
.lb-stage img:not(.ready) ~ .lb-spin { visibility: visible; }
@keyframes lb-spin { to { transform: rotate(360deg); } }

.lb-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 2;
  width: 44px; height: 44px;
  border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.14); color: #fff;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 120ms;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.26); }
.lb-btn .icon { width: 20px; height: 20px; }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
.lb-close {
  top: 18px; right: 18px; transform: none;
  position: absolute;
}
.lb-foot {
  position: absolute; left: 0; right: 0; bottom: 18px; z-index: 2;
  display: flex; justify-content: center; align-items: center; gap: 14px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 12.5px;
  pointer-events: none;
}
#lb-zoom {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 11.5px;
}
