/* ========================================================
   GHOST READER - DARK CYBER-PAPER LAYOUT & THEMES
   100% complete aesthetic styles for e-ink reading.
   ======================================================== */

:root {
  --color-phosphor: #10B981; /* Phosphor emerald green */
  --color-cyber-blue: #00E5FF;
  --bg-night: #030303;
  --text-night: #E2E8F0;
  --bg-day: #F7F5F0;
  --text-day: #1E293B;
  --bg-sepia: #E6DFD3;
  --text-sepia: #451A03;
}

/* Base Body Styles */
body {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Selection aesthetics */
::selection {
  background-color: rgba(16, 185, 129, 0.25);
  color: inherit;
}

/* Continuous Ghost Sheet layout */
#reader-vertical-continuous-stream {
  width: 100%;
  margin: 0 auto;
  padding: 5% 0;
  transition: font-size 0.2s ease, font-family 0.2s ease;
}

/* Rich content styling (preserving 100% formatting) */
.rich-chapter-content {
  text-align: justify;
  line-height: 1.85;
  letter-spacing: 0.02em;
}

.rich-chapter-content p {
  margin-bottom: 1.5rem;
  text-indent: 1.5em;
  transition: background-color 0.2s ease;
}

.rich-chapter-content p:hover {
  background-color: rgba(16, 185, 129, 0.03);
}

.rich-chapter-content blockquote {
  border-left: 2px solid var(--color-phosphor);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  opacity: 0.9;
}

.rich-chapter-content h1, 
.rich-chapter-content h2, 
.rich-chapter-content h3, 
.rich-chapter-content h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  text-indent: 0;
}

.rich-chapter-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2rem auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Dynamic Translations */
.translation-block {
  font-size: 0.9em;
  line-height: 1.7;
  padding-left: 1.25rem;
  margin-top: -0.75rem;
  margin-bottom: 1.5rem;
  border-left: 2px dashed rgba(16, 185, 129, 0.4);
  color: var(--color-phosphor);
  animation: slideDownIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideDownIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Glassmorphic left sidebar menu taking exactly 1/3 page */
.sidebar-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 85vw;
}

@media (min-width: 640px) {
  .sidebar-container {
    width: 50vw;
  }
}

@media (min-width: 1024px) {
  .sidebar-container {
    width: 33.333333vw; /* Exact 1/3 page on desktop */
  }
}

/* Custom scrollbar matching cyber aesthetic */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(128, 128, 128, 0.2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-phosphor);
}
