/* Portal de Novels de Cultivo - Estilos Principais */

/* Reset e Variáveis CSS */
:root {
  /* Cores do Tema Escuro */
  --bg-primary: #0f0f1e;
  --bg-secondary: #1a1a2e;
  --bg-tertiary: #16213e;
  --bg-card: #1e2a4a;
  --bg-hover: #253154;
  
  --text-primary: #ffffff;
  --text-secondary: #b8c5d6;
  --text-muted: #8fa3b8;
  --text-inverse: #1a1a2e;
  
  --accent-primary: #7c3aed;
  --accent-secondary: #a855f7;
  --accent-tertiary: #c084fc;
  
  --border-color: #2d3748;
  --border-light: #374151;
  
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  
  /* Gradientes */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-accent: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  --gradient-card: linear-gradient(135deg, #1e2a4a 0%, #253154 100%);
  
  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.3);
  
  /* Tipografia */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-reading: 'Noto Serif', Georgia, serif;
  
  /* Espaçamentos */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  
  /* Bordas */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  /* Transições */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Tema Claro */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-hover: #f1f5f9;
  
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  --border-color: #e2e8f0;
  --border-light: #cbd5e1;
  
  --gradient-card: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

/* Ajustes específicos do tema claro para botão hero */
[data-theme="light"] .btn-hero {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

[data-theme="light"] .btn-hero:hover {
  color: var(--text-inverse);
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-fluid {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: var(--space-md);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Header */
.header {
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  gap: var(--space-lg);
}

/* Logo */
.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-img {
  width: 32px;
  height: 32px;
  margin-right: var(--space-sm);
}

.logo-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navigation */
.nav-main {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.dropdown-arrow {
  font-size: 0.75rem;
  transition: var(--transition-fast);
}

.nav-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-sm);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition-fast);
  z-index: 1001;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  list-style: none;
}

.dropdown-menu a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.dropdown-menu a:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Search */
.search-container {
  flex: 1;
  max-width: 400px;
}

.search-form {
  position: relative;
  display: flex;
}

.search-input {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.search-btn {
  position: absolute;
  right: var(--space-xs);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.search-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

/* User Menu */
.user-menu {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.auth-buttons {
  display: flex;
  gap: var(--space-sm);
}

.user-dropdown {
  position: relative;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  pointer-events: auto;
  touch-action: manipulation;
  user-select: none;
}

.user-btn:hover {
  background: var(--bg-hover);
}

.user-btn:active {
  background: var(--bg-hover);
}

.user-btn:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-arrow {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
  margin-left: var(--space-xs);
}

.user-dropdown.active .dropdown-arrow {
  transform: rotate(180deg);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.user-name {
  font-weight: 500;
}

.cultivation-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--text-primary);
}

.cultivation-badge.ortodoxo {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.cultivation-badge.demoniaco {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Ajustes para tema claro */
[data-theme="light"] .cultivation-badge.ortodoxo {
  background: rgba(59, 130, 246, 0.15);
  color: #1d4ed8;
}

[data-theme="light"] .cultivation-badge.demoniaco {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

.xp-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--accent-primary);
  color: var(--text-inverse);
}

.user-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-sm);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition-fast);
  z-index: 9999;
  pointer-events: none;
}

.user-dropdown.active .user-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.user-dropdown-menu li {
  list-style: none;
}

.user-dropdown-menu a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.user-dropdown-menu a:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.user-dropdown-menu .divider {
  height: 1px;
  background: var(--border-color);
  margin: var(--space-sm) 0;
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  font-size: 1.2rem;
}

.theme-toggle:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-lg);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
  gap: var(--space-sm);
  font-size: 0.9rem;
  line-height: 1;
}

.btn-primary {
  background: var(--gradient-accent);
  color: var(--text-inverse);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-hover);
}

.btn-sm {
  padding: var(--space-xs) var(--space-md);
  font-size: 0.8rem;
}

.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: 1rem;
}

/* Botão de ação principal para hero section */
.btn-hero {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--accent-primary);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-accent);
  transition: var(--transition-normal);
  z-index: -1;
}

.btn-hero:hover {
  color: var(--text-inverse);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-hero:hover::before {
  left: 0;
}

/* Cards */
.card {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: var(--transition-normal);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.card-header {
  margin-bottom: var(--space-lg);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.card-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Alerts */
.alert {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  border-left: 4px solid;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--success);
  color: var(--success);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--error);
  color: var(--error);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--warning);
  color: var(--warning);
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--info);
  color: var(--info);
}

