/* styles.css */

:root {
  --primary-color: #8f0ce7; /* Warna utama berdasarkan karakter Keqing */
  --secondary-color: #b19cd9; /* Warna sekunder */
  --background-color: #ffffff; /* Warna latar belakang */
  --text-color: #333; /* Warna teks */
  --accent-color: #ffd700; /* Warna aksen */
  --light-blue: #add8e6; /* Warna biru muda */
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  cursor: url("../img/default.png"), auto;
}

a {
  text-decoration: none;
}

/* SweetAlert2 styling */
.swal2-popup {
  font-size: 1.2em;
}

.swal2-title {
  font-size: 1.5em;
}

.swal2-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.novel-author a {
  color: var(--primary-color);
}

.novel-author a:hover {
  color: var(--accent-color);
}

tbody td a:hover {
  text-decoration: underline;
}

h2 {
  text-align: center;
}

.hero img {
  max-width: 100%;
  width: 100px;
  border-radius: 10px;
  margin-top: -2.5rem;
}

.hero p {
  margin-top: -0.8rem;
  font-style: italic;
  font-weight: bold;
}

.hero {
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--accent-color)
  );
  color: #fff;
  padding: 3rem 1rem;
  text-align: center;
}

.hero button {
  background-color: var(--accent-color);
  border: none;
  padding: 0.5rem 1rem;
  margin-top: 1rem;
  cursor: url("../img/cursor.png"), auto;
  transition: background-color 0.3s;
}

.hero button:hover {
  background-color: var(--primary-color);
  color: #fff;
}

#main-content {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  background-color: var(--background-color);
  flex-direction: column;
}

.content-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 1rem;
  max-width: 1200px;
  width: 100%;
  padding: 1rem;
  border: 1px solid #fff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.novel-image {
  max-width: 70%;
  height: auto;
  border-radius: 10px;
}

.novel-details {
  flex: 1;
}

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

.novel-views,
.novel-genre {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.novel-author {
  font-weight: bold;
  font-style: italic;
}

.synopsis {
  padding: 2rem 2rem;
  background-color: var(--background-color);
  color: var(--text-color);
  text-align: left;
  margin-top: 2rem;
  border-radius: 10px;
}

.synopsis h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.synopsis p {
  font-size: 1.2rem;
  line-height: 1.6;
  max-height: 150px; /* Set the maximum height for the synopsis text */
  overflow: hidden;
  transition: max-height 0.3s ease;
}

td a {
  text-decoration: none;
}

.synopsis p.expanded {
  max-height: none;
}

#toggle-synopsis {
  margin-top: 10px;
  background-color: #6a0dad; /* Adjust according to your theme */
  color: white;
  border: none;
  padding: 8px 16px;
  cursor: url("../img/cursor.png"), auto;
  border-radius: 4px;
}

#toggle-synopsis:hover {
  background-color: #8a2be2; /* Adjust according to your theme */
}

/* Rating Section */
.rating-section {
  text-align: center;
  margin: 20px 0;
}

.rating-category {
  margin: 15px 0 0 15px;
}

.rating-category label {
  font-weight: bold;
  margin-right: 10px;
}

.baca-sekarang-button {
  background-color: var(--primary-color); /* Warna oranye terang */
  color: white; /* Warna teks putih */
  padding: 8px 10px; /* Padding untuk kenyamanan */
  border: none; /* Menghilangkan border */
  border-radius: 10px; /* Membuat sudut-sudut tombol melengkung */
  font-size: 16px; /* Ukuran teks */
  font-weight: bold; /* Teks tebal */
  cursor: url("../img/cursor.png"), auto; /* Mengubah kursor menjadi pointer */
  transition: background-color 0.3s ease; /* Efek transisi untuk perubahan warna */
}

.baca-sekarang-button:hover {
  background-color: var(
    --accent-color
  ); /* Warna oranye sedikit lebih gelap saat dihover */
}

.volumes-chapters {
  padding: 2rem 1rem;
  background-color: var(--background-color);
  color: var(--text-color);
  margin-top: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.volumes-chapters h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.volume-container {
  margin-bottom: 2rem;
}

.volume-container h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.volume-container table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.2); /* Transparent white background */
}

