/* General */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #0a0f1c;
  color: #e0e6f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

/* Header */
header {
  padding: 2rem;
  text-align: center;
  max-width: 800px;
}

header h1 {
  font-size: 2.5rem;
  color: #4ea6ff;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 0 10px #4ea6ff;
}

header p {
  margin-top: 1rem;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #c0d6f5;
}

/* Grid de capítulos */
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  width: 90%;
  max-width: 1000px;
  padding: 2rem;
  justify-items: center;
}

.chapter-card {
  background-color: #121a2b;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(78, 166, 255, 0.4);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  max-width: 220px;
}

.chapter-card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(78, 166, 255, 0.7);
}

.chapter-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
}

.chapter-card h2 {
  margin: 1rem 0;
  font-size: 1rem;
  color: #4ea6ff;
  letter-spacing: 1px;
}

/* Libro */
.page {
  max-width: 800px;
  padding: 2rem;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  min-height: 80vh;
  text-align: left;
  font-weight: lighter;
  line-height: 1.5;
}

.page.active {
  display: flex;
}

h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #4ea6ff;
  text-shadow: 0 0 15px #4ea6ff;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: normal;
  color: #c0d6f5;
  text-align: center;
}

p {
  font-size: 1.2rem;
  margin-bottom: 0.7rem;
}

.dialogue {
  color: #82c4ff;
}

/* Navegación */
.navigation {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-btn {
  background-color: #4ea6ff;
  border: none;
  color: #0a0f1c;
  font-size: 2rem;
  font-weight: bold;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(78, 166, 255, 0.8);
}

.page-counter {
  margin-top: 1rem;
  font-size: 1rem;
  color: #c0d6f5;
  text-align: center;
  font-family: 'arial';
}

.back-small {
  margin-top: 1.5rem;
  text-align: center;
}

.back-small a {
  text-decoration: none;
  color: #82c4ff;
  font-size: 1rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.back-small a:hover {
  opacity: 1;
}

.final-btn {
  background-color: #4ea6ff;
  color: #0a0f1c;
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
  margin-top: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.final-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(78, 166, 255, 0.8);
}

.chapter-img {
  display: block;
  margin: 1rem auto;
  max-width: 250px;
  height: auto;
}