/* Forms */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 500;
  color: var(--text-primary);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-help {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

.form-error {
  color: var(--error);
  font-size: 0.8rem;
  margin-top: var(--space-xs);
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  flex-direction: column;
  gap: 4px;
}

.mobile-menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition-fast);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  overflow-y: auto;
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-content {
  background: var(--bg-secondary);
  width: 280px;
  height: 100vh;
  margin-left: auto;
  padding: var(--space-xl) var(--space-lg);
  border-left: 1px solid var(--border-color);
  overflow-y: auto;
}

.mobile-nav ul {
  list-style: none;
}

.mobile-nav a {
  display: block;
  padding: var(--space-md) 0;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-fast);
}

.mobile-nav a:hover {
  color: var(--accent-primary);
}

.mobile-nav .divider {
  height: 1px;
  background: var(--border-color);
  margin: var(--space-md) 0;
}

/* Scroll to Top */
.scroll-to-top {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  width: 50px;
  height: 50px;
  background: var(--gradient-accent);
  color: var(--text-inverse);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
  z-index: 1000;
  font-size: 1.2rem;
  font-weight: bold;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  margin-top: var(--space-2xl);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-xl);
  padding: var(--space-2xl) 0;
}

.footer-section h3,
.footer-section h4 {
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.footer-section p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.footer-links {
  list-style: none;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: var(--space-xs) 0;
  display: block;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-primary);
}

.social-links {
  display: flex;
  gap: var(--space-md);
}

.social-link {
  width: 40px;
  height: 40px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.social-link:hover {
  background: var(--accent-primary);
  color: var(--text-inverse);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding: var(--space-lg) 0;
  text-align: center;
}

.footer-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  margin-bottom: var(--space-lg);
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-copyright p {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: var(--space-xs);
}

/* Chapter Reader Styles */
.novel-header {
  background: var(--bg-card);
  border-radius: 12px;
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.novel-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  font-family: var(--font-primary);
}

.chapter-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent-primary);
  font-family: var(--font-primary);
}

.chapter-info {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  border: 1px solid var(--border-color);
}

.chapter-info p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.chapter-info strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Reading Settings Panel */
.reading-settings {
  position: fixed;
  top: 50%;
  right: -300px;
  transform: translateY(-50%);
  width: 280px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: var(--space-lg);
  box-shadow: var(--shadow-xl);
  transition: right 0.3s ease;
  z-index: 1000;
  max-height: 80vh;
  overflow-y: auto;
}

.reading-settings.active {
  right: 20px;
}

.settings-toggle {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--accent-primary);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.settings-toggle:hover {
  background: var(--accent-secondary);
  transform: translateY(-50%) scale(1.1);
}

.settings-group {
  margin-bottom: var(--space-lg);
}

.settings-group label {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  font-size: 0.9rem;
}

.settings-group select,
.settings-group input[type="range"] {
  width: 100%;
  padding: var(--space-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.settings-group input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--bg-tertiary);
  outline: none;
}

.settings-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--accent-primary);
  border-radius: 50%;
  cursor: pointer;
}

.color-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.color-option {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.color-option.active {
  border-color: var(--accent-primary);
  transform: scale(1.1);
}

/* Chapter Content */
.chapter-content {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: var(--space-2xl);
  margin: var(--space-xl) 0;
  border: 1px solid var(--border-color);
  font-family: var(--font-reading);
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-primary);
  max-width: none;
  transition: all 0.3s ease;
}

.chapter-content.reading-mode {
  max-width: 800px;
  margin: var(--space-xl) auto;
  background: #1a1a1a;
  color: #e5e5e5;
}

/* Chapter Navigation */
.chapter-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: var(--space-xl) 0;
  gap: var(--space-lg);
}

.chapter-nav-btn {
  background: var(--gradient-accent);
  color: white;
  border: none;
  padding: var(--space-md) var(--space-xl);
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  min-width: 140px;
  justify-content: center;
}

