/* === Genre Scroll Bar === */
.genre-scroll {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 8px 0;
  margin-bottom: 15px;
  scroll-behavior: smooth;
}
.genre-scroll::-webkit-scrollbar {
  height: 6px;
}
.genre-scroll::-webkit-scrollbar-thumb {
  background: var(--card)88;
  border-radius: 5px;
}

/* === Genre Button === */
.genre-button {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-accent, #00eacb);
  cursor: pointer;
  white-space: nowrap;
  font-size: 14px;
  transition: all 0.2s ease;
}
.genre-button:hover {
  background: var(--card)22;
}
.genre-button.active {
  background: var(--card);
  color: var(--text);
}

/* === Horizontal Manga List per Genre === */
.genre-manga-scroll {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding: 10px 0;
}
.genre-manga-scroll::-webkit-scrollbar {
  height: 6px;
}
.genre-manga-scroll::-webkit-scrollbar-thumb {
  background: var(--card)88;
  border-radius: 5px;
}

.manga-item {
  width: 120px;
  flex-shrink: 0;
  text-align: center;
  cursor: pointer;
}
.manga-thumb {
  width: 100%;
  border-radius: 8px;
}

/* Text colors adapting to theme */
.manga-title {
  font-size: 13px;
  margin-top: 4px;
  font-weight: 600;
  color: var(--text);
}
.manga-chapter {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* === See All Button (Lihat Semua) === */
.see-all-button {
  margin: 10px auto 0;
  display: block;
  padding: 8px 16px;
  background: var(--card);
  color: var(--text);
  border: none;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s ease;
}
.see-all-button:hover {
  background: var(--card-hover, #00eacb22);
}

/* === Genre List Grid (Halaman Genre Detail) === */
#genre-list.manga-grid {
  display: grid;
  gap: 12px;
  padding: 10px 0;
}

/* 🟢 2 kolom di HP */
@media (max-width: 768px) {
  #genre-list.manga-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 🟢 4 kolom di tablet kecil */
@media (min-width: 769px) and (max-width: 1023px) {
  #genre-list.manga-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 🟢 5 kolom di desktop */
@media (min-width: 1024px) {
  #genre-list.manga-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.manga-card {
  background: var(--card);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.manga-card:hover {
  transform: scale(1.02);
}
.manga-card img {
  width: 100%;
  display: block;
}

/* Text adapts to theme */
.manga-card .manga-title {
  font-size: 14px;
  font-weight: 600;
  padding: 6px 8px 0;
  color: var(--text);
}
.manga-card .manga-chapter {
  font-size: 12px;
  padding: 2px 8px 8px;
  color: var(--muted);
}

/* Theme variables fallback */
:root {
  --text: #eee;
  --muted: #aaa;
  --text-accent: #00eacb;
  --card: #222;
  --card-hover: #00eacb22;
  --border: #555;
}

html[data-theme='light'] {
  --text: #222;
  --muted: #555;
  --text-accent: #007b6e;
  --card: #f5f5f5;
  --card-hover: #007b6e22;
  --border: #ccc;
}

/* ===== Genre Vertical List ===== */
.genre-list-vertical{
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 8px 16px;
}
.genre-item{
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 8px;
  cursor: pointer;
}
.genre-item .thumb{
  width: 92px;
  height: 128px;
  object-fit: cover;
  border-radius: calc(var(--radius) - 4px);
}
.genre-item .meta .title{
  font-weight: 700;
  margin: 2px 0 6px;
  line-height: 1.25;
}
.genre-item .meta .excerpt{
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
}
@media (min-width: 768px){
  .genre-list-vertical{ gap: 14px; }
  .genre-item{ grid-template-columns: 110px 1fr; }
  .genre-item .thumb{ width: 110px; height: 150px; }
}
