/* ============================================
   Jungle Groove — Slideshow Gallery Styles
   ============================================ */

/* Gallery viewport */
.jg-gallery {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #000;
}

/* Slide */
.jg-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jg-slide.active {
  opacity: 1;
}

/* Gallery frame around the image */
.jg-frame {
  position: relative;
  max-width: 85vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jg-frame img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  display: block;
  /* Frame effect */
  border: 12px solid #1a1510;
  box-shadow:
    inset 0 0 20px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(0, 0, 0, 0.8),
    0 4px 20px rgba(0, 0, 0, 0.6);
  outline: 3px solid #2a2218;
  outline-offset: -15px;
  border-radius: 2px;
  background: #0a0a0a;
}

/* Ken Burns animation variants */
.jg-slide.active .jg-kb-pan-right img {
  animation: kb-pan-right 12s ease-in-out forwards;
}

.jg-slide.active .jg-kb-pan-left img {
  animation: kb-pan-left 12s ease-in-out forwards;
}

.jg-slide.active .jg-kb-zoom-in img {
  animation: kb-zoom-in 12s ease-in-out forwards;
}

.jg-slide.active .jg-kb-zoom-out img {
  animation: kb-zoom-out 12s ease-in-out forwards;
}

@keyframes kb-pan-right {
  0% { transform: scale(1.15) translateX(-3%); }
  100% { transform: scale(1.15) translateX(3%); }
}

@keyframes kb-pan-left {
  0% { transform: scale(1.15) translateX(3%); }
  100% { transform: scale(1.15) translateX(-3%); }
}

@keyframes kb-zoom-in {
  0% { transform: scale(1); }
  100% { transform: scale(1.2); }
}

@keyframes kb-zoom-out {
  0% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Audio player bar */
.jg-audio-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  z-index: 100;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.jg-audio-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: background 0.2s ease;
  line-height: 1;
}

.jg-audio-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.jg-track-name {
  color: var(--text-secondary);
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.jg-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.jg-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-primary);
  cursor: pointer;
}

.jg-volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-primary);
  border: none;
  cursor: pointer;
}

/* Slideshow controls */
.jg-slide-controls {
  position: fixed;
  top: 50%;
  right: 2rem;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 100;
}

.jg-slide-btn {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  line-height: 1;
}

.jg-slide-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Slide counter */
.jg-counter {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-secondary);
  font-size: 0.8rem;
  opacity: 0.5;
  z-index: 100;
  letter-spacing: 0.1em;
}

/* Responsive */
@media (max-width: 768px) {
  .jg-frame img {
    border-width: 6px;
    outline-width: 2px;
    outline-offset: -8px;
  }

  .jg-audio-bar {
    padding: 0.5rem 1rem;
    gap: 1rem;
  }

  .jg-volume-slider {
    width: 50px;
  }

  .jg-slide-controls {
    right: 1rem;
  }

  .jg-track-name {
    max-width: 120px;
  }
}