.volume-container th,
.volume-container td {
  border: 1px solid rgba(255, 255, 255, 0.5); /* Semi-transparent border */
  padding: 0.75rem;
  text-align: left;
  background: rgba(255, 255, 255, 0.1); /* Transparent background for cells */
}

.volume-container th {
  background-color: rgb(248, 247, 248); /* Semi-transparent primary color */
  color: var(--text-color);
}

.volume-container tr:nth-child(even) {
  background-color: rgba(
    255,
    255,
    255,
    0.05
  ); /* Slightly transparent background for even rows */
}

.volume-container tr:hover {
  background-color: rgba(
    177,
    156,
    231,
    0.6
  ); /* Semi-transparent hover effect */
  color: #fff;
}

#view-count {
  margin-right: 16px; /* Adjust the spacing as needed */
}

/* Container for pagination controls */
#pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}

#pagination-controls button {
  background-color: var(--primary-color);
  border: none;
  color: white;
  padding: 7px 15px;
  margin: 0 5px;
  border-radius: 5px;
  cursor: url("../img/cursor.png"), auto;
  font-size: 16px;
  transition: background-color 0.3s ease;
}

#pagination-controls button:hover {
  background-color: #811896;
}

#pagination-controls #page-number #page-nomor {
  font-size: 16px;
  margin: 0 10px;
}
/* End pagin */

.read-now-button {
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  margin-top: 1rem;
  cursor: url("../img/cursor.png"), auto;
  transition: background-color 0.3s;
  border-radius: 15px;
}

.read-now-button:hover {
  background-color: var(--accent-color);
}

.comments {
  padding: 2rem 1rem;
  background-color: var(--background-color);
  color: var(--text-color);
  margin-top: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Gaya umum untuk input username */
#comment-name {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 16px;
  background-color: #f5f5f5; /* Warna latar belakang yang menunjukkan bahwa input ini tidak bisa diedit */
  cursor: not-allowed; /* Menampilkan kursor yang menunjukkan bahwa input tidak dapat diubah */
}

.comment-header {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.comments h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.comment-form {
  margin: 20px 0;
}

.comment-form textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--text-color);
  border-radius: 5px;
  resize: vertical;
}

.comment-form button {
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  margin-top: 0.5rem;
  cursor: url("../img/cursor.png"), auto;
  transition: background-color 0.3s;
  border-radius: 5px;
}

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

.comments-list {
  margin-top: 20px;
}

.comment {
  background: rgba(255, 255, 255, 0.2); /* Transparent background */
  border: 1px solid rgba(255, 255, 255, 0.5); /* Semi-transparent border */
  padding: 0.5rem;
  border-radius: 5px;
  margin-bottom: 0.5rem;
}

/* Gaya responsif untuk elemen kontainer jika diperlukan */
.comment-form-container {
  display: flex;
  flex-direction: column;
  gap: 10px; /* Jarak antar elemen form */
  max-width: 600px; /* Lebar maksimum kontainer */
  margin: auto; /* Memusatkan kontainer pada halaman */
  padding: 20px;
}

/* Gaya untuk label dan tombol */
label,
button {
  font-size: 16px;
  margin-bottom: 10px;
}

.comment .author {
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.comment .date {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.comment p {
  margin-top: 0.25rem;
}

/* Centering Disqus container */
#disqus_thread {
  display: flex;
  justify-content: center;
  margin: 20px 0; /* Add some margin for spacing */
}

/* Make iframe responsive */
#disqus_thread iframe {
  width: 100%;
  max-width: 100%; /* Ensure it doesn't exceed container width */
  height: auto; /* Maintain aspect ratio */
  box-sizing: border-box;
}

footer {
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--accent-color)
  );
  color: #fff;
  padding: 2rem 1rem;
  text-align: center;
  font-weight: 700;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-logo h2 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.footer-links {
  margin-bottom: 1rem;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
  margin: 0 1rem;
  font-weight: bold;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--accent-color);
}

.footer-social {
  margin-bottom: 1rem;
}

.footer-social .social-icon {
  color: #fff;
  font-size: 1.5rem;
  margin: 0 0.5rem;
  transition: color 0.3s;
}

.footer-social .social-icon:hover {
  color: var(--accent-color);
}

.footer-bottom p {
  font-size: 0.8rem;
  margin: 0;
}

