/* ==========================================================================
   SCRIPTS & STORYBOARDS - Screenplay Reader & Web Audio Player UI
   ========================================================================== */

.scripts-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

/* Sidebar Navigation */
.scripts-sidebar {
  background: var(--bg-obsidian-card);
  backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 24px;
  position: sticky;
  top: 100px;
}

.sidebar-title {
  font-size: 1rem;
  color: var(--accent-cyan);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chapter-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chapter-item {
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 10px;
}

.chapter-item:hover, .chapter-item.active {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--border-neon-cyan);
  color: #fff;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.chapter-item.active i {
  color: var(--accent-cyan);
}

/* Script Reader Main Panel */
.script-reader-panel {
  background: rgba(8, 10, 18, 0.9);
  border: 1px solid var(--border-glass);
  border-radius: 18px;
  padding: 40px;
  box-shadow: var(--shadow-glass);
}

.script-header-info {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-glass);
}

.script-title {
  font-size: 2.2rem;
  color: #fff;
  margin-bottom: 8px;
}

.script-meta {
  display: flex;
  gap: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Integrated Audio Player */
.audio-player-card {
  background: linear-gradient(135deg, rgba(15, 22, 40, 0.9) 0%, rgba(30, 15, 45, 0.9) 100%);
  border: 1px solid var(--border-neon-purple);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-neon-purple);
}

.audio-btn-play {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border: none;
  color: #fff;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 20px var(--accent-cyan-glow);
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.audio-btn-play:hover {
  transform: scale(1.08);
  box-shadow: 0 0 30px var(--accent-cyan-glow);
}

.audio-track-info {
  flex: 1;
}

.audio-track-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.audio-track-subtitle {
  font-size: 0.8rem;
  color: var(--accent-gold);
}

/* Audio Waveform Canvas */
#waveform-canvas {
  width: 100%;
  height: 36px;
  margin-top: 8px;
}

/* Screenplay Content Styling */
.screenplay-body {
  font-family: var(--font-script);
  font-size: 1rem;
  line-height: 1.8;
  color: #d1d5db;
  max-width: 800px;
  margin: 0 auto;
}

.scene-heading {
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  margin: 28px 0 12px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
}

.scene-action {
  margin-bottom: 16px;
  color: #e5e7eb;
}

.scene-character {
  text-align: center;
  font-weight: 700;
  color: var(--accent-gold);
  text-transform: uppercase;
  margin-top: 20px;
}

.scene-parenthetical {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
}

.scene-dialogue {
  max-width: 520px;
  margin: 0 auto 20px auto;
  text-align: center;
  color: #f3f4f6;
}

.scene-sfx {
  color: var(--accent-purple);
  font-style: italic;
  font-weight: 600;
  margin: 12px 0;
}

@media (max-width: 992px) {
  .scripts-layout {
    grid-template-columns: 1fr;
  }
  .scripts-sidebar {
    position: static;
  }
}
