:root {
  --primary-blue: #22a7f0;
  --bg-dark: #111;
  --card-bg: #1c1c1c;
  --text-main: #ffffff;
  --text-muted: #aaa;
  --font-primary: "Josefin Sans", sans-serif;
  --font-secondary: "Quicksand", sans-serif;
  --radius: 10px;
}

* {
  font-family: "Josefin Sans", sans-serif !important;
}

/* --- GLOBAL STYLES --- */
body {
  font-family: "Josefin Sans", sans-serif !important;
  background-color: var(--bg-dark);
  color: var(--text-muted);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* 4. Heading */
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  font-family: "Josefin Sans", sans-serif !important;
  color: var(--text-main);
  font-weight: 700;
}

a {
  color: var(--text-main);
  transition: 0.3s;
  text-decoration: none !important;
}
a:hover {
  color: var(--primary-blue);
}

.custom-container {
  max-width: 930px;
  margin: 0 auto;
  padding: 0 15px;
  width: 100%;
}

/* --- BACKGROUND ANIMATION --- */
.stars-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: #111;
  overflow: hidden;
  pointer-events: none;
}
.stars {
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
      white,
      rgba(255, 255, 255, 0.2) 2px,
      transparent 3px
    ),
    radial-gradient(white, rgba(255, 255, 255, 0.15) 1px, transparent 2px),
    radial-gradient(white, rgba(255, 255, 255, 0.1) 2px, transparent 3px);
  background-size: 550px 550px, 350px 350px, 250px 250px;
  animation: starMove 100s linear infinite;
}
@keyframes starMove {
  from {
    background-position: 0 0, 40px 60px, 130px 270px;
  }
  to {
    background-position: 550px 550px, 390px 410px, 380px 520px;
  }
}

/* --- HEADER --- */
.site-header {
  padding: 20px 0;
  margin-bottom: 20px;
}
.nav-link {
  font-size: 1rem;
  font-weight: 600;
  margin-left: 15px;
  color: var(--text-main) !important;
}
.nav-link:hover {
  color: var(--primary-blue) !important;
}

/* --- INDEX PAGE STYLES --- */
.manga-cover {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  margin-bottom: 15px;
  max-width: 235px;
  display: block;
}
@media (max-width: 768px) {
  .manga-cover {
    margin: 0 auto 20px;
  }
}

.rating-stars {
  color: #ffc900;
  font-size: 1.2rem;
  text-align: center;
  margin-bottom: 15px;
  letter-spacing: 5px;
}

.info-box {
  background-color: rgba(41, 41, 41, 0.8);
  padding: 15px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 15px;
}
.info-box p {
  margin-bottom: 8px;
  color: #d6d6d6;
  font-size: 0.85rem;
}
.info-box span {
  color: #fff;
  font-weight: 600;
  margin-left: 5px;
}

.btn-support {
  background-color: #0074b3;
  color: white;
  font-weight: 700;
  width: 100%;
  border-radius: 6px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  font-family: "Quicksand", sans-serif;
}
.btn-support:hover {
  background-color: #008cc9;
  color: white;
  opacity: 0.9;
}

.content-card {
  background-color: rgba(41, 41, 41, 0.8);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.manga-title {
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0;
  color: #fff;
  line-height: 1.2;
}
.manga-subtitle {
  font-size: 1.2rem;
  color: #aaa;
  margin-bottom: 15px;
  font-weight: 400;
}

/* Genre Buttons */
.genre-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 1.5em;
}
.genre-item {
  background-color: #1c1c1c;
  border-bottom: 2px solid var(--primary-blue);
  border-radius: 10px;
  color: #fff;
  padding: 5px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: 0.2s;
  font-weight: 500;
}
.genre-item:hover {
  filter: brightness(1.2);
}

.synopsis-title {
  font-size: 1.3rem;
  margin-bottom: 10px;
  font-weight: 700;
  color: #fff;
}
.synopsis-text {
  line-height: 1.6;
  font-size: 1rem;
  color: #f1f1f1;
}

/* Chapter List Components */
.chapter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--primary-blue);
  padding-bottom: 10px;
  margin-bottom: 20px;
  margin-top: 0;
}
.chapter-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: #f1f1f1;
}

.btn-sort {
  background: var(--primary-blue);
  border: none;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 5px #1c1c1c;
}

