/* ==================== GLOBAL & DARK MODE ==================== */
* { 
  box-sizing: border-box; 
}

:root {
  --gap: 12px;
  --radius: 10px;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Kodchasan', Arial, sans-serif;
  line-height: 1.4;
  overflow-x: hidden;
  background: #F6F5FA;
  color: #111;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

#mainHeader {
  background: #F6F5FA;
  border-bottom: 1px solid #ddd;
}

input#searchManga {
  background: #F6F5FA;
  color: #111;
  border-color: #ccc;
}

.icon { stroke: #555; }
.hamburger { background: #555; }

/* Dropdown */
.dropdown-content, .bookmark-content {
  background: #F6F5FA;
  border: 1px solid #ccc;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}
.dropdown-content a, .bookmark-content a { color: #111; }
.dropdown-content a:hover, .bookmark-content a:hover { background: #f2f2f2; }

/* DARK MODE */
body.dark {
  background: #0b0b0b;
  color: #fff;
}

body.dark #mainHeader {
  background: #121212;
  border-color: #333;
}

body.dark input#searchManga {
  background: #1e1e1e;
  color: #fff;
  border-color: #444;
}

body.dark .icon { stroke: #fff; }
body.dark .hamburger { background: #fff; }

body.dark .dropdown-content,
body.dark .bookmark-content {
  background: #1e1e1e;
  border-color: #444;
}
body.dark .dropdown-content a,
body.dark .bookmark-content a { color: #fff; }
body.dark .dropdown-content a:hover,
body.dark .bookmark-content a:hover { background: #333; }

body.dark .card { background: #1f1f1f; }
body.dark .thumb { background: #111; }
body.dark .bookmark-empty { color: #ccc; }

/* ==================== HEADER ==================== */
#mainHeader {
  position: sticky;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  height: 56px;
  z-index: 999;
}

.logo { cursor: pointer; height: 40px; }
.logo img { height: 100%; object-fit: contain; }

.header-center { flex: 1; margin: 0 15px; max-width: 600px; }

input#searchManga {
  width: 100%;
  height: 30px;
  padding: 0 16px;
  border-radius: 24px;
  border: 1px solid #ccc;
  outline: none;
  font-size: 14px;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  position: relative;
  min-width: 96px;
  height: 40px;
  flex-shrink: 0;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}

.icon { width: 24px; height: 24px; }

.sun, .moon { transition: opacity 0.3s; }
body.dark .sun { opacity: 0; }
body.dark .moon { opacity: 1; }
body:not(.dark) .sun { opacity: 1; }
body:not(.dark) .moon { opacity: 0; }

.hamburger-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 0;
  flex-shrink: 0;
}

.hamburger { 
  width:22px; 
  height:2px; 
  transition: all 0.3s; 
}

.dropdown-content, .bookmark-content {
  display: none; 
  position: absolute; 
  right: 0; 
  top: 52px;
  min-width: 170px; 
  border-radius: 8px; 
  z-index: 1000; 
  padding: 6px 0;
}

.dropdown.open .dropdown-content,
.bookmark-dropdown.open .bookmark-content { 
  display: block; 
}

.dropdown-content a, .bookmark-content a {
  display: block; 
  padding: 10px 16px; 
  text-decoration: none; 
  font-size: 14.5px;
}

.bookmark-empty { 
  padding: 12px 16px; 
  color: #666; 
  text-align: center; 
  font-size: 13px; 
}

/* ==================== MAIN CONTENT ==================== */
#tachiLib {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  padding: 15px;
}

.card {
  cursor: pointer;
  transition: transform 0.15s ease;
  border-radius: var(--radius);
  overflow: hidden;
}
.card:hover { transform: scale(1.03); }

.thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: #111;
}

.thumb img { 
  position: absolute; 
  inset: 0; 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}

.up-badge, .ch-badge {
  position: absolute; 
  top: 4px; 
  padding: 2px 6px; 
  font-size: 8px;
  border-radius: 5px; 
  font-weight: bold; 
  z-index: 10;
}
.ch-badge {
  left: 6px;
  top: 22px;
  background: #ffcc00;
  color: #000;
}

.up-badge {
  background: red; 
  color: #fff; 
  right: 6px;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.type-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;  
  background: #4a4592;
  color: #ffffff;
  font-size: 8px;
  padding: 0px 4px;
  border-radius: 2px;
  text-transform: capitalize;
  z-index: 20;
}

.up-badge,
.ch-badge,
.status-badge,
.type-badge {
  z-index: 20;
}

.status-badge {
  position: absolute;
  top: 4px;
  left: 6px;
  
  padding: 2px 6px;
  font-size: 8px;
  font-weight: bold;
  border-radius: 4px;

  z-index: 15;
  color: #fff;
}

/* WARNA PER STATUS */
.status-badge.ongoing {
  background: green;
}

.status-badge.completed {
  background: #2962ff;
}

.status-badge.hiatus {
  background: #ff9100;
}

.status-badge.dropped {
  background: #ff1744;
}

.status-badge.canceled {
  background: #6d4c41;
}

.overlay {
  position: absolute; 
  inset: auto 0 0 0; 
  padding: 8px;
  background: linear-gradient(to top, rgba(0,0,0,0.88), transparent);
}

.title {
  font-size: 13px;
  font-weight: 600;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;

  line-clamp: 2;
  
  overflow: hidden;
  margin: 0;
  color: #ffffff;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}

/* ================= HEADER MOBILE SMALL ================= */
@media (max-width: 600px) {

  #mainHeader {
    height: 48px;
    padding: 4px 8px;
  }

  .logo {
    height: 28px;
    min-width: 70px;
  }

  .header-center {
    margin: 0 6px;
    min-width: 0;
  }

  .search-wrapper {
    min-height: 32px;
  }

  input#searchManga {
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
    border-radius: 18px;
  }

  .icon {
    width: 16px;
    height: 16px;
  }

  .icon-btn,
  .hamburger-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
  }

  .hamburger {
    width: 16px;
    height: 2px;
  }

  .header-right {
    gap: 2px;
    min-width: 64px;
    height: 28px;
  }

  .dropdown-content,
  .bookmark-content {
    top: 44px;
    min-width: 150px;
  }
}

/* ==================== DETAIL MODAL - DESAIN BARU (FIXED SCROLL) ==================== */
#mangaDetail {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px 15px;
  overflow-y: auto;
}

#mangaDetail .detail-container {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  background: #0f0f1e;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0,0,0,0.7);
  position: relative;
  z-index: 2;
  max-height: 94vh;                 /* Batasi tinggi agar tidak terlalu panjang */
  display: flex;
  flex-direction: column;
}

/* Background blur effect */
#mangaDetail .detail-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--detail-bg);
  background-size: cover;
  background-position: center;
  filter: blur(14px) brightness(0.75);
  opacity: 0.75;
  z-index: 1;
  pointer-events: none;
}

