html {
  padding: 0;
  margin: 0;
}
 body {
  line-height: 1.6;
  color: #333;
  margin: 0;
  padding: 0;
  background-color: #f7f2e2;
  overflow-x: hidden;
}
/* Default header settings */
header {
  position: relative;
  height: 100vh;
  overflow: hidden;
  z-index: 11;
}

/* Header image styles */
.header-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 10;
}

/* Header overlay styles */
.header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #fff;
  opacity: 1;
  transition: opacity 3s ease-in-out;
  z-index: 12;
}

.header-overlay.hide {
  opacity: 0;
}
 /* Header content styles */
.header-content {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 10;
  color: rgb(0, 0, 0);
  opacity: 0;
  transition: opacity 3s ease-in-out;
}
 .header-content.show {
  opacity: 1;
  transition-delay: 3s;
}
 /* Header title and subtitle styles */
.header-title {
  font-size: 4rem;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}
 .header-subtitle {
  font-size: 2rem;
  margin: 0;
}
 /* Content styles */
#content {
  margin-top: 0;
}
 /* Heading styles */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 1rem;
}
 h1 {
  color: #0076d6;
}
 /* Main styles */
main {
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
  z-index: 4;
}
 /* Chapter styles */
 .chapter {
  position: relative;
  width: calc(100% - 4rem);
  margin: 2rem auto;
  padding: 2rem;
  background-color: #f7f2e2;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  page-break-after: always;
  z-index: 9;
}
 .chapter h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}
 .chapter p {
  text-align: justify;
  text-indent: 1em;
  line-height: 1.8;
  font-size: 1.1rem;
}
/* Current chapter styles */
#currentChapter {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3rem;
  line-height: 3rem;
  padding: 0 1rem;
  background-color: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid #ddd;
  z-index: 9;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  text-align: center; /* Add this line to center the text */
}
#currentChapter.visible {
  opacity: 1;
  visibility: visible;
  z-index: 11;
}
 /* Paragraph styles */
 p {
  margin: 0 0 1rem;
}
/* Chapter Breaker Images */
.imagebetweenchapters {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 10;
}

.image-container {
  width: 100%;
  max-width: 320px;
  margin-bottom: 10px;
  z-index: 5;
}

.image-container img {
  display: block;
  width: 100%;
  height: auto;
  background: none;
  border-radius: 100%;
  z-index: 5;
}

.imagebetweenchapters figcaption {
  font-size: 14px;
  color: #666;
}
 /* Footer styles */
footer {
  width: 100%;
  padding: 1rem;
  background-color: #f0f0f0;
  text-align: center;
  border-top: 1px solid #ddd;
  margin-top: 2rem;
  z-index: 6;
  position: relative;
}
 footer p {
  font-size: 0.9rem;
  margin: 0;
  z-index: 6;
}
 footer a {
  color: #333;
  text-decoration: none;
  z-index: 6;
}
 footer a:hover {
  color: #0076d6;
  text-decoration: underline;
  z-index: 6;
}

#particles-js {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
}
#navbox {
  background-color: #f0f0f0;
  z-index: 10;
  position: relative;
}

#particlecountslider {
  position: relative;
  z-index: 10;
}

.slider-wrapper {
  position: fixed;
  left: 1rem;
  bottom: 14rem; /* Adjust this value to position the slider-wrapper above the back to top button */
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center; /* Add this to center-align the elements inside the slider-wrapper */
}


.slider-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 10px;
  position: relative;
}

.slider-container label {
  display: inline-block;
  padding: 0.5em 1em;
  border-radius: 25px;
  background-color: #007aff;
  color: #fff;
  font-size: 1.2em;
  font-weight: bold;
  text-align: center;
  margin-top: 1rem;
  cursor: pointer;
  box-shadow: 0 2px 2px rgba(0,0,0,0.2);
  transition: all 0.2s ease-in-out;
  z-index: 9;
}

.slider-container label:hover {
  background-color: #0066cc;
  box-shadow: 0 4px 4px rgba(0,0,0,0.4);
}

.slider-container input[type="range"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 0;
  height: 6px;
  background-color: #ddd;
  border-radius: 25px;
  outline: none;
  margin: 0;
  padding: 0;
  cursor: pointer;
  position: absolute;
  top: 0.7rem;
  left: 50%;
  transform: translate(-50%, 0%);
  z-index: 10;
  opacity: 0;
  transition: all 0.2s ease-in-out;
}

.slider-container.active input[type="range"] {
  width: 80%;
  opacity: 1;
}


.dark-mode-toggle {
  position: fixed;
  left: 1rem;
  bottom: 5rem;
  width: 40px;
  height: 40px;
  background-color: #0076d6;
  background-image: url('/files/sites/Book/Castlehaven/pictures/icons8-night-mode-96.png');
  background-size: cover;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: background-color 0.3s ease;
}
