/* ==========================================================================
   FUNDONAR COLOMBIA - 20 AÑOS ANIVERSARIO
   Álbum de Fotos Conmemorativo Vintage-Editorial
   ========================================================================== */

:root {
  /* Brand & Commemorative Palette */
  --crimson-brand: #C9182B;
  --burgundy-deep: #680D17;
  --burgundy-dark: #3a060d;
  --gold-foil: #D4AF37;
  --gold-light: #F9E79F;
  --gold-gradient: linear-gradient(135deg, #FFE082 0%, #D4AF37 50%, #997316 100%);
  --gold-shadow: rgba(212, 175, 55, 0.35);

  /* Book & Paper Materials */
  --paper-bg: #FCF9F2;
  --paper-cream: #F5EFE0;
  --paper-shadow: rgba(30, 14, 18, 0.18);
  --paper-border: #E8DFD0;
  --leather-cover: #2a0b12;

  /* Typography */
  --font-serif: 'Playfair Display', 'Cinzel', Georgia, 'Times New Roman', serif;
  --font-display: 'Cinzel', 'Playfair Display', Georgia, serif;
  --font-sans: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Transition timings */
  --ease-page-turn: cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Reset & Projection Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #120508;
  color: #332326;
  font-family: var(--font-sans);
  user-select: none;
}

/* Inactivity Auto-Hide for Clean Presentation */
body.idle-projection {
  cursor: none;
}
body.idle-projection .presentation-toolbar,
body.idle-projection .top-anniversary-bar {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}
body.idle-projection .top-anniversary-bar {
  transform: translateY(-20px);
}

/* --------------------------------------------------------------------------
   Ambient Backdrop & Lighting
   -------------------------------------------------------------------------- */
.ambient-backdrop {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, #3d141d 0%, #20080f 55%, #0e0205 100%);
  z-index: 0;
}

.ambient-glow {
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(circle at 50% 30%, rgba(212, 175, 55, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 10% 90%, rgba(201, 24, 43, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 90% 90%, rgba(201, 24, 43, 0.12) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   Main Stage (Scaled to fit 16:9 projection viewport)
   -------------------------------------------------------------------------- */
.album-stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  padding: 1vh 1.5vw 5.5vh 1.5vw; /* Máximo espacio para fotos */
}

/* Top Celebration Header */
.top-anniversary-bar {
  position: absolute;
  top: 1vh;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 3vw;
  z-index: 30;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.anniversary-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(45, 12, 18, 0.85);
  border: 1px solid var(--gold-foil);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 10px var(--gold-shadow);
  padding: 4px 16px;
  border-radius: 999px;
  color: var(--gold-light);
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 2px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.anniversary-tag .tag-star {
  color: var(--gold-foil);
  font-size: 0.9rem;
}

.current-batch-info {
  color: rgba(255, 235, 215, 0.8);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 1px;
  background: rgba(20, 5, 8, 0.65);
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  backdrop-filter: blur(6px);
}
.current-batch-info span {
  color: #fff;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   The Book Album Container (Double Page Spread)
   -------------------------------------------------------------------------- */
.book-container {
  position: relative;
  width: min(96vw, calc(89vh * 1.72)); /* Ajuste óptimo a pantallas y proyectores 16:9 */
  height: min(89vh, calc(96vw / 1.72));
  background-color: var(--paper-bg);
  border-radius: 12px;
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.75),
    0 10px 25px rgba(0, 0, 0, 0.5),
    inset 0 0 100px rgba(220, 200, 170, 0.35);
  perspective: 2500px;
  display: flex;
}

/* Outer Leather / Cloth Book Edge Trim */
.album-cover-edge {
  position: absolute;
  top: -10px;
  bottom: -10px;
  width: 16px;
  background: linear-gradient(to right, #400a12, #24050a);
  border-radius: 6px;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.8), 0 4px 15px rgba(0, 0, 0, 0.6);
  z-index: 1;
}
.album-cover-edge.left-edge {
  left: -12px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.album-cover-edge.right-edge {
  right: -12px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* Center Spine & Binding Shadow */
.book-spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 50px;
  transform: translateX(-50%);
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.15) 30%,
    rgba(0, 0, 0, 0.0) 48%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(0, 0, 0, 0.0) 52%,
    rgba(0, 0, 0, 0.15) 70%,
    rgba(0, 0, 0, 0.35) 100%
  );
  pointer-events: none;
  z-index: 15;
}

.spine-highlight {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: rgba(0, 0, 0, 0.25);
  transform: translateX(-50%);
}

/* Double Spread Content Area */
.book-spread {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  overflow: hidden;
  border-radius: 10px;
  background: 
    radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.6) 0%, rgba(245, 238, 225, 0.8) 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
}

/* Left & Right Pages */
.album-page {
  position: relative;
  width: 50%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 10px 18px 8px 18px;
  overflow: hidden;
}

.left-page {
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  padding-right: 22px;
  background: linear-gradient(to right, #f8f3e8 0%, #fdfbf7 85%, #ede4d1 100%);
}

.right-page {
  border-left: 1px solid rgba(0, 0, 0, 0.06);
  padding-left: 22px;
  background: linear-gradient(to left, #f8f3e8 0%, #fdfbf7 85%, #ede4d1 100%);
}

/* Page Framing Decor */
.album-page::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(180, 150, 110, 0.35);
  pointer-events: none;
  border-radius: 4px;
}
.album-page::after {
  content: '';
  position: absolute;
  inset: 9px;
  border: 0.5px dashed rgba(180, 150, 110, 0.2);
  pointer-events: none;
}

/* Page Header */
.page-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 30px;
  margin-bottom: 4px;
  z-index: 5;
  border-bottom: 1px solid rgba(180, 150, 110, 0.25);
  padding-bottom: 2px;
}

.page-badge-gold {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--burgundy-deep);
}
.page-badge-gold .crest-icon {
  color: var(--gold-foil);
  font-size: 0.9rem;
}

.page-title-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.85rem;
  color: #7a5843;
  padding: 0px 15px;
}

.anniversary-crest {
  display: flex;
  align-items: center;
  gap: 8px;
}
.crest-years {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 900;
  color: var(--crimson-brand);
  letter-spacing: 1px;
  background: rgba(201, 24, 43, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(201, 24, 43, 0.25);
}
.crest-subtitle {
  font-size: 0.72rem;
  letter-spacing: 1px;
  color: #8c6e5a;
  font-weight: 600;
}

/* Page Footer */
.page-footer {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 22px;
  margin-top: 4px;
  font-size: 0.72rem;
  color: #8c7668;
  z-index: 5;
  border-top: 1px solid rgba(180, 150, 110, 0.2);
  padding-top: 2px;
}
.page-corner-decor {
  color: var(--gold-foil);
  font-size: 1.1rem;
}
.page-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.76rem;
  color: #6d4e3e;
  padding: 0px 15px;
}
.page-number {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 1px;
  padding: 0px 15px;
}

/* --------------------------------------------------------------------------
   Masonry Canvas & Dynamic Grid Layouts
   Regla: Ancho mínimo 50% de la página, alto automático según la foto (cero espacios muertos)
   -------------------------------------------------------------------------- */
.masonry-canvas {
  position: relative;
  flex: 1;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* Exactamente 2 columnas = mínimo 50% cada foto */
  gap: 16px;
  align-content: center; /* Centra armoniosamente el bloque en la página */
  justify-content: center;
  padding: 8px 4px;
  overflow: hidden;
}

/* Modos de distribución por página */

/* Modo 1: 1 Foto Hero (100% de ancho de la página, alto automático) */
.layout-1-hero .photo-card {
  grid-column: span 2;
  max-width: 94%;
  margin: 0 auto;
}
.layout-1-hero .photo-img {
  max-height: 64vh;
}

/* Modo 2A: 2 Fotos Lado a Lado (50% de ancho cada una, alto automático) */
.layout-2-side .photo-card {
  grid-column: span 1;
}
.layout-2-side .photo-img {
  max-height: 56vh;
}

/* Modo 2B: 2 Fotos Apiladas (100% de ancho cada una, alto automático) */
.layout-2-stack .photo-card {
  grid-column: span 2;
  max-width: 94%;
  margin: 0 auto;
}
.layout-2-stack .photo-img {
  max-height: 32vh;
}

/* Modo 3A: 3 Fotos (1 Hero de 100% arriba + 2 de 50% abajo) */
.layout-3-top-hero .photo-card:nth-child(1) {
  grid-column: span 2;
}
.layout-3-top-hero .photo-card:nth-child(2),
.layout-3-top-hero .photo-card:nth-child(3) {
  grid-column: span 1;
}
.layout-3-top-hero .photo-card:nth-child(1) .photo-img {
  max-height: 36vh;
}
.layout-3-top-hero .photo-card:nth-child(2) .photo-img,
.layout-3-top-hero .photo-card:nth-child(3) .photo-img {
  max-height: 28vh;
}

/* Modo 3B: 3 Fotos (2 de 50% arriba + 1 Hero de 100% abajo) */
.layout-3-bottom-hero .photo-card:nth-child(1),
.layout-3-bottom-hero .photo-card:nth-child(2) {
  grid-column: span 1;
}
.layout-3-bottom-hero .photo-card:nth-child(3) {
  grid-column: span 2;
}
.layout-3-bottom-hero .photo-card:nth-child(1) .photo-img,
.layout-3-bottom-hero .photo-card:nth-child(2) .photo-img {
  max-height: 28vh;
}
.layout-3-bottom-hero .photo-card:nth-child(3) .photo-img {
  max-height: 36vh;
}

/* Modo 4: 4 Fotos (2x2, cada una de 50% de ancho) */
.layout-4-grid .photo-card {
  grid-column: span 1;
}
.layout-4-grid .photo-img {
  max-height: 28vh;
}

/* --------------------------------------------------------------------------
   Photo Cards (Ajuste Snug: Sin espacios arriba/abajo, Alto Automático)
   -------------------------------------------------------------------------- */
.photo-card {
  position: relative;
  width: 100%;
  height: auto; /* El alto se ajusta AUTOMÁTICAMENTE a la foto */
  background: #ffffff;
  padding: 6px 6px 14px 6px; /* Borde passe-partout elegante */
  border-radius: 4px;
  box-shadow: 
    0 10px 24px rgba(40, 20, 25, 0.2),
    0 2px 6px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-self: center; /* Centra la tarjeta en su fila sin estiramiento forzado */
  transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1), box-shadow 0.3s ease;
  transform: rotate(var(--rot, 0deg));
}