.footer-bottom a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: bold;
}

.footer-bottom .owner {
  color: #0f172a;
  text-decoration: none;
  font-weight: bold;
}

/* Scrollbar untuk seluruh halaman */
::-webkit-scrollbar {
  width: 12px; /* Lebar dari scrollbar */
}

/* Track dari scrollbar (area background dari scrollbar) */
::-webkit-scrollbar-track {
  background: var(
    --background-color
  ); /* Sesuaikan dengan background dari halaman */
  border-radius: 10px; /* Membuat sudutnya bulat */
}

/* Gaya thumb (bagian yang bisa digerakkan dari scrollbar) */
::-webkit-scrollbar-thumb {
  background-color: var(--primary-color); /* Warna thumb scrollbar */
  border-radius: 10px; /* Membuat sudutnya bulat */
  border: 2px solid var(--background-color); /* Beri border agar terlihat lebih rapi */
}

/* Warna scrollbar saat di-hover */
::-webkit-scrollbar-thumb:hover {
  background-color: var(--accent-color); /* Warna thumb saat di-hover */
}

/* Scrollbar untuk elemen spesifik, contoh untuk elemen dengan id #latest */
#latest::-webkit-scrollbar {
  width: 12px; /* Lebar scrollbar di dalam elemen ini */
}

#latest::-webkit-scrollbar-thumb {
  background-color: var(
    --secondary-color
  ); /* Thumb scrollbar di dalam elemen ini */
  border-radius: 10px;
}

/* Scroll-Up Button Styles */
.scroll-up {
  position: fixed;
  bottom: 10px;
  right: 20px;
  background-color: transparent;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: url("../img/cursor.png"), auto;
  transition: background-color 0.3s;
  padding: 0; /* Remove padding to fit GIF */
}

.scroll-up img {
  width: 100%;
  height: 100%;
  border-radius: 50%; /* Ensure the GIF fits within the circular button */
}

/* Responsive Design */
@media (max-width: 768px) {
  .content-container {
    flex-direction: column;
    text-align: center;
  }

  .circle {
    display: none;
  }

  .novel-image {
    width: 80%;
    margin: 0 auto;
  }

  .novel-title {
    font-size: 1.5rem;
  }

  .novel-views,
  .novel-genre,
  .novel-author {
    font-size: 0.875rem;
  }

  .synopsis {
    padding: 1.5rem 1rem;
  }

  .synopsis h2 {
    font-size: 1.5rem;
  }

  .synopsis p {
    font-size: 1rem;
    padding: 0 1rem;
  }

  .synopsis button {
    margin-left: 15px;
  }

  .volume-container table {
    font-size: 0.875rem;
  }

  .comment-form textarea {
    font-size: 0.875rem;
  }

  .comment-form button {
    font-size: 0.875rem;
  }

  .comment {
    font-size: 0.875rem;
  }

  #comment-name {
    font-size: 14px; /* Ukuran font lebih kecil untuk perangkat kecil */
    padding: 8px; /* Padding lebih kecil untuk menghemat ruang */
  }

  .comment-form-container {
    padding: 10px; /* Padding lebih kecil untuk perangkat kecil */
  }

  label,
  button {
    font-size: 14px; /* Ukuran font lebih kecil untuk perangkat kecil */
  }

  #disqus_thread {
    margin: 10px 0;
  }
}

@media (max-width: 600px) {
  .swal2-popup {
    width: 90%;
  }
}

@media (max-width: 480px) {
  .navbar-container {
    flex-direction: column;
  }

  .circle {
    display: none;
  }

  .navbar-menu {
    flex-direction: column;
    gap: 0.5rem;
  }

  .content-container {
    padding: 1rem;
    gap: 1rem;
  }

  .novel-title {
    font-size: 1.25rem;
  }

  .novel-views,
  .novel-genre,
  .novel-author {
    font-size: 0.75rem;
  }

  .synopsis {
    padding: 1rem 0.5rem;
  }

  .synopsis h2 {
    font-size: 1rem;
  }

  .synopsis p {
    font-size: 0.75rem;
  }

  .volume-container table {
    font-size: 0.75rem;
  }

  .volume-container th,
  .volume-container td {
    padding: 0.5rem;
  }
}