#mangaDetail .detail-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 2;
  pointer-events: none;
}

/* Konten utama */
#mangaDetail .detail-content {
  position: relative;
  z-index: 3;
  color: #fff;
  flex: 1;
  overflow-y: auto;                 /* Scroll hanya di dalam konten */
  display: flex;
  flex-direction: column;
}

/* Main Section - Cover + Info */
#mangaDetail .main {
  padding: 28px 24px 20px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  z-index: 4;
}

#mangaDetail .left-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

#mangaDetail .cover {
  width: 165px;
  height: 230px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0,0,0,0.8);
}

#mangaDetail .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#mangaDetail .bookmark-btn {
  background: rgba(255,255,255,0.12);
  border: 2px solid rgba(255,255,255,0.35);
  color: white;
  padding: 10px 24px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 165px;
  justify-content: center;
  transition: all 0.3s;
  font-size: 14px;
  position: relative;
  z-index: 5;
}

#mangaDetail .bookmark-btn:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.55);
}

#mangaDetail .bookmark-btn.bookmarked {
  background: rgba(255, 204, 0, 0.25);
  border-color: #ffcc00;
  color: #ffcc00;
}

#mangaDetail .info {
  flex: 1;
  min-width: 280px;
}

#mangaDetail .title {
  font-size: clamp(21px, 5.5vw, 28px);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 14px;
}

#mangaDetail .status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ff4d4d;
  font-weight: 600;
  margin-bottom: 15px;
  font-size: 15px;
}

#mangaDetail .detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 11px;
  font-size: 14.8px;
}

#mangaDetail .detail-item i {
  width: 20px;
  color: #ddd;
  text-align: center;
}

#mangaDetail .genres {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

#mangaDetail .genre {
  background: rgba(255,255,255,0.13);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

/* Synopsis */
#mangaDetail .synopsis {
  padding: 25px 24px;
  background: rgba(0, 0, 0, 0.55);
  margin: 0 24px 24px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 4;
}

#mangaDetail .synopsis h2 {
  font-size: 18px;
  margin-bottom: 14px;
}

#mangaDetail .synopsis p {
  font-size: 15px;
  line-height: 1.65;
  opacity: 0.93;
}

/* Chapters */
#mangaDetail .chapters {
  padding: 0 24px 30px;
  position: relative;
  z-index: 4;
}

#mangaDetail .chapters h2 {
  font-size: 18px;
  margin-bottom: 16px;
}

#mangaDetail .chapter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