.quick-nav {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}
.nav-box {
  flex: 1;
  background-color: #1c1c1c;
  padding: 10px 0;
  text-align: center;
  border-radius: 10px;
  transition: 0.5s;
  display: block;
}
.nav-box:hover {
  background-color: var(--primary-blue);
}
.nav-box span {
  display: block;
  font-size: 0.8rem;
  color: #aaa;
  margin-bottom: 2px;
}
.nav-box strong {
  font-size: 1.2rem;
  color: #f1f1f1;
  font-weight: 700;
}

.search-box {
  width: 100%;
  background: #1c1c1c;
  border: none;
  border-bottom: 2px solid var(--primary-blue);
  padding: 10px 15px;
  border-radius: 10px;
  color: #f1f1f1;
  margin-bottom: 15px;
}
.search-box:focus {
  outline: none;
}

.chapter-list-container {
  max-height: 500px;
  overflow-y: auto;
  padding: 10px;
  background-color: #1c1c1c;
  border-radius: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-blue) #232e33;
}
.chapter-list-container::-webkit-scrollbar {
  width: 10px;
}
.chapter-list-container::-webkit-scrollbar-track {
  background: #232e33;
  border-radius: 6px;
}
.chapter-list-container::-webkit-scrollbar-thumb {
  background: var(--primary-blue);
  border-radius: 6px;
}

.chapter-item {
  background-color: #1c1c1c;
  padding: 5px 15px;
  margin: 5px 0;
  border: 1px solid #464646;
  border-radius: 10px;
  display: block;
  transition: 0.2s;
}
.chapter-item:hover {
  background-color: #292929;
}
.chapter-name {
  font-weight: 400;
  font-size: 1.2rem;
  color: #f1f1f1;
  display: block;
}
.chapter-date {
  font-size: 0.7rem;
  color: #aaa;
}
.chapter-item.active-chapter {
  border-right: 4px solid var(--primary-blue);
}

/* --- READ PAGE SPECIFIC STYLES --- */
h1.chapter-title {
  color: #fff;
  font-size: 1.8rem;
  margin-bottom: 20px;
  font-weight: 400;
}

.social-share {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.btn-social {
  color: #fff;
  border-radius: 4px;
  padding: 5px 15px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
  border: none;
  font-weight: 600;
}
.btn-fb {
  background-color: #3b5998;
}
.btn-tw {
  background-color: #000;
  border: 1px solid #333;
}
.btn-wa {
  background-color: #25d366;
}
.btn-pin {
  background-color: #cb2027;
}
.btn-social:hover {
  opacity: 0.9;
  color: #fff;
}

.breadcrumb-custom {
  background-color: #1c1c1c;
  padding: 10px 15px;
  border-radius: 5px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}
.breadcrumb-custom a {
  color: var(--primary-blue);
}
.breadcrumb-custom span {
  color: #aaa;
}

.control-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 10px;
}

.chapter-select-wrapper {
  flex-grow: 1;
  position: relative;
}
.chapter-select {
  width: 100%;
  background-color: #333;
  color: #fff;
  border: none;
  border-bottom: 2px solid var(--primary-blue);
  padding: 10px 15px;
  border-radius: 5px;
  appearance: none;
  cursor: pointer;
  font-family: "Josefin Sans", sans-serif;
}
.chapter-select:focus {
  outline: none;
  background-color: #444;
}
.chapter-select-wrapper::after {
  content: "▼";
  font-size: 0.8rem;
  color: #fff;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.btn-control {
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: 0.2s;
}
.btn-bug {
  background-color: #dc3545;
}
.btn-bug:hover {
  background-color: #c82333;
}
.btn-next {
  background-color: #333;
}
.btn-next:hover {
  background-color: var(--primary-blue);
}

#reader-area {
  text-align: center;
  margin-bottom: 20px;
  min-height: 500px;
}
.manga-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: brightness(100%) saturate(100%);
}

.tags-box {
  background-color: #1a1a1a;
  padding: 15px;
  border-radius: 5px;
  font-size: 0.8rem;
  color: #777;
  margin-top: 20px;
  line-height: 1.6;
  border-top: 1px solid #333;
}
.tags-box strong {
  color: #999;
}

