/* ===================================================================
   CHAPTER-SPECIFIC ATMOSPHERIC THEMES
   Custom tailored for each era, location, and aesthetic of Pandora
   =================================================================== */

/* ===================================================================
   1. PRÓLOGO — NOVA ÂNCORA 2350 (SINTONIA & BIOARQUITETURA)
   =================================================================== */
body.theme-prologo {
  background-color: #030a16;
  background-image: 
    radial-gradient(ellipse at 80% 20%, rgba(0, 242, 254, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
    linear-gradient(to bottom, #030814 0%, #051329 100%);
  --accent-cyan: #00f2fe;
  --accent-emerald: #10b981;
  --border-quantum: rgba(0, 242, 254, 0.3);
}

body.theme-prologo .reader-article {
  border-top: 3px solid #00f2fe;
  box-shadow: 0 20px 50px rgba(0, 242, 254, 0.08), 0 0 100px rgba(16, 185, 129, 0.05);
}

body.theme-prologo .chapter-hero {
  border-color: rgba(0, 242, 254, 0.4);
  box-shadow: 0 0 30px rgba(0, 242, 254, 0.2);
}

/* ===================================================================
   2. CAPÍTULO 1 — SÃO PAULO 2020 (CHUVA, ASFALTO & MÁSCARAS)
   =================================================================== */
body.theme-cap1 {
  background-color: #0b0d14;
  background-image: 
    radial-gradient(circle at 50% 10%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 10% 90%, rgba(56, 189, 248, 0.06) 0%, transparent 60%),
    linear-gradient(rgba(11, 13, 20, 0.95), rgba(16, 18, 27, 0.98));
  --accent-cyan: #38bdf8;
  --accent-emerald: #f59e0b; /* Amber sodium streetlight */
  --border-quantum: rgba(245, 158, 11, 0.3);
}

body.theme-cap1 .reader-article {
  border-top: 3px solid #f59e0b;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 80px rgba(245, 158, 11, 0.05);
  background: rgba(14, 18, 28, 0.85);
}

body.theme-cap1 .chapter-meta-bar {
  color: #fbbf24;
}

body.theme-cap1 .markdown-body h1 {
  text-shadow: 0 0 25px rgba(245, 158, 11, 0.3);
}

body.theme-cap1 .stat-row {
  border-left-color: #f59e0b;
}

/* ===================================================================
   3. CAPÍTULO 2 — INSTITUTO HORIZON 2026 (VIDRO CORPORATIVO & CRISTAL)
   =================================================================== */
body.theme-cap2 {
  background-color: #070913;
  background-image: 
    radial-gradient(circle at 80% 30%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 20% 70%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
    linear-gradient(to bottom, #050710 0%, #0a0d1f 100%);
  --accent-cyan: #c084fc;
  --accent-emerald: #06b6d4;
  --border-quantum: rgba(192, 132, 252, 0.35);
}

body.theme-cap2 .reader-article {
  border-top: 3px solid #c084fc;
  box-shadow: 0 20px 60px rgba(168, 85, 247, 0.12);
}

body.theme-cap2 .chapter-meta-bar {
  color: #c084fc;
}

body.theme-cap2 .markdown-body h1 {
  text-shadow: 0 0 25px rgba(192, 132, 252, 0.4);
}

body.theme-cap2 .stat-row {
  border-left-color: #c084fc;
}

/* ===================================================================
   4. CAPÍTULO 3 — BLETCHLEY PARK 1945 (CÓDIGO DE TURING & FÓSFORO ÂMBAR)
   =================================================================== */
body.theme-cap3 {
  background-color: #0c0b08;
  background-image: 
    radial-gradient(ellipse at 50% 20%, rgba(217, 119, 6, 0.15) 0%, transparent 60%),
    linear-gradient(to bottom, #0c0a06 0%, #15120c 100%);
  --accent-cyan: #fbbf24;
  --accent-emerald: #d97706;
  --border-quantum: rgba(251, 191, 36, 0.35);
  --text-main: #f3f0e6;
}

body.theme-cap3 .reader-article {
  border-top: 3px solid #fbbf24;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 60px rgba(217, 119, 6, 0.08);
  background: rgba(18, 16, 12, 0.9);
}

body.theme-cap3 .chapter-meta-bar {
  color: #fbbf24;
}

body.theme-cap3 .markdown-body h1 {
  color: #fef3c7;
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.35);
}

body.theme-cap3 .stat-row {
  border-left-color: #fbbf24;
}

/* ===================================================================
   5. CAPÍTULO 4 — NOVA ÂNCORA & WILMSLOW 1945 (TAPEÇARIA & CHUVA INGLESA)
   =================================================================== */
body.theme-cap4 {
  background-color: #080f14;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(244, 63, 94, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(52, 211, 153, 0.1) 0%, transparent 60%),
    linear-gradient(to bottom, #060b10 0%, #0d1720 100%);
  --accent-cyan: #38bdf8;
  --accent-emerald: #fb7185; /* Strawberry rose accent */
  --border-quantum: rgba(251, 113, 133, 0.3);
}

body.theme-cap4 .reader-article {
  border-top: 3px solid #fb7185;
  box-shadow: 0 20px 50px rgba(244, 63, 94, 0.08);
}

body.theme-cap4 .chapter-meta-bar {
  color: #fb7185;
}

body.theme-cap4 .stat-row {
  border-left-color: #fb7185;
}

/* ===================================================================
   6. CAPÍTULO 5 — LONGO INVERNO 2047 (GELO, CINZA & METRÔ PAULISTA)
   =================================================================== */
body.theme-cap5 {
  background-color: #060a12;
  background-image: 
    radial-gradient(circle at 50% 20%, rgba(147, 197, 253, 0.15) 0%, transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(234, 179, 8, 0.08) 0%, transparent 50%),
    linear-gradient(to bottom, #040810 0%, #0b1120 100%);
  --accent-cyan: #93c5fd; /* Permafrost blue */
  --accent-emerald: #eab308; /* Hazard yellow */
  --border-quantum: rgba(147, 197, 253, 0.35);
}

body.theme-cap5 .reader-article {
  border-top: 3px solid #93c5fd;
  box-shadow: 0 20px 60px rgba(147, 197, 253, 0.1), 0 0 80px rgba(0, 0, 0, 0.9);
}

body.theme-cap5 .chapter-meta-bar {
  color: #93c5fd;
}

body.theme-cap5 .markdown-body h1 {
  text-shadow: 0 0 25px rgba(147, 197, 253, 0.4);
}

body.theme-cap5 .stat-row {
  border-left-color: #eab308;
}

/* ===================================================================
   7. CAPÍTULO 6 — CANTAREIRA 2047 (BIOCOMPUTADOR MICELIAL & ÁGUA VIVA)
   =================================================================== */
body.theme-cap6 {
  background-color: #030d12;
  background-image: 
    radial-gradient(ellipse at 70% 30%, rgba(20, 184, 166, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 30% 80%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
    linear-gradient(to bottom, #02090e 0%, #061922 100%);
  --accent-cyan: #2dd4bf; /* Glowing bio-mycelial teal */
  --accent-emerald: #38bdf8;
  --border-quantum: rgba(45, 212, 191, 0.35);
}

body.theme-cap6 .reader-article {
  border-top: 3px solid #2dd4bf;
  box-shadow: 0 20px 60px rgba(45, 212, 191, 0.15), 0 0 100px rgba(6, 182, 212, 0.08);
}

body.theme-cap6 .chapter-meta-bar {
  color: #2dd4bf;
}

body.theme-cap6 .markdown-body h1 {
  text-shadow: 0 0 25px rgba(45, 212, 191, 0.4);
}

body.theme-cap6 .stat-row {
  border-left-color: #2dd4bf;
}

/* ===================================================================
   8. CAPÍTULO 7 — O JARDIM SOBRE AS CINZAS (ORONIS & PROFUNDEZAS AQUÁTICAS)
   =================================================================== */
body.theme-cap7 {
  background-color: #020f14;
  background-image: 
    radial-gradient(ellipse at 70% 30%, rgba(6, 182, 212, 0.20) 0%, transparent 60%),
    radial-gradient(ellipse at 30% 80%, rgba(16, 185, 129, 0.16) 0%, transparent 50%),
    linear-gradient(to bottom, #01080c 0%, #041922 100%);
  --accent-cyan: #06b6d4; /* Thalassian abyssal turquoise */
  --accent-emerald: #10b981; /* Restorative garden green */
  --border-quantum: rgba(6, 182, 212, 0.35);
}

body.theme-cap7 .reader-article {
  border-top: 3px solid #06b6d4;
  box-shadow: 0 20px 60px rgba(6, 182, 212, 0.18), 0 0 100px rgba(16, 185, 129, 0.10);
}

body.theme-cap7 .chapter-meta-bar {
  color: #06b6d4;
}

body.theme-cap7 .markdown-body h1 {
  text-shadow: 0 0 25px rgba(6, 182, 212, 0.45);
}

body.theme-cap7 .stat-row {
  border-left-color: #06b6d4;
}

/* ===================================================================
   9. CAPÍTULO 8 — O NOVO AMANHECER (EMERGÊNCIA SOLAR, BIOCÍRCULOS & ALIANÇA)
   =================================================================== */
body.theme-cap8 {
  background-color: #070d18;
  background-image: 
    radial-gradient(ellipse at 50% 10%, rgba(245, 158, 11, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(56, 189, 248, 0.14) 0%, transparent 50%),
    linear-gradient(to bottom, #050912 0%, #0a1322 100%);
  --accent-cyan: #38bdf8; /* Restorative dawn sky cyan */
  --accent-emerald: #f59e0b; /* Golden solar resurgence */
  --border-quantum: rgba(245, 158, 11, 0.35);
}

body.theme-cap8 .reader-article {
  border-top: 3px solid #f59e0b;
  box-shadow: 0 20px 60px rgba(245, 158, 11, 0.15), 0 0 100px rgba(56, 189, 248, 0.10);
}

body.theme-cap8 .chapter-meta-bar {
  color: #f59e0b;
}

body.theme-cap8 .markdown-body h1 {
  text-shadow: 0 0 25px rgba(245, 158, 11, 0.45);
}

body.theme-cap8 .stat-row {
  border-left-color: #f59e0b;
}

/* ===================================================================
   CHRONAL CHAPTER PREVIEW NAVIGATION (ANTERIOR & PRÓXIMO)
   Cinematic cards displaying previous and next chapters
   =================================================================== */
.chronal-nav-preview {
  max-width: var(--reader-width);
  width: 100%;
  margin: 2rem auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-quantum);
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 240px 1fr;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: all 0.3s var(--ease-quantum);
  text-decoration: none;
  color: inherit;
}

@media (max-width: 720px) {
  .chronal-nav-preview {
    grid-template-columns: 1fr;
  }
}

.chronal-nav-preview:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(0, 242, 254, 0.2);
}

.chronal-nav-preview.prev-preview {
  margin-bottom: 2.2rem;
  border-left: 4px solid var(--accent-emerald);
}

.chronal-nav-preview.next-preview {
  margin-top: 3rem;
  margin-bottom: 2.5rem;
  border-right: 4px solid var(--accent-cyan);
}

.nav-preview-media {
  position: relative;
  min-height: 160px;
  background: #020610;
  overflow: hidden;
}

.nav-preview-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.chronal-nav-preview:hover .nav-preview-media img {
  transform: scale(1.06);
}

.nav-preview-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(4, 10, 22, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-quantum);
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-hud);
  font-size: 0.68rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.nav-preview-body {
  padding: 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.nav-preview-direction {
  font-family: var(--font-hud);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.prev-preview .nav-preview-direction {
  color: var(--accent-emerald);
}

.next-preview .nav-preview-direction {
  color: var(--accent-cyan);
}

.nav-preview-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.nav-preview-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 1.1rem;
}

.nav-preview-cta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-hud);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.5rem 1.1rem;
  border-radius: 6px;
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid var(--border-quantum);
  color: var(--accent-cyan);
  text-decoration: none;
  transition: all 0.25s ease;
}

.chronal-nav-preview:hover .nav-preview-cta {
  background: var(--accent-cyan);
  color: #040810;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

.prev-preview .nav-preview-cta {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: var(--accent-emerald);
}

.prev-preview:hover .nav-preview-cta {
  background: var(--accent-emerald);
  color: #040810;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

/* ===================================================================
   CHAPTER READING CONTAINER (PADRONIZAÇÃO UNIFICADA COM O INDEX)
   =================================================================== */
.chapter-reading-container {
  max-width: var(--reader-width);
  margin: 1.5rem auto 3.5rem;
  padding: 0 1rem;
}

@media (max-width: 768px) {
  .chapter-reading-container {
    margin: 1rem auto 2.5rem;
    padding: 0 0.5rem;
  }
}

.chapter-telemetry-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-quantum);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 2rem;
  font-family: var(--font-hud);
  font-size: 0.75rem;
}

.strip-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.strip-label {
  color: var(--text-dim);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.strip-val {
  color: #fff;
  font-weight: 500;
}

.strip-val.sensory {
  color: #6ee7b7;
  font-style: italic;
}