#mangaDetail .chapter-item {
  border-radius: 10px;
  overflow: hidden;
  background: #222;
  position: relative;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  cursor: pointer;
  transition: transform 0.2s;
}

#mangaDetail .chapter-item:hover {
  transform: scale(1.03);
}

#mangaDetail .chapter-item img {
  width: 100%;
  height: 95px;
  object-fit: cover;
}

#mangaDetail .chapter-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.9));
  padding: 8px 4px 6px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
}

/* Close Button */
#closeDetail {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 34px;
  cursor: pointer;
  z-index: 20;
  background: rgba(0,0,0,0.7);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  text-align: center;
  line-height: 48px;
  color: #fff;
}

/* Responsive Chapter Grid */
@media (max-width: 640px) {
  #mangaDetail .chapter-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  #tachiLib {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 0;        /* 🔥 ini kunci biar mentok */
  }
}
/* ==================== RESPONSIVE ==================== */
@media (min-width: 768px) {
  #tachiLib { 
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); 
    padding: 15px clamp(10px, 3vw, 30px); 
  }
}

@media (min-width: 1025px) {
  #tachiLib { 
    padding: 20px clamp(20px, 4vw, 60px); 
  }
}

@media (max-width: 767px) {
  #tachiLib { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  #mangaDetail .main {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  #mangaDetail .left-column {
    width: 100%;
    max-width: 160px;
  }
}

@media (min-width: 768px) {
  #mangaDetail .chapter-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 1024px) {
  #mangaDetail .chapter-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 600px) {
  #announcement {
    font-size: 13px;
    padding: 9px 15px;
  }
  .announcement-content {
    gap: 8px;
  }
}

#mainFooter {
  position: relative;
  width: 100%;
  padding: 25px 20px;
  margin-top: 40px;
  color: #fff;
  overflow: hidden;
}

/* layer gradient */
#mainFooter::before {
  content: "";
  position: absolute;
  inset: 0;

  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.95) 20%,
    rgba(0, 0, 0, 0.75) 45%,
    rgba(0, 0, 0, 0.4) 70%,
    rgba(0, 0, 0, 0) 100%
  );

  z-index: 0;
}


.footer-container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: auto;
  gap: 15px;
}

/* LINKS */
.footer-center {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.footer-center a {
  color: orangered;
  text-decoration: none;
  font-size: 12px;
  transition: 0.3s;
}

.footer-center a:hover {
  color: dodgerblue;
  transform: translateY(-2px);
}

/* RIGHT */
.footer-right {
  text-align: right;
}

.footer-right span {
  display: block;
  font-size: 13px;
  color: #aaa;
  margin-top: 5px;
}

.footer-right b {
  color: #fff;
}

/* SOCIAL */
.social {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.social-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  
  transition: 0.3s;
}

.social-icon svg {
  width: 18px;
  height: 18px;
}

/* DISCORD */
.discord {
  color: #5865F2;
}

.discord:hover {
  background: #5865F2;
  color: #fff;
  box-shadow: 0 0 10px #5865F2;
}

/* FACEBOOK */
.facebook {
  color: #1877F2;
}

.facebook:hover {
  background: #1877F2;
  color: #fff;
  box-shadow: 0 0 10px #1877F2;
}

/* DARK MODE */
body.dark #mainFooter {
  background: linear-gradient(to top, #000, #000, transparent);
}

/* 📱 MOBILE */
@media (max-width: 600px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-center {
    justify-content: center;
  }
  
  .footer-right {
    text-align: center;
  }
  
  .social {
    justify-content: center;
  }
}

.search-wrapper {
  position: relative;
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--widget-bg, #fff);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .2);
  max-height: 300px;
  overflow-y: auto;
  display: none;
  z-index: 999;
}

.search-item {
  padding: 10px 12px;
  cursor: pointer;
}

.search-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Skeleton */
.skeleton-card {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
}

.skeleton-thumb {
  width: 100%;
  aspect-ratio: 3/4;
  background: linear-gradient(
    90deg,
    #eee 25%,
    #f5f5f5 37%,
    #eee 63%
  );
  background-size: 400% 100%;
  animation: skeleton-loading 1.2s infinite;
}

.dark .skeleton-thumb {
  background: linear-gradient(
    90deg,
    #2a2a2a 25%,
    #333 37%,
    #2a2a2a 63%
  );
}

@keyframes skeleton-loading {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

.load-more-btn {
  display: block;
  margin: 3px auto;
  padding: 8px 15px;
  background: darkred;
  color: #fff;
  border: none;
  border-radius: 15px;
  cursor: pointer;
}

.content {
  gap: 0 !important;
}

#tachiLib {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* SEARCH RESULTS */
.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background .15s ease;
}

/* thumbnail */
.search-thumb {
  width: 42px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

/* text wrapper */
.search-info {
  display: flex;
  flex-direction: column;
}

/* LIGHT MODE (default) */
.search-title {
  font-size: 12px;
  font-weight: 600;
  color: #111;
}

.search-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* DARK MODE */
body.dark .search-title {
  color: #fff;
}

body.dark .search-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* default (light) */
#searchResults {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.15);
}

/* dark mode */
body.dark #searchResults {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/*Bookmark*/
.bookmark-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
}