/* --- FOOTER --- */
.footer-bottom {
  background: linear-gradient(180deg, transparent, rgba(34, 167, 240, 0.2));
  border-bottom: 4px solid var(--primary-blue);
  padding: 30px 0;
  text-align: center;
  margin-top: auto;
}
.footer-links a {
  color: #999;
  margin: 0 5px;
  font-size: 14px;
}
.disclaimer {
  font-size: 0.9rem;
  color: #999;
  margin: 15px auto;
  max-width: 800px;
}

/* --- FLOATING & WIDGETS --- */
.floating-buttons {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}
.float-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  transition: 0.3s;
}
.btn-settings {
  background-color: var(--primary-blue);
}
.btn-settings:hover {
  background-color: #1a8ac7;
}
.btn-top {
  background-color: var(--primary-blue);
  opacity: 0.8;
}
.btn-top:hover {
  opacity: 1;
}

#settings-modal {
  position: fixed;
  bottom: 80px;
  right: 70px;
  background-color: #1c1c1c;
  padding: 20px;
  border-radius: 10px;
  width: 250px;
  border: 1px solid #333;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 1001;
  color: #fff;
}
#settings-modal.active {
  display: block;
}
.setting-group {
  margin-bottom: 15px;
}
.setting-label {
  display: block;
  font-weight: 700;
  margin-bottom: 5px;
  font-size: 0.9rem;
}
input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  background: transparent;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: var(--primary-blue);
  cursor: pointer;
  margin-top: -6px;
}
input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  background: var(--primary-blue);
  border-radius: 2px;
}

/* Helpers & Responsive */
.icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
@media (max-width: 991px) {
  #manga-info {
    flex-direction: column;
  }
  .manga-cover {
    margin: 0 auto 20px;
    max-width: 200px;
  }
  .content-card {
    padding: 15px;
  }
  .control-bar {
    flex-wrap: wrap;
  }
  .btn-control {
    flex: 1;
    justify-content: center;
  }
  .chapter-select-wrapper {
    width: 100%;
  }
}

/* home  */
/* =========================================
   HOME PAGE SPECIFIC STYLES
   ========================================= */

/* --- SLIDER (Sama seperti sebelumnya) --- */
.manga-slider {
  display: flex;
  overflow-x: auto;
  gap: 15px;
  padding-bottom: 20px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-blue) #111;
}

.manga-slider::-webkit-scrollbar {
  height: 6px;
}
.manga-slider::-webkit-scrollbar-track {
  background: #1c1c1c;
  border-radius: 3px;
}
.manga-slider::-webkit-scrollbar-thumb {
  background: var(--primary-blue);
  border-radius: 3px;
}

.slider-item {
  min-width: 150px;
  max-width: 150px;
  display: block;
  position: relative;
  transition: transform 0.2s;
}

.slider-item:hover {
  transform: translateY(-5px);
}

.slider-img-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 220px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
.slider-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Badges for Slider */
.badge-overlay {
  position: absolute;
  top: 0;
  left: 0;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: bold;
  color: #fff;
  border-bottom-right-radius: 8px;
  text-transform: uppercase;
}
.badge-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.75rem;
  padding: 5px;
  text-align: center;
  backdrop-filter: blur(2px);
}
.slider-title {
  font-size: 0.9rem;
  color: #fff;
  margin-top: 8px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.slider-item:hover .slider-title {
  color: var(--primary-blue);
}

/* --- NEW GRID CARD STYLES --- */
.grid-card {
  transition: 0.3s;
}

.grid-img-wrap {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 4; /* Rasio gambar standar manga */
  margin-bottom: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.grid-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.grid-card:hover .grid-img-wrap img {
  transform: scale(1.05); /* Efek zoom saat hover */
}

/* Badge di Grid (New, Up, Hot) */
.grid-badge {
  position: absolute;
  top: 0;
  left: 0;
  padding: 4px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  border-bottom-right-radius: 8px;
  text-transform: uppercase;
  z-index: 2;
}
.badge-new {
  background: #22a7f0;
} /* Biru */
.badge-up {
  background: #28a745;
} /* Hijau */
.badge-hot {
  background: #dc3545;
} /* Merah */

/* Stats Overlay (Views & Bookmarks) */
.grid-stats {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0) 100%
  );
  color: #ddd;
  font-size: 0.75rem;
  padding: 15px 8px 5px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.icon-small {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  margin-right: 2px;
}

/* Grid Info Text */
.grid-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.grid-card:hover .grid-title {
  color: var(--primary-blue);
}

.grid-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #aaa;
}
.chapter-num {
  font-weight: 600;
  color: #fff;
}

