/* Screenshot Gallery Styles */

.screenshot-gallery {
  margin-top: 2rem;
}

/* Ensure consistent aspect ratio for all screenshots */
.screenshot-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  background: var(--glass-bg);
  border-radius: 12px;
  overflow: hidden;
}

.screenshot-main {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
}

.main-screenshot {
  width: 100%;
  height: 400px;
  object-fit: contain;
  background: var(--background);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.screenshot-caption {
  text-align: center;
  margin-top: 0.75rem;
  color: var(--text-medium);
  font-size: 0.9rem;
  min-height: 1.5rem;
  transition: opacity 0.3s ease;
}

.screenshot-thumbnails {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.screenshot-thumb {
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--glass-border);
  transition: all 0.3s ease;
  position: relative;
  background: var(--glass-bg);
  aspect-ratio: 16 / 9;
}

.screenshot-thumb.active {
  border-color: var(--app-yellow) !important;
  box-shadow: 0 0 0 4px rgba(255, 190, 100, 0.1);
}

.screenshot-thumb:hover:not(.active) {
  border-color: rgba(255, 190, 100, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.screenshot-thumb img {
  width: 100%;
  height: 80px;
  object-fit: contain;
  background: var(--background);
  transition: transform 0.3s ease;
}

.screenshot-thumb:hover img {
  transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .screenshot-thumbnails {
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
  }
  
  .screenshot-thumb img {
    height: 60px;
  }
  
  .main-screenshot {
    height: 250px;
  }
}

@media (min-width: 1200px) {
  .main-screenshot {
    height: 500px;
  }
}

/* Loading state */
.screenshot-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 190, 100, 0.3);
  border-top: 3px solid var(--app-yellow);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Smooth image transitions */
.main-screenshot {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.main-screenshot.changing {
  opacity: 0.7;
}

/* Override inline styles for consistency */
.screenshot-gallery .main-screenshot {
  width: 100% !important;
  height: 400px !important;
  object-fit: contain !important;
  background: var(--background) !important;
  border-radius: 12px !important;
}

.screenshot-gallery .screenshot-thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  background: var(--background) !important;
}

@media (max-width: 768px) {
  .screenshot-gallery .main-screenshot {
    height: 250px !important;
  }
}

@media (min-width: 1200px) {
  .screenshot-gallery .main-screenshot {
    height: 500px !important;
  }
}

/* Gallery navigation (future enhancement) */
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s ease;
}

.screenshot-main:hover .gallery-nav {
  opacity: 1;
}

.gallery-nav:hover {
  background: rgba(255, 190, 100, 0.2);
  border-color: var(--app-yellow);
}

.gallery-nav.prev {
  left: 1rem;
}

.gallery-nav.next {
  right: 1rem;
}

.gallery-nav svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-high);
}