/* Global Styles */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #ffffff;
  color: #222;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

html, body, .book-container, #book, .page {
  height: 100vh;
  width: 100vw;
  margin: 0;
  padding: 0;
}

.page {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Rainbow Background for Interface */
.intro-content {
  background: linear-gradient(135deg, #ffe5e5, #ffdede, #ffe0e0, #ffcdd2);
  background-size: 400% 400%;
  animation: rainbowFlow 15s ease infinite;
}

@keyframes rainbowFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Anchor Styles */
a {
  color: #d35400;
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover {
  color: #e67e22;
}
a:focus, a:active {
  color: #c0392b;
  text-decoration: none;
}

/* Navbar */
.navbar {
  background-color: transparent !important;
  padding: 0;
  margin: 0 auto;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 10;
  margin-top: 10px !important;
}
.navbar-brand {
  font-weight: bold;
  font-size: 1.8rem;
  color: #2c3e50;
}

/* Active link style */
.nav-link {
  color: #2c3e50 !important;
  transition: color 0.3s ease;
  font-weight: 500;
  padding: 0 10px;
  display: inline-block;
}
.nav-link.active {
  color: #d35400 !important;
  font-weight: bold;
}
.nav-link:hover {
  color: #e67e22 !important;
}

/* Hero Section */
.intro-content {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px 20px 10px;
  width: 100%;
  max-width: 900px;
  box-sizing: border-box;
  border-radius: 20px;
  position: relative;
  z-index: 1;
  margin: 0 auto;
  background: linear-gradient(135deg, #04460f, #1498a7, #878282c9, #9412a5);
  background-size: 400% 400%;
  animation: rainbowFlow 15s ease infinite;

  /* Rainbow shadow */
  box-shadow:
    2px 2px 0 #ff9d00,
    4px 4px 0 #ffa500,
    6px 6px 0 #ffff00,
    8px 8px 0 #008000,
    10px 10px 0 #0000ff,
    12px 12px 0 #4b0082,
    14px 14px 0 #ee82ee;
}


.intro-content > .container {
  width: 100%;
  max-width: 900px;
  padding: 0 20px;
}

/* Profile Image */
.profile-img {
  width: 28vw;
  max-width: 360px;
  min-width: 180px;
  height: auto;
  border-radius: 50%;
  border: 6px solid #ffffff;
  object-fit: cover;
  margin-bottom: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 10px 24px rgba(0,0,0,0.2);
}
.profile-img:hover {
  transform: scale(1.1);
  box-shadow: 0 16px 32px rgba(0,0,0,0.25);
}

/* Text Styling */
.intro-content h1 {
  font-size: 2.8rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 12px;
}
.intro-content p {
  font-size: 1.2rem;
  font-weight: 400;
  color: #34495e;
  max-width: 760px;
  margin: 0 auto 16px auto;
}

/* Buttons */
.btn-outline-warning {
  border: 2px solid #e67e22;
  color: #e67e22;
  font-weight: 600;
  padding: 10px 20px;
  font-size: 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}
.btn-outline-warning:hover {
  background-color: #e67e22;
  color: white;
}

/* Footer Note */
.footer-note {
  font-size: 0.9rem;
  color: #555;
  text-align: center;
  margin-top: 20px;
  position: absolute;
  bottom: 20px;
  width: 100%;
}

/* Colorful Bubble Background */


    #star-bg {
      position: absolute;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      display: flex;
      z-index: 0;
      pointer-events: none;
    }

    #star-bg::before,
    #star-bg::after {
      content: '';
      flex: 1;
      position: relative;
    }

    .book-container {
      flex: 0 0 800px;
      position: relative;
      z-index: 2;
    }

    .star {
      position: fixed;
      width: 28px;
      height: 28px;
      background: radial-gradient(circle, var(--color), rgba(255,255,255,0.2));
      border-radius: 50%;
      animation: floatBubble 10s ease-in-out infinite;
      box-shadow: 0 0 20px var(--color-shadow);
      opacity: 1;
      mix-blend-mode: screen;
      filter: brightness(110%) saturate(120%);
    }

    @keyframes floatBubble {
      0% {
        transform: translate(0, 0);
        opacity: 0.6;
      }
      50% {
        transform: translate(var(--x), var(--y));
        opacity: 1;
      }
      100% {
        transform: translate(0, 0);
        opacity: 0.6;
      }
    }
  


/* Section Titles */
.container h2 {
  margin-bottom: 20px;
  font-weight: 600;
  color: #2c3e50;
}

/* Responsive Design */
@media (max-width: 992px) {
  .intro-content h1 {
    font-size: 2.4rem;
  }
  .intro-content p {
    font-size: 1.1rem;
  }
  .profile-img {
    width: 40vw;
    max-width: 320px;
  }
}

@media (max-width: 576px) {
  .intro-content h1 {
    font-size: 1.9rem;
  }
  .intro-content p {
    font-size: 1rem;
  }
  .btn-outline-warning {
    font-size: 0.9rem;
    padding: 8px 16px;
  }
  .profile-img {
    width: 55vw;
    max-width: 220px;
  }
}

.chapter-page {
  padding: 60px 40px;
  text-align: center;
  font-size: 1.1rem;
  color: #2c3e50;
  background-color: #fff;
  min-height: 100%;
}

.chapter-page h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #f39c12;
}