/* HEREDEROS DEL SILENCIO - Visor de Capítulos */
.viewer-page { background: var(--charcoal); }

.chapter-header { min-height: 50vh; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; padding: 8rem 2rem 4rem; overflow: hidden; }
.chapter-header-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 70%, rgba(139,0,0,0.3) 0%, transparent 50%), radial-gradient(ellipse at 70% 30%, rgba(196,30,58,0.2) 0%, transparent 50%), linear-gradient(180deg, var(--noir) 0%, var(--charcoal) 100%); z-index: 0; }
.chapter-header-content { position: relative; z-index: 1; max-width: 800px; }
.chapter-label { display: inline-block; background: var(--blood); color: var(--white); padding: 0.5rem 1.5rem; font-size: 0.85rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 1.5rem; }
.chapter-header h1 { font-family: var(--font-display); font-size: 4rem; color: var(--white); margin-bottom: 0.5rem; text-shadow: 0 4px 30px rgba(0,0,0,0.5); }
.chapter-subtitle-header { font-family: var(--font-display); font-size: 1.5rem; font-style: italic; color: var(--gold); margin-bottom: 1.5rem; }
.chapter-info { display: flex; gap: 2rem; justify-content: center; color: var(--silver); }
.chapter-info span { display: flex; align-items: center; gap: 0.5rem; }

.content-tabs-section { background: var(--noir); position: sticky; top: 60px; z-index: 100; border-bottom: 1px solid rgba(255,255,255,0.1); }
.content-tabs { max-width: 600px; margin: 0 auto; display: flex; justify-content: center; padding: 1rem; gap: 0.5rem; }
.tab-btn { display: flex; align-items: center; gap: 0.5rem; padding: 1rem 2rem; background: transparent; border: 2px solid rgba(255,255,255,0.2); color: var(--silver); font-family: var(--font-body); font-size: 0.9rem; cursor: pointer; transition: all 0.3s ease; }
.tab-btn:hover { border-color: var(--gold); color: var(--gold); }
.tab-btn.active { background: var(--blood); border-color: var(--blood); color: var(--white); }

.chapter-main { padding: 3rem 0; min-height: 60vh; }
.tab-content { display: none; animation: fadeIn 0.5s ease; }
.tab-content.active { display: block; }

.reading-container { max-width: 800px; margin: 0 auto; }
.reading-controls { display: flex; justify-content: flex-end; gap: 0.5rem; margin-bottom: 1.5rem; }
.reading-controls button { width: 40px; height: 40px; background: var(--smoke); border: 1px solid rgba(255,255,255,0.1); color: var(--silver); cursor: pointer; transition: all 0.3s; display: flex; align-items: center; justify-content: center; }
.reading-controls button:hover { background: var(--blood); color: var(--white); }
.chapter-content-text { background: var(--ivory); color: var(--noir); padding: 3rem; border-radius: 4px; box-shadow: var(--shadow-soft); font-size: 1.1rem; line-height: 1.9; }
.chapter-content-text.dark-theme { background: var(--smoke); color: var(--ivory); }