/* --- PAGINATION STYLES --- */
.pagination-container {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.page-btn {
  display: inline-block;
  padding: 8px 14px;
  background: #1c1c1c;
  color: #fff;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: 0.2s;
  border: 1px solid #333;
}

.page-btn:hover {
  background: #333;
  color: var(--primary-blue);
  text-decoration: none;
}

.page-btn.active {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  color: #fff;
}

.page-btn.disabled {
  opacity: 0.5;
  cursor: default;
}

/* =========================================
   LIVE SEARCH POPUP STYLES
   ========================================= */

/* Tombol Search di Navbar */
.btn-nav-search {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.3s;
}
.btn-nav-search:hover {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  transform: scale(1.1);
}

/* Overlay Background (Dimmed) */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px); /* Efek blur di belakang */
  z-index: 9999;
  display: none; /* Hidden default */
  align-items: flex-start; /* Mulai dari atas */
  justify-content: center;
  padding-top: 80px; /* Jarak dari atas */
  opacity: 0;
  transition: opacity 0.3s ease;
}

.search-overlay.active {
  display: flex;
  opacity: 1;
}

/* Kotak Popup Utama */
.search-popup {
  width: 100%;
  max-width: 600px;
  background-color: #111418; /* Warna dark blue/black seperti gambar */
  border: 1px solid #30363d;
  border-radius: 12px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
  margin: 0 15px;
}

.search-overlay.active .search-popup {
  transform: translateY(0);
}

/* Header Input */
.search-header {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #30363d;
  position: relative;
}

.search-header input {
  width: 100%;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  font-family: "Josefin Sans", sans-serif;
  margin-left: 10px;
  outline: none;
}
.search-header input::placeholder {
  color: #555;
}

/* Label Section */
.search-label {
  padding: 10px 20px 5px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #8b949e;
  text-transform: uppercase;
}

/* List Container */
.search-results {
  max-height: 400px; /* Batas tinggi agar bisa scroll */
  overflow-y: auto;
  padding: 10px 0;
  /* Custom Scrollbar */
  scrollbar-width: thin;
  scrollbar-color: #30363d #111418;
}

.search-results::-webkit-scrollbar {
  width: 8px;
}
.search-results::-webkit-scrollbar-track {
  background: #111418;
}
.search-results::-webkit-scrollbar-thumb {
  background: #30363d;
  border-radius: 4px;
}

/* Item List Style */
.search-item {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  text-decoration: none;
  transition: background 0.2s;
  border-left: 3px solid transparent;
}

.search-item:hover {
  background-color: rgba(34, 167, 240, 0.1);
  border-left-color: var(--primary-blue);
  text-decoration: none;
}

.search-item img {
  width: 45px;
  height: 45px;
  border-radius: 5px;
  object-fit: cover;
  margin-right: 15px;
}

.search-info h5 {
  margin: 0;
  font-size: 0.95rem;
  color: #c9d1d9;
  font-weight: 600;
}

.search-info span {
  font-size: 0.8rem;
  color: #8b949e;
}

/* Footer Hint */
.search-footer-hint {
  padding: 10px 20px;
  border-top: 1px solid #30363d;
  font-size: 0.8rem;
  color: #8b949e;
  text-align: right;
  background-color: #0d1117;
}

.search-footer-hint span {
  border: 1px solid #30363d;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.7rem;
  margin-right: 5px;
  background: #161b22;
}

/* =========================================
   MODERN GENRE PAGE STYLES
   ========================================= */

.genre-page-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.genre-modern-grid {
  display: grid;
  /* 5 Kolom Presisi */
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  padding: 20px 0;
}

.genre-card-modern {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px; /* Tinggi kartu fix agar seragam */

  /* GLASSMORPHISM EFFECT */
  background: rgba(30, 30, 30, 0.6); /* Semi-transparent dark */
  backdrop-filter: blur(10px); /* Efek Blur di belakang */
  -webkit-backdrop-filter: blur(10px);

  border: 1px solid rgba(255, 255, 255, 0.1); /* Border tipis halus */
  border-radius: 12px;

  color: #e0e0e0;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 1px;

  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy effect */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Dekorasi garis tipis di kiri (Accent) */
.genre-card-modern::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background-color: transparent;
  transition: 0.3s;
}

