.shot-single-view {
  max-width: 1200px;
  margin: 0 auto 40px auto;
  padding: 0 20px 350px 20px; /* Added bottom padding to account for gen_palette */
  display: flex;
  margin-top: calc(var(--navbar-min-height) + var(--gallery-nav-min-height));
  /* margin-top: 300px; */
  flex-direction: column;
  min-height: calc(100vh - 400px); /* Account for nav and gen_palette */
}

.shot-main-content {
  width: 100%;
  /* max-height: 70vh; */ /* Remove max-height restriction for dialogue view */
  /* background: #7c5d5d; */
  /* border-radius: 12px; */
  overflow: visible; /* Changed from hidden to visible for dialogue */
  display: flex;
  align-items: flex-start; /* Changed from center for dialogue list */
  justify-content: flex-start; /* Changed from center for dialogue list */
  position: relative;
  flex: 1;
  /* margin-bottom: 30px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); */
}

[data-theme="dark"] .shot-main-content {
  background: var(--bg-light-gray);
  /* border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5); */
}

.shot-main-image,
.shot-main-video {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  display: block;
}

[data-theme="dark"] .shot-main-image {
  filter: brightness(0.95);
}

[data-theme="dark"] .shot-main-video {
  filter: brightness(0.95);
}

.shot-main-generating {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 20px;
  gap: 20px;
}

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

[data-theme="dark"] .shot-main-generating .generating-spinner {
  border-color: rgba(255, 255, 255, 0.1);
  border-top-color: #4a9eff;
}

.shot-main-generating .generating-text {
  color: #666;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

[data-theme="dark"] .shot-main-generating .generating-text {
  color: #999;
}

.shot-main-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 20px;
  gap: 15px;
  color: #999;
}

[data-theme="dark"] .shot-main-placeholder {
  color: #666;
}

.shot-main-placeholder i {
  font-size: 48px;
}

.shot-main-placeholder p {
  margin: 0;
  font-size: 16px;
}

.shot-info {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .shot-info {
  background: #1a1a1a;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.shot-meta h2 {
  font-size: 20px;
  margin-bottom: 15px;
  color: #333;
}

[data-theme="dark"] .shot-meta h2 {
  color: #f0f0f0;
}

.shot-info-header {
  font-size: 14px !important;
  margin: 0 0 16px 0 !important;
  font-weight: 600;
  color: var(--text-muted) !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.shot-description {
  color: #666;
  line-height: 1.6;
  margin: 0;
}

[data-theme="dark"] .shot-description {
  color: #999;
}

/* Script Excerpt - Styled like screenplay */
.shot-description-section {
  position: relative;
}

.shot-description-section:has(.shot-dialogue-list, .shot-action-list) {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 2px;
  padding: 32px 16px;
  position: relative;
  margin-top: 0;
  width: 650px;
  max-width: 100%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .shot-description-section:has(.shot-dialogue-list, .shot-action-list) {
  background: #1a1a1a;
  border-color: #2a2a2a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Trimmed/torn edge effect at top */
.shot-description-section:has(.shot-dialogue-list, .shot-action-list)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.1) 2px,
    rgba(0, 0, 0, 0.1) 4px,
    transparent 4px,
    transparent 8px,
    rgba(0, 0, 0, 0.08) 8px,
    rgba(0, 0, 0, 0.08) 9px
  );
  opacity: 0.6;
  pointer-events: none;
}

[data-theme="dark"] .shot-description-section:has(.shot-dialogue-list, .shot-action-list)::before {
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.15) 2px,
    rgba(255, 255, 255, 0.15) 4px,
    transparent 4px,
    transparent 8px,
    rgba(255, 255, 255, 0.1) 8px,
    rgba(255, 255, 255, 0.1) 9px
  );
}

/* Trimmed/torn edge effect at bottom */
.shot-description-section:has(.shot-dialogue-list, .shot-action-list)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.1) 2px,
    rgba(0, 0, 0, 0.1) 4px,
    transparent 4px,
    transparent 8px,
    rgba(0, 0, 0, 0.08) 8px,
    rgba(0, 0, 0, 0.08) 9px
  );
  opacity: 0.6;
  pointer-events: none;
}

[data-theme="dark"] .shot-description-section:has(.shot-dialogue-list, .shot-action-list)::after {
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.15) 2px,
    rgba(255, 255, 255, 0.15) 4px,
    transparent 4px,
    transparent 8px,
    rgba(255, 255, 255, 0.1) 8px,
    rgba(255, 255, 255, 0.1) 9px
  );
}

/* Action List - Script style */
.shot-action-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.shot-action-item {
  font-style: italic;
  color: #333;
  line-height: 1.6;
  margin: 0;
  padding: 0 2rem;
}

[data-theme="dark"] .shot-action-item {
  color: #ccc;
}

/* Dialogue List - Script style (centered column) */
.shot-dialogue-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shot-dialogue-item {
  padding: 0 20%;
  line-height: 1.6;
  text-align: left;
}

.dialogue-character {
  display: block;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
  color: #333;
  text-transform: uppercase;
  font-size: 0.95em;
}

[data-theme="dark"] .dialogue-character {
  color: #f0f0f0;
}

.dialogue-text {
  display: block;
  color: #333;
}

[data-theme="dark"] .dialogue-text {
  color: #e0e0e0;
}