.photo-card:hover {
  transform: scale(1.025) rotate(0deg) !important;
  box-shadow: 
    0 16px 36px rgba(40, 20, 25, 0.3),
    0 4px 10px rgba(0, 0, 0, 0.14);
  z-index: 10;
}

.photo-media-wrapper {
  position: relative;
  width: 100%;
  height: auto; /* Sin restricciones verticales que dejen huecos */
  overflow: hidden;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
}

/* La Foto: Ancho 100% de la tarjeta (mínimo 50% de página), Alto 100% Automático */
.photo-img {
  width: 100%;
  height: auto; /* Alto automático según proporción real de la imagen */
  object-fit: contain;
  display: block;
  /* Conserva colores vivos, cálidos y nítidos */
  filter: contrast(1.03) saturate(1.06) brightness(1.01);
  border-radius: 2px;
}

/* Pie de foto sutil tipo polaroid pegado a la imagen */
.photo-caption {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-serif);
  font-size: 0.68rem;
  color: #796557;
  padding: 0 4px;
  letter-spacing: 0.4px;
  flex-shrink: 0;
}

.photo-year-badge {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--burgundy-deep);
  background: rgba(201, 24, 43, 0.08);
  padding: 1px 5px;
  border-radius: 3px;
}

/* Vintage Decorative Corner Tabs & Washi Tape */
.photo-card.has-tape::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(-1deg);
  width: 55px;
  height: 16px;
  background: rgba(235, 222, 190, 0.7);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-left: 2px dashed rgba(200, 180, 140, 0.5);
  border-right: 2px dashed rgba(200, 180, 140, 0.5);
  z-index: 2;
  pointer-events: none;
}

