:root {
  /* Base Colors */
  --bg-color: #121212; /* Dark background */
  --div-color: #1e1e1e; /* Slightly lighter than bg for contrast */
  --card-color: #252525; /* For cards/containers */
  --border-color: #3a3a3a; /* Subtle borders */

  /* Text Colors */
  --text-color: #ffffff; /* Pure white for primary text */
  --sub-text-color: #b3b3b3; /* Light gray for secondary text */
  --accent-text: #c198e1; /* Soft purple for highlights */

  /* Primary Accent (Your Purple) */
  --primary: #6507b8; /* Main brand purple */
  --primary-hover: #7e3ac2; /* Brighter purple on hover */
  --primary-light: #8a5acd; /* Lighter purple for accents */

  /* Buttons & CTAs */
  --button-color: #6507b8; /* Your main button color */
  --button-hover: #7e3ac2; /* Slightly brighter on hover */
  --button-text: #ffffff; /* White text on buttons */
}

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

body {
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: "Roboto", sans-serif;
  position: relative;
}

body::-webkit-scrollbar {
  display: none;
}

#navbar {
  width: 100%;
  height: 4rem;
  z-index: 95;
  background-color: var(--div-color); /* Added for better visibility */
  position: sticky;
  top: 0;
}

#nav-container {
  width: 100%;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.nav-logo {
  height: 3rem;
  width: auto;
  object-fit: contain;
  display: none;
}

