/* ... (existing CSS remains unchanged) ... */

/* --- CSS Variables --- */
:root {
  /* Light Mode Variables */
  --bg-primary: #f8f7f3;
  --bg-secondary: #f4f1e8;
  --bg-input: #ffffff;
  --bg-popup: #ffffff;
  --bg-card: #fbcfe8;
  --bg-icon-hover: #dee8fc;

  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-tertiary: #9ca3af;
  --text-accent: #ef4444;
  --text-inverted: #ffffff;
  --text-summary: #000000;

  --btn-primary-bg: #1f2937;
  --btn-primary-text: #ffffff;
  --btn-primary-hover-bg: #dc2626;

  --border-default: #e5e7eb;
  --border-light: #f3f4f6;
  --border-focus: #fca5a5;
  --border-hover: #afafaf;

  --shadow-card: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-sidebar: 0 4px 6px rgba(0, 0, 0, 0.2);
  --shadow-popup: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Dark Mode Variables */
body.dark-mode {
  --bg-primary: #1f2937;
  --bg-secondary: #111827;
  --bg-input: #374151;
  --bg-popup: #2d3748;
  --bg-card: #4a5568;
  --bg-icon-hover: #4a5568;

  --text-primary: #f8f7f3;
  --text-secondary: #9ca3af;
  --text-tertiary: #d1d5db;
  --text-accent: #f87171;
  --text-inverted: #1f2937;
  --text-summary: #e5e7eb;

  --btn-primary-bg: #f8f7f3;
  --btn-primary-text: #1f2937;
  --btn-primary-hover-bg: #f87171;

  --border-default: #4a5568;
  --border-light: #2d3748;
  --border-focus: #f87171;
  --border-hover: #718096;

  --shadow-card: 0 10px 15px rgba(0, 0, 0, 0.3);
  --shadow-sidebar: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-popup: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ... (existing CSS continues) ... */

.book {
  display: flex;
}

.book-card {
  margin-right: 30px;
}

.book-details {
  width: 70%;
  margin-top: -30px;
  text-align: left;
  /* border: 1px solid; */
}

.book-title {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.book-details p {
  color: var(--text-summary);
  font-size: 1.125rem;
  font-weight: 800;
  text-align: left;
}

.book-details .description em {
  font-style: italic;
  color: var(--text-accent);
  font-weight: 800;
}

.bookmark-btn {
  display: flex;
}

.bookmark {
  background-color: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  padding: 0.5rem 1rem;
  height: 40px;
  margin-top: 10px;
  border-radius: 9999px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  margin-right: 30px;
}

.bookmark:hover {
  background-color: var(--btn-primary-hover-bg);
}

.bookmark-btn p {
  color: var(--text-summary);
  font-size: 1.125rem;
  font-weight: 800;
  text-align: left;
}

.bookmark-btn span {
  color: var(--text-accent);
  font-weight: 800;
  cursor: pointer;
}

.chapters {
  margin-top: 50px;
}

.chapter-list li {
  list-style: none;
  margin-bottom: 0.5rem;
  padding: 0.5rem 0;
  transition: background-color 0.3s ease;
}

.chapter-list li:last-child {
  border: none;
}

.chapter-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
}

.chapter-list a {
  display: block;
  text-decoration: none;
  background-color: var(--card-bg);
  color: var(--text-color);
  padding: 1rem 0.5rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 800;
  border: 1px solid var(--border-default);
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.chapter-list a:hover {
  background-color: var(--text-accent);
  color: #ffffff;
  font-weight: 800;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.comments {
  margin-top: 50px;
  margin-bottom: 100px;
}

.comments h2 {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  font-size: 2rem;
  font-weight: 600;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.comment-form textarea {
  width: 90%;
  padding: 1rem;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  background-color: var(--bg-input);
  color: var(--text-primary);
  resize: vertical;
  min-height: 80px;
  box-shadow: 0 4px 4px  rgba(0, 0, 0, 0.1);
}

.comment-form textarea::placeholder {
  color: var(--text-secondary);
}

.comment-form textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.comment-form button {
  align-self: flex-end;
  background-color: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.1);
}

.comment-form button:hover {
  background-color: var(--btn-primary-hover-bg);
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.comment-item {
  background-color: var(--bg-secondary);
  padding: 1.2rem;
  border-radius: 8px;
  border: 1px solid var(--border-default);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.comment-item:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.comment-author {
  font-weight: 600;
  color: var(--text-primary);
}

.comment-text {
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.comment-actions {
  display: flex;
  gap: 1rem;
}

.comment-actions button {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.3s ease;
}

.comment-actions button:hover {
  color: var(--text-accent);
  transition: color 0.3s ease;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .book {
    flex-direction: column;
    align-items: center;
  }

  .book-card {
    margin-right: 0;
    margin-bottom: 2rem;
  }

  .book-details {
    width: 90%;
    text-align: center;
  }

  .book-title {
    font-size: 2rem;
  }

  .book-details p {
    font-size: 1rem;
  }

  .book-actions {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .book-card {
    width: 250px;
    height: 375px;
  }

  .book-title {
    font-size: 1.8rem;
  }

  .book-details p {
    font-size: 0.9rem;
  }

  .bookmark,
  .read-button {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
}

@media screen and (max-width: 480px) {
  /* * {
    overflow-x: hidden;
    overflow-y: auto;
  } */

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

  .book-details {
    width: 100%;
    text-align: center;
  }

  .book-title {
    margin-top: 50px;
    font-size: 2rem;
  }

  .book-details p {
    font-size: 1rem;
    text-align: center;
  }

  .book-card {
    margin-top: 10px;
    /* margin-left: 25px; */
    width: 250px;
    height: 350px;
  }

  .profile-notifications {
    height: 45px;
  }

  .profile-notifications .profile-info {
    position: absolute;
    top: 0;
    right: 40px;
  }

  .bookmark-btn {
    align-items: center;
    text-align: center;
    justify-content: center;
  }

  .bookmark {
    padding: 0.3rem 1rem;
    height: 35px;
    margin-top: 0px;
  }

  .chapters {
    margin-top: -170px;
    /* margin-bottom: 100px; */
  }

  .chapters h2 {
    text-align: center;
  }
}