.genre-card-modern:hover {
  background: rgba(34, 167, 240, 0.15); /* Biru transparan saat hover */
  border-color: var(--primary-blue);
  color: #fff;
  text-decoration: none;
  transform: translateY(-5px) scale(1.02); /* Naik dan membesar sedikit */
  box-shadow: 0 10px 20px rgba(34, 167, 240, 0.2); /* Glow biru */
}

.genre-card-modern:hover::before {
  background-color: var(--primary-blue);
}

/* Responsif */
@media (max-width: 992px) {
  .genre-modern-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .genre-modern-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }
  .genre-page-title {
    font-size: 2rem;
  }
  .genre-card-modern {
    height: 70px;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .genre-modern-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* =========================================
   MANGA LIST A-Z STYLES (REFERENSI GAMBAR)
   ========================================= */

/* Navigasi Kotak Huruf (Keyboard Style) */
.az-keyboard-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px; /* Jarak antar kotak sangat tipis */
  justify-content: flex-start;
}

.key-btn {
  width: 35px; /* Lebar kotak */
  height: 35px;
  background-color: transparent;
  border: 1px solid #444; /* Border abu-abu */
  color: #eee;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: 0.2s;
}

.key-btn:hover {
  background-color: var(--primary-blue);
  border-color: var(--primary-blue);
  color: #fff;
  text-decoration: none;
}

/* Group Section (#, A, B, C...) */
.az-group {
  margin-bottom: 30px;
}

/* Judul Huruf dengan Garis Biru Panjang */
.az-group-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  border-bottom: 2px solid var(--primary-blue); /* Garis biru di bawah huruf */
  padding-bottom: 5px;
  margin-bottom: 15px;
  display: block;
  width: 100%;
}

/* Grid List Manga (2 Kolom) */
.az-list-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 2 Kolom presisi */
  column-gap: 40px; /* Jarak antar kolom */
  row-gap: 8px; /* Jarak antar baris judul */
}

/* Link Judul Manga */
.az-link {
  color: #aaa; /* Warna abu-abu default */
  font-size: 0.95rem;
  text-decoration: none;
  transition: 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* Titik-titik jika kepanjangan */
  display: block;
  padding: 2px 0;
}

.az-link:hover {
  color: var(--primary-blue);
  text-decoration: none;
  padding-left: 5px; /* Efek geser dikit saat hover */
}

/* Styling Tombol Keyboard Aktif */
.active-key {
  background-color: var(--primary-blue) !important;
  border-color: var(--primary-blue) !important;
  color: #fff !important;
  box-shadow: 0 0 10px rgba(34, 167, 240, 0.5);
}

/* Fix Pagination agar rapi di tengah */
.pagination-container .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 35px;
  height: 35px;
  padding: 0 10px;
  background: #1c1c1c;
  color: #fff;
  border-radius: 5px;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 3px;
  border: 1px solid #333;
  text-decoration: none;
  transition: 0.2s;
}

.pagination-container .page-numbers.current {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
}

.pagination-container .page-numbers:hover {
  background: #333;
  color: var(--primary-blue);
  border-color: var(--primary-blue);
}

/* Responsive: 1 Kolom di HP */
@media (max-width: 768px) {
  .az-list-grid {
    grid-template-columns: 1fr; /* Jadi 1 kolom */
  }
  .key-btn {
    flex-grow: 1; /* Tombol huruf melebar di HP */
  }
}

/* =========================================
   STATIC PAGES STYLES (DMCA, PRIVACY, ETC)
   ========================================= */

.page-content-card {
  /* Glassmorphism Base */
  background: rgba(30, 30, 30, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);

  padding: 40px;
  color: #e0e0e0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.page-title {
  font-size: 2.2rem;
  font-weight: 700;
  border-bottom: 2px solid #333;
  padding-bottom: 15px;
  margin-bottom: 10px;
}

.page-text-body {
  font-size: 1rem;
  line-height: 1.8; /* Jarak baris lega agar mudah dibaca */
  color: #ccc;
}

.page-text-body h3 {
  color: #fff;
  margin-top: 30px;
  margin-bottom: 15px;
  font-size: 1.4rem;
  border-left: 4px solid var(--primary-blue);
  padding-left: 15px; /* Aksen garis biru di sebelah judul sub-bab */
}

.page-text-body p {
  margin-bottom: 20px;
}

.page-text-body ul {
  margin-bottom: 20px;
  padding-left: 20px;
}