.photo-card.has-corners::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, transparent 50%, var(--gold-foil) 50%);
  opacity: 0.85;
  border-bottom-right-radius: 3px;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   3D Page Flip Mechanics
   -------------------------------------------------------------------------- */
.flipper-page {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  transform-origin: left center;
  transform-style: preserve-3d;
  pointer-events: none;
  z-index: 20;
  display: none;
}

.flipper-front,
.flipper-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 0 10px 10px 0;
  overflow: hidden;
}

.flipper-front {
  background: var(--paper-bg);
  box-shadow: inset 20px 0 50px rgba(0, 0, 0, 0.2);
}

.flipper-back {
  background: var(--paper-bg);
  transform: rotateY(180deg);
  border-radius: 10px 0 0 10px;
  box-shadow: inset -20px 0 50px rgba(0, 0, 0, 0.2);
}

.flipper-shadow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to right, rgba(0,0,0,0.5) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.8s ease;
}

/* Page turn active state */
.book-container.turning .flipper-page {
  display: block;
  animation: flipRightToLeft 1.2s var(--ease-page-turn) forwards;
}
.book-container.turning .flipper-shadow {
  animation: shadowFade 1.2s var(--ease-page-turn) forwards;
}

@keyframes flipRightToLeft {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(-180deg);
  }
}

