/* Custom Styles */
/* Global Reset and Font Setup */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #131427, #110a16);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Poppins", sans-serif;
}

/* Book Container (acts as the "ebook" frame) */
.book {
  width: 800px;
  max-width: 90%;
  height: 500px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

/* Page styling; pages are stacked on top of each other */
.page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 30px;
  transition: opacity 0.6s ease, transform 0.6s ease;
  opacity: 0;
  visibility: hidden;
  transform: translateX(100%);
}

/* The active page is visible and in its final position */
.page.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Cover Page Styling */
.cover-page {
  background: linear-gradient(135deg, #53498f, #652eb3);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.cover-page img {
  width: 300px;
  height: auto;
  margin-bottom: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.cover-page h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.cover-page p {
  font-size: 1.2rem;
  color: #e74c3c;
  margin-bottom: 30px;
}

/* Chapter Page Styling */
.chapter-page {
  background: #fff;
  color: #333;
}

.chapter-page h1 {
  font-size: 2rem;
  margin-bottom: 15px;
  color: #53498f;
}

.chapter-page p {
  margin-bottom: 15px;
  line-height: 1.6;
}

.chapter-page img {
  width: 100%;
  max-height: 250px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

blockquote {
  margin: 20px 0;
  padding: 15px 20px;
  background: #f7f7f7;
  border-left: 5px solid #652eb3;
  font-style: italic;
}

/* Navigation Buttons */
.nav-buttons {
  position: absolute;
  bottom: 20px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
}

.nav-buttons button {
  background: #e74c3c;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.nav-buttons button:hover {
  background: #c0392b;
}

.nav-buttons button:disabled {
  background: #ccc;
  cursor: not-allowed;
}
