/* Webnovel Reader Specific CSS */
.reader-container {
  max-width: 820px;
  margin: 2rem auto;
  padding: 3rem 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  min-height: 80vh;
}

/* Reader Themes */
.theme-dark {
  background-color: #0f172a;
  color: #e2e8f0;
}
.theme-dark .reader-content {
  color: #cbd5e1;
}

.theme-light {
  background-color: #ffffff;
  color: #1e293b;
}
.theme-light .reader-content {
  color: #334155;
}

.theme-sepia {
  background-color: #fbf0d9;
  color: #5f4b32;
}
.theme-sepia .reader-content {
  color: #433422;
}

.theme-night {
  background-color: #000000;
  color: #94a3b8;
}

/* Reader Typography - Preserving Author Formatting Exactly */
.reader-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
}

.reader-meta {
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.7;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.reader-content {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.15rem;
  line-height: 1.85;
  letter-spacing: 0.01em;
  word-break: break-word;
}

.reader-content p {
  margin-bottom: 1.1rem;
  text-indent: 0; /* Respect author paragraph formatting without forced indents */
}

.reader-content blockquote {
  border-left: 4px solid var(--accent-primary);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  opacity: 0.9;
}

.author-note-block {
  background-color: rgba(99, 102, 241, 0.1);
  border-left: 4px solid #6366f1;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem;
}

/* Floating Lower Right Settings Trigger Button */
.reader-settings-trigger {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #6366f1;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.reader-settings-trigger:hover, .reader-settings-trigger.active {
  background: #4f46e5;
  transform: scale(1.08) rotate(45deg);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.6);
}

/* Floating Reader Configuration Popup Toolbar (Positioned at Lower Right) */
.reader-toolbar {
  position: fixed;
  bottom: 90px;
  right: 25px;
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.65rem 1.25rem;
  border-radius: 40px;
  display: none;
  align-items: center;
  gap: 0.9rem;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
  z-index: 999;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.reader-toolbar.show {
  display: flex !important;
  animation: slideUpFade 0.25s ease forwards;
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reader-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reader-btn:hover, .reader-btn.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #6366f1, #10b981);
  width: 0%;
  z-index: 1001;
  transition: width 0.1s ease;
}

/* Mobile Responsiveness Improvements */
@media (max-width: 575.98px) {
  .reader-container {
    padding: 1.25rem 0.85rem !important;
    margin: 0.5rem auto !important;
    border-radius: 8px !important;
  }

  .reader-title {
    font-size: 1.4rem !important;
  }

  .reader-content {
    font-size: 1.05rem !important;
    line-height: 1.75 !important;
  }

  .reader-settings-trigger {
    bottom: 20px !important;
    right: 15px !important;
    width: 46px !important;
    height: 46px !important;
  }

  .reader-toolbar {
    bottom: 78px !important;
    right: 15px !important;
    padding: 0.5rem 0.85rem !important;
    gap: 0.5rem !important;
    max-width: 90vw !important;
  }
}