.bookmark-thumb {
  width: 38px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.bookmark-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* DEFAULT */
.bookmark-content {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* DARK */
body.dark .bookmark-content {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 480px) {

  .bookmark-content {
    width: 90vw;
    right: -10px;
  }

  .bookmark-title {
  white-space: normal;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}
}

.page-title {
  text-align: center;
  font-size: 20px;
  font-weight: 500;
  margin: 15px 0;
  font-family: 'Kodchasan', sans-serif;
}

/* ==================== FIREBASE POST - STYLE SAMA SEPERTI TACHILIB ==================== */

/* Grid Container Firebase */
#firebaseManga,
#firebaseNovel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  padding: 15px;
}

/* Card, Thumb, Hover - Persis seperti #tachiLib */
#firebasePost .card {
  cursor: pointer;
  transition: transform 0.15s ease;
  border-radius: var(--radius);
  overflow: hidden;
}

#firebasePost .card:hover {
  transform: scale(1.03);
}

#firebaseManga .thumb,
#firebaseNovel .thumb {
  position: relative;
  width: 100%;
  aspect-ratio:2/3;
  overflow: hidden;
  border-radius: var(--radius);
} 

#firebaseManga .thumb img,
#firebaseNovel .thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb img,
#firebaseManga .thumb img,
#firebaseNovel .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  content-visibility: auto;
}

#firebasePost .card:hover .thumb img {
  transform: scale(1.08);     /* Efek zoom kecil saat hover */
}

/* Badge & Overlay - Sama persis */
#firebasePost .up-badge,
#firebasePost .ch-badge,
#firebasePost .status-badge {
  position: absolute; 
  padding: 2px 6px; 
  font-size: 8px;
  border-radius: 5px; 
  font-weight: bold; 
  z-index: 10;
}

#firebasePost .ch-badge {
  left: 6px;
  top: 22px;
  background: #ffcc00;
  color: #000;
}

#firebasePost .up-badge {
  background: red; 
  color: #fff; 
  right: 6px;
  animation: blink 1s infinite;
}

#firebasePost .status-badge {
  top: 4px;
  left: 6px;
  z-index: 15;
  color: #fff;
}

/* Status color */
#firebasePost .status-badge.ongoing  { background: green; }
#firebasePost .status-badge.completed { background: #2962ff; }
#firebasePost .status-badge.hiatus    { background: #ff9100; }
#firebasePost .status-badge.dropped   { background: #ff1744; }
#firebasePost .status-badge.canceled  { background: #6d4c41; }

#firebasePost .overlay {
  position: absolute; 
  inset: auto 0 0 0; 
  padding: 8px;
  background: linear-gradient(to top, rgba(0,0,0,0.88), transparent);
}

#firebasePost .title {
  font-size: 13px;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
  margin: 0;
  color: #ffffff;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}

/* Skeleton untuk Firebase */
#firebasePost .skeleton-card {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
}

#firebasePost .skeleton-thumb {
  width: 100%;
  aspect-ratio: 3/4;
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.2s infinite;
}

body.dark #firebasePost .skeleton-thumb {
  background: linear-gradient(90deg, #2a2a2a 25%, #333 37%, #2a2a2a 63%);
}

/* ================= FIX FIREBASE GRID DESKTOP ================= */

#firebaseManga,
#firebaseNovel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  padding: 15px;
}

@media (max-width: 600px) {
  #firebaseManga,
  #firebaseNovel {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 0; /* 🔥 ini bikin mentok kiri kanan */
  }
}

/* tablet */
@media (min-width: 768px) {
  #firebaseManga,
  #firebaseNovel {
    grid-template-columns: repeat(4, 1fr);
    padding: 15px clamp(10px, 3vw, 30px);
  }
}

/* desktop */
@media (min-width: 1025px) {
  #firebaseManga,
  #firebaseNovel {
    grid-template-columns: repeat(6, 1fr);
    padding: 20px clamp(20px, 4vw, 60px);
    max-width: 1400px;
    margin: 0 auto; /* 🔥 biar ga full di desktop */
  }
}


.firebase-section {
    margin-top: 25px;
}

.section-title {
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.section-title::before,
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #aaa;
}
