html {
  scrollbar-width: thin; /* Makes the scrollbar thin */
  scrollbar-color: darkgrey #f1f1f1; /* Handle color and track color */
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: white;
  color: black;
  transition: background-color 0.3s, color 0.3s;
}

.dark-mode {
  background-color: #333;
  color: #ddd;
}

.top-bar {
  background-color: #f4f4f4;
  padding: 5px;
  margin: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ccc;
  height: 60px;
}

.footer {
  background-color: #f4f4f4;
  padding: 10px;
  margin: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 5px solid #ccc;
  color: #000;
}

.container {
  display: flex;
  height: 85vh;
}

.sidebar {
  width: 25%;
  height: 100%;

  border-right: 1px solid #ccc;
  padding: 10px;
  margin: 10px;
  box-sizing: border-box;
  overflow-y: auto;
  transition: transform 0.3s ease-in-out;
  scrollbar-width: thin; /* Makes the scrollbar thin */
  scrollbar-color: darkgrey #f1f1f1; /* Handle color and track color */
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

/* General styles remain the same */

.sidebar li {
  padding: 10px;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  align-items: center;
  width: 100%;
}

/* Default state */
.sidebar li.active {
  color: #007bff;
  font-weight: bold;
}

.chapter-separator {
  border: none;
  border-top: 1px solid #ccc;
  margin: 10px 0;
}

.dark-mode .chapter-separator {
  border-top: 1px solid #666;
}

/* Dark mode active state */
.dark-mode .sidebar li.active {
  background-color: #666;
  color: #1e90ff;
}

.area {
  width: 80%;
  overflow: auto;
}
.content {
  width: 90%;

  padding: 20px;
  margin: 10px;
  box-sizing: border-box;
  overflow-y: auto;
  scrollbar-width: thin; /* Makes the scrollbar thin */
  scrollbar-color: darkgrey #f1f1f1; /* Handle color and track color */

  margin: 0 auto;
  background-color: white;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.dark-mode .top-bar {
  background-color: #444;
  border-bottom: 1px solid #666;
}

.dark-mode .sidebar {
  background-color: #555;
  border-right: 1px solid #666;
}

.dark-mode .sidebar li:hover {
  background-color: #666;
}

.dark-mode .sidebar li.active {
  color: #1e90ff;
}

.dark-mode .content {
  background-color: #444;
}

button {
  padding: 5px 10px;
  cursor: pointer;
}

/* From Uiverse.io by ke1221 */
.check {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 2px;
  appearance: none;
  background-color: #bbb;
  transition: all 0.3s;
}

.check::before {
  content: "";
  position: absolute;
  border: solid #fff;
  display: block;
  width: 0.3em;
  height: 0.6em;
  border-width: 0 0.2em 0.2em 0;
  z-index: 1;
  opacity: 0;
  right: calc(50% - 0.3em);
  top: calc(50% - 0.6em);
  transform: rotate(0deg);
  transition: all 0.3s;
  transform-origin: center center;
}

.check:checked {
  animation: a 0.3s ease-in forwards;
  background-color: rgb(120, 190, 120);
}

.check:checked::before {
  opacity: 1;
  transform: rotate(405deg);
}

@keyframes a {
  0% {
    opacity: 1;
    transform: scale(1) rotateY(0deg);
  }

  50% {
    opacity: 0;
    transform: scale(0.8) rotateY(180deg);
  }

  100% {
    opacity: 1;
    transform: scale(1) rotateY(360deg);
  }
}

/* Menu button for mobile view */
.menu-button {
  font-size: 24px;
  cursor: pointer;
  display: none;
}

/* Responsive styles786 */
@media screen and (max-width: 1024px) {
  .sidebar {
    width: 90%;
    transform: translateX(-120%);
    position: absolute;
  }

  .content {
    margin-left: 0;
  }

  .menu-button {
    display: block;
  }

  .sidebar.active {
    transform: translateX(0);
  }
}
.subDiv {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.8s ease, opacity 0.8s ease;
}
.subDiv.visible {
  max-height: 500px; /* Adjust this value based on the expected maximum height of your content */
  opacity: 1;
  padding: 0px 20px;
}
.chapter-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.sdiv {
  display: flex;
  justify-items: center;
}
.dropdown {
  cursor: pointer;
  align-self: center;
  font-size: 25px;
}
.divbox {
  display: flex;
  justify-content: end;
}
