/* Lightbox - 牛兴胜 ICALF (零依赖) */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
  cursor: zoom-out;
}
.lightbox-overlay.active { opacity: 1; visibility: visible; }

.lightbox-img-wrap {
  position: relative; max-width: 90vw; max-height: 85vh;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-img-wrap img {
  max-width: 90vw; max-height: 85vh; object-fit: contain;
  border-radius: 8px; box-shadow: 0 8px 40px rgba(0,0,0,.5);
  transform: scale(.92); opacity: 0;
  transition: transform .35s ease, opacity .35s ease;
}
.lightbox-overlay.active .lightbox-img-wrap img {
  transform: scale(1); opacity: 1;
}

/* Close button */
.lightbox-close {
  position: fixed; top: 1.2rem; right: 1.5rem; z-index: 10000;
  width: 44px; height: 44px; border: none; border-radius: 50%;
  background: rgba(255,255,255,.15); color: #fff;
  font-size: 1.5rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
  backdrop-filter: blur(4px);
}
.lightbox-close:hover { background: rgba(255,255,255,.3); }

/* Nav arrows */
.lightbox-nav {
  position: fixed; top: 50%; z-index: 10000;
  transform: translateY(-50%);
  width: 48px; height: 48px; border: none; border-radius: 50%;
  background: rgba(255,255,255,.12); color: #fff;
  font-size: 1.5rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
  backdrop-filter: blur(4px);
}
.lightbox-nav:hover { background: rgba(255,255,255,.28); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* Caption bar */
.lightbox-caption {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10000;
  text-align: center; padding: .8rem 2rem;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  color: #fff; font-size: .9rem; font-weight: 500;
  letter-spacing: .3px;
}
.lightbox-counter {
  display: block; font-size: .75rem; color: rgba(255,255,255,.6);
  margin-top: .25rem;
}

/* Hide nav when single image */
.lightbox-overlay[data-single="true"] .lightbox-nav { display: none; }

/* Mobile */
@media (max-width: 768px) {
  .lightbox-nav { width: 40px; height: 40px; font-size: 1.2rem; }
  .lightbox-prev { left: .5rem; }
  .lightbox-next { right: .5rem; }
  .lightbox-close { top: .8rem; right: .8rem; width: 40px; height: 40px; }
  .lightbox-caption { font-size: .8rem; padding: .6rem 1rem; }
}

/* Preview card cursor hint */
.preview-img[data-lightbox] { cursor: zoom-in; }
.preview-img[data-lightbox] img { width: 100%; height: 100%; object-fit: cover; }
