#album-overlay {
  position: fixed; inset: 0; z-index: 10500;
  background: rgba(4, 2, 14, 0.97);
  backdrop-filter: blur(18px);
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transition: opacity .45s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
#album-overlay.open {
  opacity: 1; pointer-events: all;
}

#album-stars-canvas {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 0;
}

.album-header {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 36px 18px;
  border-bottom: 1px solid rgba(200,155,44,.15);
  background: linear-gradient(180deg, rgba(10,5,30,.9) 0%, transparent 100%);
  flex-shrink: 0;
}
.album-header-left { display: flex; flex-direction: column; gap: 4px; }
.album-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 10px; font-weight: 800; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--dorado);
  background: rgba(200,155,44,.12);
  border: 1px solid rgba(200,155,44,.25);
  padding: 4px 14px; border-radius: 20px;
  width: fit-content; margin-bottom: 6px;
}
.album-badge i { font-size: 11px; }
.album-titulo {
  font-family: 'Playfair Display', serif;
  font-size: clamp(18px, 3vw, 28px); font-weight: 800;
  color: #fff; line-height: 1.2;
}
.album-fecha-lugar {
  display: flex; align-items: center; gap: 16px;
  margin-top: 5px; flex-wrap: wrap;
}
.album-meta-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: rgba(200,180,255,.6);
}
.album-meta-item i { color: var(--dorado); font-size: 11px; }
.album-photo-count {
  font-size: 12px; color: rgba(255,255,255,.35);
  font-weight: 600; letter-spacing: .8px;
}

.album-close {
  width: 44px; height: 44px; border-radius: 12px; border: none;
  background: rgba(255,255,255,.07); color: rgba(255,255,255,.7);
  font-size: 16px; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all .3s ease;
  border: 1px solid rgba(255,255,255,.1);
}
.album-close:hover {
  background: rgba(200,155,44,.2); color: var(--dorado-light);
  border-color: rgba(200,155,44,.4); transform: rotate(90deg);
}

.album-body {
  flex: 1; overflow-y: auto; padding: 28px 36px 40px;
  position: relative; z-index: 2;
  scrollbar-width: thin; scrollbar-color: rgba(200,155,44,.3) transparent;
}
.album-body::-webkit-scrollbar { width: 5px; }
.album-body::-webkit-scrollbar-thumb { background: rgba(200,155,44,.3); border-radius: 3px; }

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.foto-card {
  position: relative; border-radius: 16px; overflow: hidden;
  aspect-ratio: 4/3;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  cursor: pointer;
  transition: transform .4s cubic-bezier(.34,1.3,.64,1),
              box-shadow .4s ease, border-color .4s ease;
  animation: fotoCardIn .5s cubic-bezier(.34,1.3,.64,1) both;
}
.foto-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 50px rgba(0,0,0,.5), 0 0 0 1px rgba(200,155,44,.3);
  border-color: rgba(200,155,44,.35);
  z-index: 2;
}
@keyframes fotoCardIn {
  from { opacity: 0; transform: translateY(20px) scale(.93); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.foto-card img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; transition: transform .5s ease;
}
.foto-card:hover img { transform: scale(1.07); }

.foto-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,5,30,.85) 0%, transparent 55%);
  opacity: 0; transition: opacity .35s ease;
  display: flex; align-items: flex-end; padding: 16px;
}
.foto-card:hover .foto-card-overlay { opacity: 1; }
.foto-caption {
  color: #fff; font-size: 12.5px; font-weight: 500;
  line-height: 1.4; text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.foto-zoom-icon {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.15); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 13px; opacity: 0;
  transition: opacity .3s ease, transform .3s ease;
}
.foto-card:hover .foto-zoom-icon { opacity: 1; transform: scale(1.1); }

#album-lightbox {
  position: fixed; inset: 0; z-index: 10900;
  background: rgba(2,1,10,.96);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
#album-lightbox.open { opacity: 1; pointer-events: all; }

.lb-img-wrap {
  position: relative; max-width: 92vw; max-height: 88vh;
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,.7), 0 0 0 1px rgba(200,155,44,.2);
  animation: lbIn .35s cubic-bezier(.34,1.3,.64,1) both;
}
@keyframes lbIn { from { transform: scale(.88); opacity:0; } to { transform:scale(1); opacity:1; } }
.lb-img-wrap img { display: block; max-width: 92vw; max-height: 88vh; object-fit: contain; }

.lb-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 14px 20px;
  background: linear-gradient(to top, rgba(10,5,30,.9), transparent);
  color: rgba(255,255,255,.85); font-size: 13px; text-align: center;
}

.lb-close {
  position: fixed; top: 20px; right: 24px;
  width: 44px; height: 44px; border-radius: 12px; border: none;
  background: rgba(255,255,255,.1); color: white; font-size: 18px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .3s ease; z-index: 10901;
}
.lb-close:hover { background: rgba(200,155,44,.3); transform: rotate(90deg); }

.lb-nav {
  position: fixed; top: 50%; transform: translateY(-50%);
  width: 50px; height: 50px; border-radius: 14px; border: none;
  background: rgba(255,255,255,.1); backdrop-filter: blur(8px);
  color: white; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .3s ease; z-index: 10901;
  border: 1px solid rgba(255,255,255,.15);
}
.lb-nav:hover { background: rgba(200,155,44,.25); border-color: rgba(200,155,44,.4); }
.lb-nav.prev { left: 20px; }
.lb-nav.next { right: 20px; }

.lb-counter {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  font-size: 12px; color: rgba(255,255,255,.4); letter-spacing: 1px;
  z-index: 10901;
}

.btn-album {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 12px; padding: 9px 20px;
  border-radius: 30px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--vino), var(--vino-light));
  color: white; font-size: 13px; font-weight: 700;
  letter-spacing: .4px;
  transition: all .35s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 6px 20px rgba(111,29,90,.28);
  position: relative; overflow: hidden;
}
.btn-album::before {
  content:''; position:absolute; inset:0;
  background: linear-gradient(135deg, var(--dorado), var(--dorado-light));
  opacity:0; transition: opacity .3s ease;
}
.btn-album:hover { transform:translateY(-3px); box-shadow:0 12px 30px rgba(200,155,44,.38); color:var(--vino-dark); }
.btn-album:hover::before { opacity:1; }
.btn-album i, .btn-album span { position:relative; z-index:1; }
.btn-album .album-photo-badge {
  background: rgba(255,255,255,.22); border-radius: 20px;
  padding: 1px 8px; font-size: 10px; font-weight: 800;
}

@media (max-width: 768px) {
  .album-header { padding: 16px 18px 14px; }
  .album-body { padding: 18px 14px 30px; }
  .album-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .lb-nav { width: 40px; height: 40px; font-size: 14px; }
  .lb-nav.prev { left: 8px; }
  .lb-nav.next { right: 8px; }
}
@media (max-width: 480px) {
  .album-titulo { font-size: 17px; }
  .album-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