@keyframes shadowFade {
  0% { opacity: 0; }
  50% { opacity: 0.7; }
  100% { opacity: 0; }
}

/* --------------------------------------------------------------------------
   Bottom Presentation Toolbar
   -------------------------------------------------------------------------- */
.presentation-toolbar {
  position: absolute;
  bottom: 1.5vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 980px);
  background: rgba(26, 8, 13, 0.88);
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 
    0 12px 35px rgba(0, 0, 0, 0.7),
    0 0 20px rgba(212, 175, 55, 0.15);
  backdrop-filter: blur(16px);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: opacity 0.4s ease, transform 0.4s ease;
  overflow: hidden;
}

/* Progress bar along the top edge of toolbar */
.timer-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  cursor: pointer;
}
.timer-progress-fill {
  width: 0%;
  height: 100%;
  background: var(--gold-gradient);
  box-shadow: 0 0 8px var(--gold-foil);
  transition: width 0.1s linear;
}

.toolbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  gap: 12px;
}

.toolbar-left,
.toolbar-center,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Tool Buttons */
.tool-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.tool-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--gold-foil);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tool-btn:active {
  transform: translateY(1px);
}

.tool-btn-primary {
  background: linear-gradient(135deg, var(--crimson-brand) 0%, var(--burgundy-deep) 100%);
  border-color: rgba(255, 215, 0, 0.4);
  box-shadow: 0 4px 15px rgba(201, 24, 43, 0.35);
}
.tool-btn-primary:hover {
  background: linear-gradient(135deg, #e01b30 0%, #7d111c 100%);
  box-shadow: 0 6px 18px rgba(201, 24, 43, 0.5);
}

.tool-btn-fullscreen {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-foil);
  color: var(--gold-light);
}
.tool-btn-fullscreen:hover {
  background: var(--gold-foil);
  color: #1a080d;
}

/* Speed selector chips */
.speed-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.3);
  padding: 3px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.speed-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.72rem;
  margin-right: 2px;
}
.speed-chip {
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.75);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.speed-chip:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.speed-chip.active {
  background: var(--gold-foil);
  color: #1f070e;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
}

/* --------------------------------------------------------------------------
   High-Res Lightbox Modal
   -------------------------------------------------------------------------- */
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.photo-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(12, 3, 5, 0.92);
  backdrop-filter: blur(10px);
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 88vh;
  background: #ffffff;
  padding: 10px 10px 24px 10px;
  border-radius: 8px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(212, 175, 55, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1);
}
.photo-lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-content img {
  max-width: min(86vw, 1200px);
  max-height: 74vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-caption {
  width: 100%;
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px;
}
.lightbox-tag {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--burgundy-deep);
  font-size: 0.85rem;
  letter-spacing: 1px;
}
.lightbox-filename {
  font-size: 0.75rem;
  color: #796557;
}

.lightbox-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 38px;
  height: 38px;
  background: var(--crimson-brand);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease;
}
.lightbox-close:hover {
  transform: scale(1.1);
  background: #e01b30;
}

/* --------------------------------------------------------------------------
   Shortcuts Modal Overlay
   -------------------------------------------------------------------------- */
.shortcuts-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(14, 4, 7, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.shortcuts-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.shortcuts-card {
  background: #FAF6ED;
  border: 2px solid var(--gold-foil);
  border-radius: 12px;
  padding: 24px 32px;
  max-width: 500px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  color: #2b1419;
}
.shortcuts-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--burgundy-deep);
  margin-bottom: 16px;
  text-align: center;
}
.shortcuts-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}
.shortcuts-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
}
.shortcuts-list kbd {
  background: #33151c;
  color: var(--gold-light);
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}
.shortcuts-note {
  font-size: 0.76rem;
  color: #796557;
  font-style: italic;
  margin-bottom: 18px;
  text-align: center;
}
.btn-close-modal {
  width: 100%;
  background: var(--burgundy-deep);
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background 0.2s ease;
}
.btn-close-modal:hover {
  background: var(--crimson-brand);
}

/* Utilities */
.hidden {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Responsive Adjustments for Smaller Monitors / Mobile Previews
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .book-container {
    flex-direction: column;
    height: 90vh;
    overflow-y: auto;
  }
  .album-page {
    width: 100%;
    height: auto;
    min-height: 480px;
  }
  .book-spine {
    display: none;
  }
  .toolbar-center {
    display: none;
  }
}