.chapter-nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.chapter-nav-btn:disabled {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.chapter-nav-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.chapter-counter {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Author Note */
.author-note {
  background: var(--bg-tertiary);
  border-left: 4px solid var(--accent-primary);
  border-radius: 0 8px 8px 0;
  padding: var(--space-lg);
  margin-top: var(--space-xl);
}

.author-note h3 {
  color: var(--accent-primary);
  margin-bottom: var(--space-md);
  font-size: 1.1rem;
}

.author-note p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Error Messages */
.error-message {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: var(--space-xl);
  text-align: center;
  margin: var(--space-xl) 0;
}

.error-message h1 {
  color: var(--error);
  margin-bottom: var(--space-md);
}

.error-message p {
  color: var(--text-secondary);
}

/* Nova Navegação de Capítulos */
.chapter-nav-container {
  margin: var(--space-2xl) 0;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.chapter-progress-section {
  padding: var(--space-xl);
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  border-bottom: 1px solid var(--border-color);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.progress-text {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.progress-percentage {
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 1rem;
}

.progress-bar {
  height: 8px;
  background: var(--bg-primary);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.progress-fill {
  height: 100%;
  background: var(--gradient-accent);
  border-radius: 4px;
  transition: width 0.3s ease;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
  animation: shine 2s infinite;
}

@keyframes shine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.nav-cards-container {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.nav-card {
  flex: 1;
  background: var(--bg-secondary);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: var(--space-lg);
  text-decoration: none;
  color: inherit;
  min-height: 80px;
  cursor: pointer;
}

.nav-card:last-child {
  border-right: none;
}

.nav-card:hover:not(.disabled) {
  background: var(--bg-hover);
  transform: translateY(-2px);
  z-index: 1;
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
}

.nav-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.nav-card-icon {
  width: 24px;
  height: 24px;
  color: var(--accent-primary);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.nav-card:hover:not(.disabled) .nav-card-icon {
  color: var(--accent-secondary);
  transform: scale(1.1);
}

.nav-card-content {
  flex: 1;
  min-width: 0;
}

.prev-card .nav-card-content {
  margin-left: var(--space-md);
}

.next-card .nav-card-content {
  margin-right: var(--space-md);
  text-align: right;
}

.chapters-list-card .nav-card-content {
  text-align: center;
  margin: 0 var(--space-sm);
}

.nav-card-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-xs);
}

.nav-card-title {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 600;
  line-height: 1.3;
}

.nav-card:hover:not(.disabled) .nav-card-title {
  color: var(--text-primary);
}

/* Modal de Capítulos */
.chapters-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.chapters-modal.active {
  opacity: 1;
  visibility: visible;
}

.chapters-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  cursor: pointer;
}

.chapters-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xl);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  transition: all 0.3s ease;
}

.chapters-modal.active .chapters-modal-content {
  transform: translate(-50%, -50%) scale(1);
}

.chapters-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-xl);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-tertiary);
}

.chapters-modal-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.3rem;
  font-weight: 700;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.modal-close-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.chapters-list {
  max-height: 400px;
  overflow-y: auto;
  padding: var(--space-md);
}

.chapter-item {
  display: flex;
  align-items: center;
  padding: var(--space-md);
  margin-bottom: var(--space-xs);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.chapter-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: translateX(4px);
}

.chapter-item.current {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-secondary);
  font-weight: 600;
}

.chapter-item.current:hover {
  background: var(--accent-secondary);
  transform: none;
}

.chapter-number {
  font-weight: 600;
  min-width: 80px;
  color: var(--accent-primary);
  font-size: 0.9rem;
}

.chapter-item.current .chapter-number {
  color: white;
}

.chapter-title {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

.hidden { display: none; }
.visible { display: block; }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.slide-in-up {
  animation: slideInUp 0.6s ease-out;
}

/* Sistema de Notificações Toast */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: 400px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: var(--space-md);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-width: 300px;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  border-left: 4px solid var(--success);
}

.toast.error {
  border-left: 4px solid var(--error);
}

.toast.warning {
  border-left: 4px solid var(--warning);
}

.toast.info {
  border-left: 4px solid var(--info);
}

.toast-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.toast.success .toast-icon::before {
  content: '✅';
}

.toast.error .toast-icon::before {
  content: '❌';
}

.toast.warning .toast-icon::before {
  content: '⚠️';
}

.toast.info .toast-icon::before {
  content: 'ℹ️';
}

.toast-content {
  flex: 1;
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0;
  margin-left: var(--space-sm);
  flex-shrink: 0;
  transition: color 0.3s ease;
}

.toast-close:hover {
  color: var(--text-primary);
}

@media (max-width: 480px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .toast {
    min-width: auto;
  }
}
