.shot-gallery-nav {
  position: fixed;
  top: var(--navbar-min-height, 50px);
  width: 100%;
  left: 0;
  z-index: calc(var(--z-navbar, 1000) - 1);
  background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding: 15px 0;
  backdrop-filter: blur(10px);
}

[data-theme="dark"] .shot-gallery-nav {
  background: linear-gradient(to bottom, #1a1a1a 0%, #0d0d0d 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-container {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 60px;
  display: flex;
  align-items: center;
  min-height: var(--gallery-nav-min-height);
}

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #333;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
}

.gallery-nav-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: translateY(-50%) scale(1.1);
}

[data-theme="dark"] .gallery-nav-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

[data-theme="dark"] .gallery-nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.gallery-nav-prev {
  left: 30px;
}

.gallery-nav-next {
  right: 30px;
}

.gallery-nav-scene-prev {
  left: -20px;
}

.gallery-nav-scene-next {
  right: -20px;
}

.gallery-track-wrapper {
  overflow-x: hidden;
  overflow-y: hidden;
  width: 100%;
  margin: 0 10px;
  /* scroll-behavior: smooth; - Removed for immediate drag response */
}

.gallery-track {
  display: flex;
  gap: 0;
  padding: 10px 5px;
  cursor: grab;
  user-select: none;
  align-items: center;
}

.gallery-track:active {
  cursor: grabbing;
}

.gallery-thumbnail {
  flex: 0 0 160px;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  background: #f0f0f0;
}

[data-theme="dark"] .gallery-thumbnail {
  background: #0d0d0d;
  border-color: rgba(255, 255, 255, 0.15);
}

.gallery-thumbnail:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border-color: rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .gallery-thumbnail:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.3);
}

.gallery-thumbnail.active {
  border-color: #4a9eff;
  box-shadow: 0 0 20px rgba(255, 69, 0, 0.4);
}

.thumbnail-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

video.thumbnail-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scene-separator {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.2) 20%,
    rgba(0, 0, 0, 0.2) 80%,
    transparent 100%);
  margin: 0 10px;
  align-self: center;
  flex-shrink: 0;
}

[data-theme="dark"] .scene-separator {
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(255, 255, 255, 0.2) 20%,
    rgba(255, 255, 255, 0.2) 80%,
    transparent 100%);
}

[data-theme="dark"] .scene-label {
  color: rgba(255, 255, 255, 0.6);
}

.thumbnail-generating {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: linear-gradient(135deg, #e0e0e0 0%, #f0f0f0 100%);
}

[data-theme="dark"] .thumbnail-generating {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.generating-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #4a9eff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.thumbnail-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: #000;
  color: rgba(255, 255, 255, 0.8);
  font-size: 24px;
  flex-direction: column;
  padding: 8px;
  text-align: center;
}

[data-theme="dark"] .thumbnail-placeholder {
  background: #0a0a0a;
  color: rgba(255, 255, 255, 0.8);
}

.thumbnail-placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  max-width: 100%;
}

.thumbnail-placeholder-character {
  font-size: 9px;
  font-weight: 600;
  color: #4a9eff;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.thumbnail-placeholder-dialogue {
  font-size: 8px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  max-width: 100%;
}

.gallery-info {
  position: absolute;
  bottom: -25px;
  right: 20px;
  color: #666;
  font-size: 12px;
  font-weight: 500;
}

[data-theme="dark"] .gallery-info {
  color: rgba(255, 255, 255, 0.6);
}

.gallery-count {
  background: rgba(0, 0, 0, 0.05);
  padding: 4px 10px;
  border-radius: 4px;
  backdrop-filter: blur(5px);
}

[data-theme="dark"] .gallery-count {
  background: rgba(0, 0, 0, 0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .gallery-container {
    padding: 0 50px;
  }

  .gallery-thumbnail {
    flex: 0 0 133px;
    height: 75px;
  }

  .gallery-nav-btn {
    width: 35px;
    height: 35px;
  }
}