/* Thumbnail grid pairs */
.screenshot-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.5rem 0;
}

.screenshot-dark {
  display: none;
}

/* Material theme sets data-md-color-scheme on body */
body[data-md-color-scheme="slate"] .screenshot-light {
  display: none;
}

body[data-md-color-scheme="slate"] .screenshot-dark {
  display: block;
}

@media (min-width: 900px) {
  .screenshot-pair {
    align-items: start;
  }
}

.lightbox-thumb {
  display: block;
}

.lightbox-thumb img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--md-default-fg-color--lighter, rgba(0, 0, 0, 0.08));
  cursor: zoom-in;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease;
}

.lightbox-thumb img:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
}

.lightbox-target {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.78);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1.5rem;
}

.lightbox-target:target {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 95vh;
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-close {
  position: absolute;
  top: -12px;
  right: -12px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  text-align: center;
  line-height: 32px;
  font-size: 18px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.lightbox-close::before {
  content: "×";
}
