/* ═══════════════════════════════════════════════════════════
   The Weird Wanderer — Cinematic Gallery Modal
   ═══════════════════════════════════════════════════════════ */

.gallery-modal {
  position: fixed;
  inset: 0;
  background: rgba(13, 12, 11, 0.98);
  backdrop-filter: blur(20px);
  z-index: 2000;
  display: none;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.gallery-modal.is-open {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.gallery-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 4rem;
  z-index: 10;
}

.gallery-modal__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.gallery-modal__close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  font-family: 'Space Mono', monospace;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.gallery-modal__close:hover {
  opacity: 1;
}

.gallery-modal__content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
}

.gallery-modal__media-wrap {
  max-width: 90vw;
  max-height: 70vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-modal__img, .gallery-modal__video {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
  border-radius: 4px;
}

.gallery-modal__nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 4rem;
  transform: translateY(-50%);
  z-index: 5;
  pointer-events: none;
}

.gallery-modal__nav-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.3s;
  font-family: 'Space Mono', monospace;
}

.gallery-modal__nav-btn:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.gallery-modal__footer {
  padding: 2rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.gallery-modal__info {
  text-align: center;
}

.gallery-modal__caption {
  font-family: 'Lora', serif;
  font-size: 1.2rem;
  color: #ccc;
  font-style: italic;
}

.gallery-modal__counter {
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  color: var(--accent);
  opacity: 0.7;
}

/* Thumbnails */
.gallery-modal__thumbs {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  overflow-x: auto;
  padding: 1rem;
  max-width: 800px;
}

.gallery-thumb {
  width: 80px;
  height: 50px;
  border-radius: 2px;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.3s, transform 0.3s;
  flex-shrink: 0;
  border: 1px solid transparent;
}

.gallery-thumb.active {
  opacity: 1;
  transform: scale(1.1);
  border-color: var(--accent);
}

/* Video specific */
.video-play-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  pointer-events: none;
}

.video-play-btn {
    width: 80px;
    height: 80px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.5rem;
}