.nav-btn-cont {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-button {
  display: flex;
  align-items: center;
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.4rem; /* Smaller font for mobile */
  font-weight: 800;
  padding: 0.5rem;
  text-decoration: none;
}

.body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.book-category {
  width: 100%;
  height: fit-content;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  box-sizing: border-box;
  padding: 2rem;
  gap: 1rem;
}

.darkH1 {
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.content-container {
  width: 100%;
  text-align: center;
}

.media-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.novel-title {
  margin: 0 auto;
  font-size: 2.5rem;
  font-weight: 800;
}

.novel-chapter-title {
  margin: 0 auto;
  font-size: 1.5rem;
  font-weight: 800;
}

.novel-content {
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
  font-size: 1rem;
  color: var(--sub-text-color);
  line-height: 1.7;
  text-align: left;
  text-indent: 50px;
}

.novelImage {
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  margin-top: 25px;
  margin-bottom: 25px;
}

.author-image {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  vertical-align: middle;
  margin-right: 10px;
}

.author {
  margin-top: 25px;
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 800;
}

.slide {
  width: 50%;
  height: 100%;
}

.slide img {
  max-width: 100%;
  height: auto;
}

a:link,
:visited {
  color: var(--text-color);
}

.page-buttons {
  width: 100%;
  margin: 0 auto;
  padding: 25px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  gap: 5px;
}

.page-button {
  border-radius: 50px;
  border: none;
  background: var(--button-color);
  color: var(--button-text);
  font-size: 1.5rem;
  padding: 10px 25px;
  transition: 1s;
}

.page-button:hover {
  background-color: var(--button-hover);
}

.reaction {
  text-align: center;
  padding: 8px;
  margin: 25px;
  color: var(--sub-text-color);
  background-color: transparent;
  border: 1px solid transparent;
  transition: 0.5s;
}

.reaction i {
  font-size: 2rem;
}

.reaction-count {
  font-size: 2rem;
  margin-left: 5px;
}

.pnButtons {
  border-radius: 5%;
  border: none;
  background-color: transparent;
  color: var(--button-color);
  font-size: 3rem;
  transition: 1s;
}

.reaction:hover,
.pnButtons:hover {
  transform: translateY(-5px);
}

.book-display-container {
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.book-display-info {
  padding: 0 1rem;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  /* align-items: center; */
  /* justify-content: center; */
  /* text-align: center; */
}

.book-display-image {
  width: 60%;
  border-radius: 5px;
  margin: 25px;
}

.book-display-tittle {
  font-size: 1.5rem;
  font-weight: 800;
}

.book-display-description {
  font-size: 1rem;
  color: var(--sub-text-color);
  line-height: 1.7;
}

.tags-container {
  width: 100%;
  /* padding: 0 25px; */
  margin: 25px auto;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 5px;
  /* justify-content: center; */
}

/* Tag button styling */
.tag-button {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 5px;
  background-color: var(--button-color);
  color: var(--button-color);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
}

.tag-button:hover {
  background-color: var(--button-hover);
}

.book-display-stats {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 5px;
  /* margin-bottom: 20px; */
  margin-top: 20px;
}

.book-author-info {
  font-size: 1rem;
  color: var(--sub-text-color);
}

.book-display-buttons {
  width: 100%;
  display: flex;
  gap: 25px;
}

.book-button {
  background-color: transparent;
  color: var(--button-color);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 2rem;
  font-weight: 800;
  padding: 10px 15px;
}

.chapter-row-container {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px 15px;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
}

.chapter-row {
  margin-top: 25px;
  width: 100%;
  display: flex;
  align-items: center; /* Vertically centers content */
  padding: 8px 10px; /* Better padding */
  gap: 1.5rem; /* More spacing between left & right */
  box-sizing: border-box; /* Ensures padding doesn't affect width */
  background-color: transparent;
  border-radius: 4px; /* Optional: Soft rounded corners */
}

.chapter-row-info {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.chapter-row-name {
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  overflow-wrap: break-word;
  color: var(--sub-text-color);
}

.chapter-row-left {
  min-width: 0; /* Prevents flex overflow issues */
  overflow-wrap: break-word;
  font-size: 1rem;
  font-weight: bold;
  color: var(--sub-text-color);
}

.chapter-row-right {
  min-width: 0; /* Prevents flex overflow issues */
  display: flex;
  justify-content: flex-end; /* Aligns content to the right */
  gap: 1rem; /* Adds spacing between right-side elements */
  color: var(--sub-text-color);
}

/* Book thumbnail - improved styling */
.chapter-row-thumbnail {
  width: 5rem;
  height: 100px;
  object-fit: cover;
  border-radius: 4px; /* Soft rounded corners */
}

.books-cont {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  gap: 2rem;
  width: 100%;
  max-width: 1200px;
  height: fit-content;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1rem;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.book {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 10px;
}

.book-thumbnail {
  position: relative;
  text-align: center;
  color: white;
  width: 200px;
  height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.book-thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
}

.book-title {
  position: absolute;
  bottom: 3rem;
  /* Moves it up slightly */
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.4rem;
  font-weight: 800;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
  padding: 8px 10px;
  border-radius: 4px;
  max-width: 90%;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.views-count {
  position: absolute;
  bottom: 0.5rem;
  /* Positions at bottom */
  left: 50%;
  transform: translateX(-50%);
  font-size: 1rem;
  font-weight: bold;
  color: var(--sub-text-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  padding: 3px 8px;
  max-width: 80%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.title-container {
  display: flex;
  width: 100%;
}

/* Arrow icon link positioned to the right */
.arrow-link {
  color: var(--text-color);
  font-size: 1.5rem;
  text-decoration: none;
  margin-left: auto;
  padding-left: 10px;
}

.social-media-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 25px;
  /* Adjusts the space between icons and the category title */
}

.social-media-icons a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin: 0 10px;
  width: 25%;
  text-decoration: none;
  /* Remove underline */
}

.social-icon {
  width: 100%;
  height: auto;
  /* Maintain aspect ratio */
}

.text-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 20px;
}

.text-content ul {
  list-style-type: none;
  padding: 0;
  margin: 20px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.text-content ul li {
  font-size: 1.1em;
  margin: 10px 20px;
  display: flex;
  align-items: center;
}

.text-content ul li i {
  margin-right: 10px;
  font-size: 1.5em;
}

.footer {
  width: 100%;
  padding: 20px 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg-color);
  z-index: 100;
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: #2196f3;
}

input:focus + .slider {
  box-shadow: 0 0 1px #2196f3;
}

input:checked + .slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.context-menu {
  position: absolute;
  background-color: #444;
  border-radius: 5px;
  padding: 8px;
  display: none;
  z-index: 1000;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

.context-menu button {
  background: none;
  color: #ff5555;
  border: none;
  padding: 5px 10px;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.context-menu button:hover {
  background-color: #555;
}

/* Modal CSS */
.modal {
  display: none;
  position: fixed;
  z-index: 1050;
  /* Ensure this is higher than the navigation bar */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  padding-top: 50px;
  /* Add some space from the top */
}

.modal-content {
  color: #fff;
  position: relative;
  margin: auto;
  padding: 20px;
  width: 80%;
  max-width: 600px;
  background-color: #2b3035ff;
  border-radius: 10px;
  /* Add some border-radius for better look */
  box-sizing: border-box;
  max-height: calc(100vh - 100px);
  /* Ensure it fits within the viewport */
  overflow-y: auto;
  /* Enable scrolling if content overflows */
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
}

.modal-body {
  padding: 20px 0;
  overflow-y: auto;
  /* Enable scrolling for the modal body */
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #ddd;
  padding-top: 10px;
}

.profile-container {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.profile-banner {
  width: 100%;
  height: 200px;
  object-fit: cover;
  cursor: pointer;
}

.profile-info {
  width: 100%;
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
  position: relative;
  padding-top: 75px;
}

.profile-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 3px solid black;
  cursor: pointer;
  position: absolute;
  top: -90px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.username {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-color);
}

.bio {
  color: var(--sub-text-color);
  margin: 10px 0;
}

.stats-row {
  display: flex;
  flex-direction: row;
  gap: 20px;
  margin: 10px 0;
}

.stat-block {
  cursor: pointer;
  font-size: 10px;
  color: var(--sub-text-color);
}

.stat-block b {
  font-size: 15px;
  color: var(--text-color);
}

.right-row {
  display: flex;
  flex-direction: column;
  margin: 25 0;
}

.user-role {
  font-size: 15px;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
}

.profile-button {
  font-weight: bold;
  padding: 10px 20px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  background-color: var(--button-color);
  border: #444 solid 2px;
}

.report {
  background: transparent;
  color: red;
}

.follow,
.edit-profile,
.edit-web {
  background: transparent;
  color: var(--text-color);
}

.additional-info {
  width: 100%;
  display: flex;
  justify-content: center;
  font-size: 12px;
  /* Small font size */
}

.info-item {
  margin-right: 20px;
  /* Spacing between items */
}

.info-label {
  font-weight: bolder;
}

.info-value {
  font-size: 12px;
  margin-top: 2px;
}

/* For Cropper */
.crop-container {
  text-align: center;
}

.cropper-image {
  max-width: 100%;
}

.bottom-section {
  width: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.comments-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.comment-text-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  border: 3px solid var(--button-color);
  margin-bottom: 25px;
}

.textarea-comment {
  padding: 5px;
  background-color: transparent;
  color: var(--sub-text-color);
  width: 100%;
  height: 7rem;
  border: none;
  resize: none;
  outline: none;
}

.post-comment {
  font-weight: bold;
  padding: 10px 20px;
  margin: 5px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 10px;
  color: var(--sub-text-color);
  background-color: var(--button-color);
  border: #444 solid 2px;
}

.post-comment:hover {
  background-color: var(--button-hover);
}

.comments {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.comment-box {
  width: 100%;
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.comment-avatar {
  width: 100px;
  height: 100px;
  border-radius: 8px;
}

.commenter-container {
  display: flex;
  flex-direction: column;
  padding: 10px;
}

.comment-username {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-color);
}

.comment {
  font-size: 14px;
  color: var(--sub-text-color);
}

.suggestions-container {
  width: 100%;
  display: grid;
  gap: 25px;
  grid-template-columns: 1fr 1fr; /* This creates two equal-width columns */
}

.suggestion {
  width: 100%;
  height: auto;
}

.modalNew {
  display: none;
  position: fixed;
  z-index: 99;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content-new {
  background-color: var(--button-color);
  margin: 15% auto;
  padding: 30px;
  border: 4px solid var(--sub-text-color);
  border-radius: 8px;
  width: 80%;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.modal-content-new label {
  margin-top: 15px;
  margin-bottom: 5px;
}

.modal-content-new select {
  width: 100%;
  padding: 10px 20px;
  margin: 8px 0;
  box-sizing: border-box;
}

.modalInputText {
  width: 100%;
  padding: 10px 20px;
  margin: 8px 0;
  box-sizing: border-box;
}

.colorInput {
  margin: 8px 0;
}

.modal-buttons-container {
  display: flex;
  flex-direction: row;
  gap: 5px;
  margin-top: 30px;
}

.modal-buttons-container button {
  font-weight: bold;
  padding: 5px 15px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  background-color: var(--button-color);
  color: var(--sub-text-color);
  border: #444 solid 2px;
}

.ad-div {
  margin: 0 auto;
  display: flex;
  align-items: center;
}

@media (min-width: 768px) {
  .nav-button {
    font-size: 2.5rem;
  }

  #nav-home {
    display: none;
  }

  .nav-logo {
    height: 3rem;
    width: auto;
    object-fit: contain;
    display: block;
  }

  .body {
    box-sizing: border-box;
    margin: 0 auto;
    width: 50%;
    height: 100%;
  }

  .darkH1 {
    font-size: 2rem;
  }

  .novel-content {
    max-width: 700px;
    margin: 0 auto;
  }

  .page-buttons {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    flex-direction: row;
    padding: 25px;
    gap: 5px;
  }

  .chapter-row-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .book-thumbnail {
    width: 13rem;
    height: 18rem;
  }

  .book-display-container {
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
  }

  .book-display-image {
    width: 25%;
    border-radius: 5px;
    margin: 25px;
  }

  .book-display-description {
    width: 50rem;
  }

  #chapters {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 50px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
  }

  .text-content {
    margin-top: 6rem;
    padding: 0 15rem;
  }

  #slider-dark-mode {
    margin-left: 75%;
  }

  .profile-container {
    width: 50%;
    height: 25rem;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    position: relative; /* Added */
  }

  .profile-banner {
    width: 100%;
    height: 200px;
    object-fit: cover;
  }

  .profile-info {
    width: 100%;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: row;
    padding: 20px; /* Added padding */
    align-items: flex-start; /* Changed from default center */
    position: relative; /* Added */
  }

  .profile-avatar {
    width: 100px; /* Slightly larger for desktop */
    height: 100px;
    border-radius: 50%;
    border: 4px solid white;
    background-color: #ddd;
    position: relative; /* Changed back to relative */
    top: 0;
    left: 0;
    transform: none;
    margin-right: 20px; /* Space between avatar and user info */
  }

  .user-info {
    display: flex;
    flex-direction: column;
    text-align: left;
  }

  .right-row {
    display: flex;
    flex-direction: row;
    gap: 10px; /* Added gap between buttons */
    align-items: center; /* Center vertically */
    margin-left: auto; /* Push to the right */
  }

  .user-role {
    font-size: 15px;
    font-weight: bold;
  }

  .bottom-section {
    margin-top: 30px;
    flex-direction: row;
  }

  .textarea-comment {
    width: 85%;
    height: 3rem;
  }

  .modal-content-new {
    width: 35%;
  }
}

/* toast */
/* Toast container to stack multiple toasts */
#toast-container {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  /* Space between toasts */
}

.toast {
  min-width: 280px;
  text-align: center;
  border-radius: 20px;
  /* More rounded for a cute look */
  padding: 20px;
  font-size: 20px;
  background-color: #333;
  color: #fff;
  box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.15);
  /* Soft shadow for a pop-up effect */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  /* Space between icon and text */
  opacity: 0;
}

.toast.show {
  opacity: 1;
  -webkit-animation: bouncein 0.7s, fadeout 0.5s 4.5s;
  animation: bouncein 0.7s, fadeout 0.5s 4.5s;
}

.toast.default {
  background-color: #ffcccc;
}

.toast.red {
  background-color: #ff7979;
}

.toast.green {
  background-color: #7ed6df;
}

.toast.blue {
  background-color: #74b9ff;
}

.toast.pink {
  background-color: #ffcccc;
}

/* Bounce animation only affects vertical movement */
@keyframes bouncein {
  0% {
    transform: translateY(50px);
    opacity: 0;
  }

  50% {
    transform: translateY(-10px);
    opacity: 1;
  }

  100% {
    transform: translateY(0);
  }
}

@keyframes fadeout {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}