.scene { margin-bottom: 3rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(0,0,0,0.1); }
.chapter-content-text.dark-theme .scene { border-bottom-color: rgba(255,255,255,0.1); }
.scene:last-child { border-bottom: none; margin-bottom: 0; }
.scene-header { background: linear-gradient(135deg, var(--crimson), var(--blood)); color: var(--white); padding: 1rem 1.5rem; margin-bottom: 1.5rem; border-radius: 4px; }
.scene-header h3 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 0.25rem; color: var(--white); }
.scene-meta { font-size: 0.9rem; opacity: 0.9; }
.scene-visual { background: rgba(212,175,55,0.1); border-left: 4px solid var(--gold); padding: 1.25rem; margin-bottom: 1.5rem; }
.scene-visual h4 { color: #b8860b; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.5rem; }
.chapter-content-text.dark-theme .scene-visual h4 { color: var(--gold); }
.dialogue { margin-bottom: 1rem; }
.dialogue-character { color: var(--blood); font-weight: 700; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }
.dialogue-text { margin-left: 1rem; padding-left: 1rem; border-left: 2px solid rgba(139,0,0,0.2); }
.narration { font-style: italic; color: var(--smoke); background: rgba(139,0,0,0.05); padding: 1rem 1.5rem; border-radius: 4px; margin: 1.5rem 0; }
.chapter-content-text.dark-theme .narration { color: var(--silver); background: rgba(139,0,0,0.15); }
.audio-direction { color: #666; font-size: 0.9rem; font-style: italic; margin: 0.75rem 0; }
.chapter-content-text.dark-theme .audio-direction { color: #999; }
.chapter-intro { margin-bottom: 2rem; }
.chapter-end { text-align: center; margin-top: 3rem; padding-top: 2rem; border-top: 2px solid var(--blood); }
.end-marker { font-family: var(--font-display); font-size: 1.2rem; color: var(--blood); margin-bottom: 1rem; }
.next-preview { color: #666; font-size: 0.95rem; }
.post-credits { margin-top: 3rem; }
.teaser-title { text-align: center; margin-top: 2rem; }
.teaser-title p { margin: 0.5rem 0; }
.finale { background: linear-gradient(135deg, rgba(139,0,0,0.1), rgba(212,175,55,0.1)); padding: 2rem; border-radius: 4px; }
.finale-text { color: #666; }

.audio-player-container { max-width: 600px; margin: 0 auto; }
.audio-player { background: var(--smoke); padding: 2rem; border-radius: 8px; text-align: center; }
.audio-artwork { margin-bottom: 1.5rem; }
.artwork-placeholder { width: 150px; height: 150px; background: linear-gradient(135deg, var(--crimson), var(--blood)); border-radius: 8px; margin: 0 auto; display: flex; align-items: center; justify-content: center; font-size: 4rem; color: var(--white); box-shadow: var(--shadow-dramatic); }
.audio-info h3 { color: var(--white); margin-bottom: 0.25rem; }
.audio-info p { color: var(--gold); font-style: italic; margin-bottom: 1.5rem; }
.audio-controls-wrapper { margin-bottom: 1rem; }
.audio-controls-wrapper audio { width: 100%; border-radius: 50px; }
.audio-no-file { padding: 2rem; color: var(--silver); }
.audio-no-file i { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.audio-hint, .video-hint { font-size: 0.85rem; color: var(--silver); opacity: 0.7; margin-top: 0.5rem; }
.audio-transcript { margin-top: 2rem; padding: 1.5rem; background: rgba(255,255,255,0.05); border-radius: 8px; text-align: center; }
.audio-transcript h4 { color: var(--gold); margin-bottom: 1rem; }
.audio-transcript p { color: var(--silver); margin-bottom: 1rem; }

.video-player-container { max-width: 900px; margin: 0 auto; }
.video-player { background: var(--noir); border-radius: 8px; overflow: hidden; }
.video-wrapper { position: relative; padding-top: 56.25%; background: var(--noir); }
.video-wrapper video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.video-no-file, .video-generating { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--silver); text-align: center; padding: 2rem; }
.video-no-file i, .video-generating i { font-size: 4rem; margin-bottom: 1.5rem; opacity: 0.5; }
.video-info { padding: 1.5rem; background: var(--smoke); }
.video-info h4 { color: var(--gold); margin-bottom: 0.5rem; }
.video-info p { color: var(--silver); font-size: 0.9rem; }

.chapter-navigation { background: var(--noir); padding: 2rem; border-top: 1px solid rgba(255,255,255,0.1); }
.chapter-navigation .container { display: flex; justify-content: space-between; align-items: center; max-width: 900px; }
.chapter-navigation a { display: flex; align-items: center; gap: 0.5rem; color: var(--silver); text-decoration: none; padding: 0.75rem 1.5rem; border: 1px solid rgba(255,255,255,0.1); transition: all 0.3s; }
.chapter-navigation a:hover { border-color: var(--gold); color: var(--gold); }
.chapter-navigation a.disabled { opacity: 0.3; pointer-events: none; }
.nav-all { background: var(--smoke); }
.no-content { text-align: center; padding: 3rem; }
.no-content h3 { color: var(--blood); margin-bottom: 1rem; }
.no-content a { color: var(--gold); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 768px) { .chapter-header h1 { font-size: 2.5rem; } .tab-btn { padding: 0.75rem 1rem; font-size: 0.8rem; } .tab-btn span { display: none; } .chapter-content-text { padding: 1.5rem; } .chapter-navigation .container { flex-direction: column; gap: 1rem; } }