.page-text-body li {
  margin-bottom: 10px;
  list-style-type: disc;
}

/* Alert Box untuk Kontak/Email */
.alert-box {
  background-color: rgba(34, 167, 240, 0.1);
  border: 1px solid var(--primary-blue);
  padding: 20px;
  border-radius: 8px;
  color: #fff;
}

/* Responsif Mobile */
@media (max-width: 768px) {
  .page-content-card {
    padding: 25px;
  }
  .page-title {
    font-size: 1.8rem;
  }
}

/* =========================================
   404 PAGE STYLES
   ========================================= */

/* Body khusus halaman error agar konten di tengah vertikal & horizontal */
.error-page-body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden; /* Hilangkan scrollbar */
}

/* Kartu Glassmorphism di tengah */
.error-card {
  background: rgba(30, 30, 30, 0.6);
  backdrop-filter: blur(15px); /* Blur lebih kuat */
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 3rem 2rem;
  max-width: 550px;
  margin: 0 auto;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 1;
}

/* Teks Angka 404 Besar */
.error-code {
  font-size: 8rem;
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px var(--primary-blue); /* Efek outline biru */
  background: linear-gradient(
    180deg,
    var(--primary-blue) 0%,
    rgba(34, 167, 240, 0.1) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  margin-bottom: 0;
  opacity: 0.9;
}

/* Gambar Mascot */
.error-mascot {
  width: 120px;
  height: auto;
  margin: 20px 0;
  filter: drop-shadow(0 0 10px rgba(34, 167, 240, 0.5)); /* Glow effect */
  animation: float 3s ease-in-out infinite; /* Animasi melayang */
}

/* Animasi Melayang (Floating) */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Tombol Home Kustom */
.btn-home {
  display: inline-block;
  background-color: var(--primary-blue);
  color: #fff;
  font-weight: 700;
  padding: 12px 30px;
  border-radius: 50px; /* Pill shape */
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(34, 167, 240, 0.4);
  text-decoration: none;
}

.btn-home:hover {
  background-color: #fff;
  color: var(--primary-blue);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
  text-decoration: none;
}

/* Responsif Mobile */
@media (max-width: 576px) {
  .error-code {
    font-size: 5rem;
  }
  .error-card {
    padding: 2rem 1.5rem;
    width: 90%;
  }
}

/* =========================================
   FOOTER MENU STYLES
   ========================================= */

/* Hilangkan bullet point & margin default */
.footer-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center; /* Posisi Tengah */
  flex-wrap: wrap;
  gap: 10px;
}

.footer-menu-list li {
  display: inline-block;
  position: relative;
}

/* Style Link */
.footer-menu-list li a {
  color: #aaa;
  text-decoration: none;
  font-size: 0.95rem;
  transition: 0.3s;
}

.footer-menu-list li a:hover {
  color: var(--primary-blue);
}

/* MEMBUAT GARIS PEMISAH (|) DENGAN CSS */
.footer-menu-list li:not(:last-child)::after {
  content: "|";
  color: #555;
  margin-left: 10px;
  font-weight: normal;
}

/* =========================================
   LIBRARY PAGE STYLES (Bookmark Remove Btn)
   ========================================= */

/* 1. Pastikan wrapper gambar posisinya relative
   agar tombol di dalamnya bisa diposisikan secara absolut terhadap wrapper ini. */
.grid-img-wrap {
  position: relative;
  display: block; /* Pastikan dia block agar membungkus gambar */
  overflow: hidden;
  border-radius: var(--radius);
}

/* 2. Style Tombol Hapus (X) */
.btn-remove-bookmark {
  position: absolute; /* Melayang di atas gambar */
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.6); /* Latar belakang hitam transparan */
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%; /* Membuat lingkaran */
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10; /* Pastikan di lapisan paling atas */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s all ease;
  padding-bottom: 2px; /* Penyesuaian kecil agar 'x' pas di tengah */
}

/* Efek saat hover */
.btn-remove-bookmark:hover {
  background: var(--primary-blue); /* Berubah jadi biru saat disorot */
  border-color: var(--primary-blue);
  transform: scale(1.1); /* Sedikit membesar */
}

/* =========================================
   LAZY LOAD ANIMATION (FIXED)
   ========================================= */

/* Target gambar berdasarkan atribut khusus */
img[data-lazy="true"] {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  background-color: #222;
  min-height: 300px;
  display: block;
  margin: 0 auto;
}

