/* ================================================
   🌗 THEME VARIABLES (Dark & Light Mode Compatible)
   ================================================ */
:root {
  --ng-bg: #0f0f10;
  --ng-card: rgba(255,255,255,0.05);
  --ng-row: rgba(255,255,255,0.08);
  --ng-border: rgba(255,255,255,0.15);
  --ng-accent: #00b7ff;
  --ng-text: #e6eef8;
  --ng-muted: rgba(230,238,248,0.6);
}

body.light-mode {
  --ng-bg: #f9fafc;
  --ng-card: rgba(0,0,0,0.04);
  --ng-row: rgba(0,0,0,0.06);
  --ng-border: rgba(0,0,0,0.1);
  --ng-accent: #007bff;
  --ng-text: #0a0a0a;
  --ng-muted: rgba(0,0,0,0.6);
}

/* ============================
   DETAIL PAGE WRAPPER
   ============================ */
.ng-detail {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
  color: var(--ng-text);
}

/* ============================
   HEADER PANEL
   ============================ */
.ng-detail-panel {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.ng-detail-cover {
  width: 240px;
  height: 340px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  box-shadow: 0 4px 18px rgba(0,0,0,0.5);
  border: 1px solid var(--ng-border);
}

.ng-detail-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ng-detail-title {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ng-text);
}

/* ============================
   MANGA META INFO
   ============================ */
.ng-meta-info {
  background: var(--ng-card);
  border: 1px solid var(--ng-border);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 10px 0 14px;
  line-height: 1.5;
  font-size: 0.9rem;
  color: var(--ng-text);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.ng-meta-info p {
  margin: 4px 0;
}

.ng-meta-info strong {
  color: var(--ng-accent);
  font-weight: 600;
}

/* ============================
   META ROW (Genres)
   ============================ */
.ng-meta-row {
  font-size: 0.95rem;
  opacity: 0.9;
}

.ng-desc {
  line-height: 1.6;
  opacity: 0.85;
  font-size: 0.95rem;
  color: var(--ng-text);
}

/* ============================
   ACTION BUTTONS
   ============================ */
.ng-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.ng-btn {
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  background: var(--ng-accent);
  color: #03101f;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  text-decoration: none;
}

.ng-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

/* --- Tombol kecil di daftar chapter --- */
.ng-read-small {
  text-decoration: none;
  background: var(--ng-card);
  color: var(--ng-text);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  border: 1px solid var(--ng-border);
}

.ng-read-small:hover {
  background: var(--ng-accent);
  color: #03101f;
}

/* ============================
   READ DUO BUTTONS (Awal / Terbaru)
   ============================ */
.ng-read-duo {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.ng-read-duo .ng-btn {
  flex: 1;
  text-align: center;
  background: var(--ng-accent);
  color: #000;
  font-weight: 600;
  padding: 10px 0;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.1s ease;
}

.ng-read-duo .ng-btn:hover {
  background: #0096da;
  transform: translateY(-1px);
}

/* ============================
   CONTINUE READING BOX
   ============================ */
.ng-continue-box {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ng-btn.ng-continue-btn {
  background: var(--ng-accent);
  color: #000;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: 0.2s;
}

.ng-btn.ng-history-btn {
  background: var(--ng-card);
  color: var(--ng-text);
  border: 1px solid var(--ng-border);
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: 0.2s;
}

.ng-btn.ng-continue-btn:hover {
  background: #0095dd;
}

.ng-btn.ng-history-btn:hover {
  background: var(--ng-row);
}

/* ============================
   CHAPTER LIST
   ============================ */
.ng-chapters {
  margin-top: 24px;
}

.ng-chapters h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--ng-text);
  text-align: left; /* ✅ selalu rata kiri */
}

.ng-chapter-scroll {
  max-height: 400px;
  overflow-y: auto;
  border-radius: 8px;
  background: var(--ng-card);
  padding: 8px;
  border: 1px solid var(--ng-border);
}

.ng-chapter-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ng-chapter-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--ng-border);
  transition: background 0.2s ease;
  border-radius: 6px;
}

.ng-chapter-item:hover {
  background: var(--ng-row);
}

.ng-chapter-left {
  display: flex;
  flex-direction: column;
}

.ng-chapter-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ng-text);
}

.ng-chapter-date {
  font-size: 0.8rem;
  color: var(--ng-muted);
}

/* ============================
   SCROLLBAR STYLING
   ============================ */
.ng-chapter-scroll::-webkit-scrollbar {
  width: 6px;
}

.ng-chapter-scroll::-webkit-scrollbar-thumb {
  background-color: var(--ng-accent);
  border-radius: 3px;
}

/* ============================
   RESPONSIVE ADJUSTMENTS
   ============================ */
@media (max-width: 768px) {
  .ng-detail-panel {
    flex-direction: column;
    align-items: center;
    text-align: left;
    gap: 18px;
  }

  .ng-detail-cover {
    width: 200px;
    height: 280px;
    align-self: center;
  }

  .ng-detail-meta {
    width: 100%;
    max-width: 600px;
  }

  .ng-detail-title {
    font-size: 1.4rem;
    text-align: center;
    margin-bottom: 6px;
  }

  .ng-meta-info {
    text-align: left;
    font-size: 0.9rem;
    background: var(--ng-card);
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 4px;
  }

  .ng-meta-row {
    text-align: left;
    font-size: 0.9rem;
    margin-top: 6px;
  }

  .ng-desc {
    text-align: justify;
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 4px 0 10px;
  }

  .ng-actions {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
  }

  .ng-btn {
    font-size: 0.9rem;
    padding: 8px 12px;
  }

  /* ✅ Tetap sejajar di HP */
  .ng-read-duo {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
  }

  .ng-read-duo .ng-btn {
    flex: 1;
    padding: 8px 0;
    font-size: 0.9rem;
  }

  .ng-continue-box {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    margin-top: 12px;
  }

  .ng-chapters {
    margin-top: 22px;
  }

  .ng-chapters h3 {
    text-align: left; /* ✅ tetap kiri di HP juga */
    font-size: 1.1rem;
  }

  .ng-chapter-scroll {
    max-height: 300px;
    border-radius: 6px;
  }

  .ng-chapter-item {
    padding: 8px 10px;
  }
}
