/* ================================================================
   MISSING UTILITY CLASSES — Merged with style.css compatibility
   These classes are NOT in style.css and need to be added here
   ================================================================ */

/* ── Reading Progress Bar ─────────────────────────────────────── */
#readingProgress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary, #0891b2), var(--accent, #f59e0b));
  z-index: 10001;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(8,145,178,0.5);
}

/* ── Page Transition Overlay (JS will add/remove .active) ────── */
#pageTransition {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg-darkest, #020617);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#pageTransition.active {
  opacity: 1;
  visibility: visible;
}

/* ── Toast notification (style.css has .page-toast, this extends) ── */
.page-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card, #1e293b);
  color: var(--text-primary, #f1f5f9);
  padding: 12px 24px;
  border-radius: 8px;
  border: 1px solid var(--border, #334155);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* ── Lightbox (style.css has this, but ensure no conflicts) ──── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 1rem;
  text-align: center;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 4px;
}

/* ── Hidden states (style.css already has .hidden, this ensures) ── */
.hidden {
  display: none !important;
}

.pag-hidden,
.music-pag-hidden {
  display: none !important;
}