/* Class ini akan ditambahkan oleh JS setelah gambar dimuat */
img.loaded {
  opacity: 1 !important;
  background-color: transparent !important;
  min-height: auto !important;
}

/* =========================================
   SIMPLE COMMENTS SECTION STYLES
   ========================================= */

/* 1. Gaya Tombol Pemicu (Seperti Gambar 1) */
.simple-trigger-wrapper {
  padding: 10px 0;
  background: transparent;
}

.simple-trigger-btn {
  width: 100%;
  background-color: #ffffff; /* Latar Putih */
  /* color: #7b68ee;  */
  border-bottom: 2px solid var(--primary-blue); /* Border Ungu */
  padding: 12px 20px;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 4px; /* Sedikit rounded di ujung */
  transition: all 0.3s ease;
  outline: none;
}

.simple-trigger-btn:hover {
  background-color: #f0f0f0; /* Sedikit abu saat hover */
}

.simple-trigger-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* 2. Gaya Daftar Komentar yang Dimuat (Sangat Simpel) */

/* Hapus style glass-comment yang lama jika masih ada */

.simple-comment-item {
  padding-bottom: 15px;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Garis pemisah tipis */
}

.comment-author-name {
  font-size: 1rem;
  color: var(--primary-blue); /* Gunakan warna utama tema untuk nama */
  margin-right: 8px;
}

.comment-time {
  font-size: 0.85rem;
  color: #888;
}

.comment-text p {
  margin-bottom: 0;
  color: #ddd;
  line-height: 1.5;
  font-size: 0.95rem;
}

/* Sembunyikan Avatar dan Reply agar sangat simpel */
.comment-avatar,
.reply {
  display: none !important;
}

/* Penyesuaian Form Komentar agar lebih menyatu */
#respond {
  margin-top: 30px;
  border-top: 2px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
}

#reply-title {
  font-size: 1.1rem;
  color: #fff;
}

/* =========================================
   BREADCRUMBS STYLES
   ========================================= */
.koroma-breadcrumb {
  font-size: 0.9rem;
  color: #888;
  /* margin-bottom: 10px; */
}

.koroma-breadcrumb a {
  color: #ccc;
  text-decoration: none;
  transition: 0.3s;
}

.koroma-breadcrumb a:hover {
  color: var(--primary-blue);
  text-decoration: underline;
}

.koroma-breadcrumb .separator {
  margin: 0 8px;
  color: #555;
}

.koroma-breadcrumb .current {
  color: var(--primary-blue);
  font-weight: 600;
}

/* Container khusus di Single Chapter (Opsional, agar background gelap) */
.breadcrumb-container {
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 15px;
  border-radius: 5px;
  margin: 15px 0;
}

/* =========================================
   ADS MANAGEMENT STYLES
   ========================================= */

/* Container Umum (Agar responsif) */
.ad-container img,
.ad-container iframe,
.ad-container div {
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  display: block;
}

/* --- FLOATING MIDDLE (POPUP) --- */
.ad-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7); /* Background Gelap */
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ad-box-middle {
  position: relative;
  background: #fff;
  padding: 5px;
  border-radius: 4px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
  /* Ukuran bisa menyesuaikan konten */
  max-width: 90%;
}

.ad-close-btn {
  position: absolute;
  top: -15px;
  right: -15px;
  background: red;
  color: white;
  border: 2px solid white;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}

/* --- FLOATING BOTTOM (STICKY) --- */
.ad-sticky-bottom {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%); /* Tengahin Horizontal */
  width: 728px; /* Ukuran Desktop */
  max-width: 100%;
  background: rgba(30, 30, 30, 0.95);
  border-top: 2px solid var(--primary-blue);
  padding: 10px;
  z-index: 9990;
  text-align: center;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.5);
}

.ad-close-btn-sticky {
  position: absolute;
  top: -30px; /* Di atas box */
  right: 0;
  background: #333;
  color: #fff;
  border: none;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 5px 5px 0 0;
}

/* RESPONSIVE MOBILE */
@media (max-width: 768px) {
  /* Sticky Bottom jadi Full Width di HP */
  .ad-sticky-bottom {
    width: 100%;
    padding: 5px;
  }

  /* Tombol close agak digeser biar gak kepencet */
  .ad-close-btn-sticky {
    right: 10px;
    top: -25px;
  }
}
