body.lightbox-open {
  overflow: hidden;
}

[data-lightbox-image] {
  cursor: zoom-in;
  transition: transform 0.22s ease, filter 0.22s ease;
}

[data-lightbox-image]:hover,
[data-lightbox-image]:focus-visible {
  filter: brightness(1.08);
  transform: scale(1.012);
  outline: 2px solid rgba(36, 216, 255, 0.8);
  outline-offset: -2px;
}

.image-preview.in-result:has([data-lightbox-image]),
.detail-page-image-card:has([data-lightbox-image]) {
  position: relative;
  overflow: hidden;
}

.image-preview.in-result:has([data-lightbox-image])::after,
.detail-page-image-card:has([data-lightbox-image])::after {
  content: "点击放大";
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 7px 10px;
  color: #fff;
  border: 1px solid rgba(102, 225, 255, 0.48);
  border-radius: 4px;
  background: rgba(2, 12, 31, 0.78);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
  font-size: 12px;
  pointer-events: none;
}

.image-lightbox {
  position: fixed;
  z-index: 1000;
  inset: 0;
  padding: 64px 72px 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(1, 6, 18, 0.92);
  backdrop-filter: blur(14px);
  animation: lightbox-fade-in 0.2s ease;
}

.image-lightbox-stage {
  width: 100%;
  height: calc(100vh - 132px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-lightbox-stage img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 1px solid rgba(90, 183, 255, 0.35);
  background: #07132b;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.58), 0 0 40px rgba(36, 216, 255, 0.1);
  animation: lightbox-image-in 0.24s ease;
}

.image-lightbox-close {
  position: absolute;
  top: 22px;
  right: 26px;
  width: 46px;
  height: 46px;
  color: #fff;
  border: 1px solid rgba(113, 180, 255, 0.45);
  border-radius: 50%;
  background: rgba(8, 29, 65, 0.9);
  cursor: pointer;
  font: 300 30px/1 Arial, sans-serif;
  transition: background 0.2s ease, transform 0.2s ease;
}

.image-lightbox-close:hover,
.image-lightbox-close:focus-visible {
  background: #285cef;
  transform: rotate(90deg);
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.image-lightbox p {
  margin: 14px 0 0;
  color: #8ea9c9;
  font-size: 13px;
  letter-spacing: 0.3px;
}

@keyframes lightbox-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes lightbox-image-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 1500px) {
  .image-lightbox {
    padding: 58px 42px 34px;
  }

  .image-lightbox-stage {
    height: calc(100vh - 118px);
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-lightbox-image],
  .image-lightbox,
  .image-lightbox-stage img,
  .image-lightbox-close {
    animation: none;
    transition: none;
  }
}
