/* ============================================================
   shot-lightbox.css — shared screenshot viewer
   Used by all three game pages. Theme-agnostic (works on
   frogdoku, valoris, hnb without changes).
   ============================================================ */

/* Behavior-only base — applies to every clickable media item.
   Visual treatment is provided by the modifier classes below so a
   trailer-style button can keep its own border/radius/aspect via
   Tailwind utilities without colliding with these styles. */
.shot-thumb {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.shot-thumb:focus-visible {
  outline: 2px solid rgba(167, 139, 250, .8);
  outline-offset: 3px;
}
.shot-thumb img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
}

/* Gallery-style thumbnail (small square screenshots). */
.shot-thumb--still {
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: .75rem;
  cursor: zoom-in;
}
.shot-thumb--still:hover {
  transform: scale(1.03);
  border-color: rgba(255, 255, 255, .25);
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .5);
}

/* Video-style thumbnail (the trailer poster with play overlay).
   Keeps whatever sizing/border the page gives it via Tailwind. */
.shot-thumb--video:hover { transform: scale(1.01); box-shadow: 0 14px 40px -10px rgba(0, 0, 0, .55); }

/* ───── Lightbox container ───── */
.shot-lb {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem 2rem;
  opacity: 0;
  transition: opacity .25s ease;
}
.shot-lb.is-open {
  display: flex;
  opacity: 1;
}

/* Locks page scroll while open */
body.shot-lb-open { overflow: hidden; }

.shot-lb__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 15, .94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: zoom-out;
}

.shot-lb__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1400px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  pointer-events: none;       /* let backdrop catch clicks; children opt back in */
}
.shot-lb__inner > * { pointer-events: auto; }

/* Top bar — counter + close */
.shot-lb__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, .75);
}
.shot-lb__counter {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-feature-settings: "tnum";
  padding: .5rem .9rem;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
}

/* Image wrapper holds the photo + side arrow buttons */
.shot-lb__image-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

/* Media stage — holds whichever element is current (img / iframe / video) */
.shot-lb__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

.shot-lb__image,
.shot-lb__stage iframe,
.shot-lb__stage video {
  max-width: 100%;
  max-height: 80vh;
  display: block;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .3);
  animation: shot-pop .25s ease;
}
.shot-lb__image { object-fit: contain; }

/* Iframes/videos are 16:9 — fill width up to a sensible max */
.shot-lb__stage iframe,
.shot-lb__stage video {
  width: 100%;
  max-width: 1280px;
  aspect-ratio: 16 / 9;
}

@keyframes shot-pop {
  from { opacity: 0; transform: scale(.98); }
  to   { opacity: 1; transform: scale(1); }
}

/* Buttons — close + nav */
.shot-lb__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  transition: all .2s ease;
  padding: 0;
  font: inherit;
}
.shot-lb__btn:hover {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .3);
  transform: scale(1.05);
}
.shot-lb__btn:active { transform: scale(.95); }
.shot-lb__btn:focus-visible {
  outline: 2px solid rgba(167, 139, 250, .8);
  outline-offset: 3px;
}
.shot-lb__btn svg { width: 22px; height: 22px; display: block; }

/* Arrows positioned absolutely over the image area edges */
.shot-lb__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px; height: 56px;
}
.shot-lb__nav:hover    { transform: translateY(-50%) scale(1.05); }
.shot-lb__nav:active   { transform: translateY(-50%) scale(.95); }
.shot-lb__nav--prev    { left: -72px; }
.shot-lb__nav--next    { right: -72px; }

/* Mobile / narrow viewports — bring arrows inside the frame */
@media (max-width: 1100px) {
  .shot-lb { padding: 4rem 1rem 1.5rem; }
  .shot-lb__nav        { width: 44px; height: 44px; background: rgba(0, 0, 0, .55); }
  .shot-lb__nav--prev  { left: .75rem; }
  .shot-lb__nav--next  { right: .75rem; }
}

/* Reduced motion — disable open/close + image-pop animations */
@media (prefers-reduced-motion: reduce) {
  .shot-lb, .shot-lb__image, .shot-thumb { transition: none; animation: none; }
}
