/* Backdrop Gallery Styles */
.backdrop-gallery {
  width: 100%;
  margin: 1.5rem 0;
  border-radius: 12px;
  overflow: hidden;
}

/* Main Preview Area */
.backdrop-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0a0a0a;
  border-radius: 8px;
  overflow: hidden;
}

.backdrop-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

/* Thumbnail Strip */
.backdrop-thumbnails {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding: 4px 0;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.3) transparent;
}

.backdrop-thumbnails::-webkit-scrollbar {
  height: 6px;
}

.backdrop-thumbnails::-webkit-scrollbar-track {
  background: transparent;
}

.backdrop-thumbnails::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.3);
  border-radius: 3px;
}

.backdrop-thumbnail {
  flex-shrink: 0;
  width: 120px;
  height: 68px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.backdrop-thumbnail:hover {
  opacity: 0.8;
  transform: translateY(-2px);
}

.backdrop-thumbnail.active {
  opacity: 1;
  border-color: var(--primary, #ff6b6b);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.backdrop-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Loading State */
.backdrop-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

.backdrop-loading::before {
  content: "";
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--primary, #ff6b6b);
  border-radius: 50%;
  margin-right: 12px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Error State */
.backdrop-error {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
}

.backdrop-gallery.error .backdrop-error {
  display: flex;
}

.backdrop-gallery.error .backdrop-preview,
.backdrop-gallery.error .backdrop-thumbnails {
  display: none;
}

/* Responsive */
@media (max-width: 768px) {
  .backdrop-thumbnail {
    width: 100px;
    height: 56px;
  }
  
  .backdrop-gallery {
    margin: 1rem 0;
  }
}

@media (max-width: 480px) {
  .backdrop-thumbnail {
    width: 80px;
    height: 45px;
  }
}
