/* ============================================================
   lightbox.css — Full-screen media lightbox
   ============================================================ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,.97);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.18s ease;
}

.lb-backdrop {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.lb-shell {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

/* ── Controls ────────────────────────────────────────────────── */
.lb-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,.08);
  border: none;
  border-radius: 50%;
  color: var(--t1);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--fast);
  pointer-events: all;
  -webkit-tap-highlight-color: transparent;
}
.lb-close:hover {
  background: rgba(255,255,255,.15);
  color: #fff;
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 64px;
  background: rgba(255,255,255,.06);
  border: none;
  color: var(--t1);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--fast);
  pointer-events: all;
  -webkit-tap-highlight-color: transparent;
}
.lb-nav:hover { background: rgba(255,255,255,.12); color: #fff; }
.lb-prev { left: 0; border-radius: 0 var(--r8) var(--r8) 0; }
.lb-next { right: 0; border-radius: var(--r8) 0 0 var(--r8); }

/* Hide nav on mobile (swipe instead) */
@media (max-width: 600px) {
  .lb-nav { display: none; }
}

/* ── Stage (image/video area) ────────────────────────────────── */
.lb-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 52px 0;
  position: relative;
  pointer-events: all;
  overflow: hidden;
}

@media (max-width: 600px) {
  .lb-stage { padding: 60px 0 0; }
}

.lb-stage img,
.lb-stage video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  border-radius: var(--r4);
  animation: scaleIn 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
}

.lb-loader {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255,255,255,.15);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.lb-loader.hidden { display: none; }

/* ── Footer ──────────────────────────────────────────────────── */
.lb-footer {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  flex-shrink: 0;
  pointer-events: all;
  gap: 0.5rem;
}

.lb-footer-left { flex: 1; min-width: 0; }
.lb-footer-center {
  flex-shrink: 0;
  text-align: center;
}
.lb-footer-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.4rem;
}

.lb-filename {
  font-size: 0.72rem;
  color: var(--t4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-counter {
  font-size: 0.72rem;
  color: var(--t4);
  letter-spacing: 0.05em;
}

.lb-fav-btn, .lb-dl-btn {
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--t2);
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
  transition: all var(--fast);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.lb-fav-btn:hover, .lb-dl-btn:hover {
  background: var(--gold-soft);
  color: var(--gold);
}
.lb-fav-btn.active { color: #e85555; }
