body.screenshot-lightbox-open {
  overflow: hidden;
}

img.screenshot-thumbnail,
.screenshot-item img,
.screenshot-gallery img,
.screenshot-grid img,
.screenshot-uploader img,
.upload-list img {
  cursor: zoom-in;
}

.screenshot-lightbox[hidden] {
  display: none;
}

.screenshot-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(4, 10, 22, 0.88);
  backdrop-filter: blur(3px);
}

.screenshot-lightbox-stage {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.screenshot-lightbox-image {
  display: block;
  max-width: calc(100vw - 128px);
  max-height: calc(100vh - 96px);
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
  cursor: default;
}

.screenshot-lightbox-close,
.screenshot-lightbox-arrow {
  position: absolute;
  z-index: 1;
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.48);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.screenshot-lightbox-close:hover,
.screenshot-lightbox-arrow:hover {
  background: rgba(23, 105, 224, 0.9);
}

.screenshot-lightbox-close:focus-visible,
.screenshot-lightbox-arrow:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.screenshot-lightbox-close {
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 32px;
  line-height: 40px;
}

.screenshot-lightbox-arrow {
  top: 50%;
  width: 48px;
  height: 68px;
  border-radius: 8px;
  font-size: 48px;
  line-height: 60px;
  transform: translateY(-50%);
}

.screenshot-lightbox-arrow:hover {
  transform: translateY(-50%) scale(1.05);
}

.screenshot-lightbox-previous {
  left: 0;
}

.screenshot-lightbox-next {
  right: 0;
}

.screenshot-lightbox-counter {
  position: absolute;
  bottom: 0;
  left: 50%;
  min-width: 64px;
  padding: 6px 12px;
  border-radius: 16px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  text-align: center;
  font-size: 14px;
  transform: translateX(-50%);
}

@media (max-width: 640px) {
  .screenshot-lightbox {
    padding: 12px;
  }

  .screenshot-lightbox-image {
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 88px);
  }

  .screenshot-lightbox-arrow {
    width: 40px;
    height: 56px;
    font-size: 40px;
  }

  .screenshot-lightbox-close {
    top: 4px;
    right: 4px;
  }
}
