.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 10, 15, 0.93);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    visibility 0s linear 0.25s;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 0.25s ease,
    visibility 0s linear 0s;
}

.lightbox__frame {
  position: relative;
  max-width: min(88vw, 900px);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.lightbox__img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 14px;
  object-fit: contain;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.55);
}

.lightbox__count {
  color: var(--surface);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  opacity: 0.75;
}

.lightbox__close,
.lightbox__nav {
  position: fixed;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--surface);
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background: var(--accent);
}

.lightbox__close {
  top: 1.5rem;
  right: 1.5rem;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.1rem;
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  font-size: 1.1rem;
  touch-action: manipulation;
}

.lightbox__nav:hover {
  transform: translateY(-50%) scale(1.06);
}

.lightbox__nav--prev {
  left: 1.5rem;
}

.lightbox__nav--next {
  right: 1.5rem;
}

@media (max-width: 480px) {
  .lightbox__close {
    top: 1rem;
    right: 1rem;
    width: 2.3rem;
    height: 2.3rem;
    font-size: 0.95rem;
  }

  .lightbox__nav {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.05rem;
    background: rgba(255, 255, 255, 0.18);
  }
}
