  :root{
    --ink: #121214;
    --paper: #F6F4EF;
    --paper-card: #FFFFFF;
    --line: #E7E3D8;
    --muted: #79756C;
    --red: #E8382D;    /* manga */
    --blue: #2D6FE8;   /* manhwa */
    --green: #1D9A6C;  /* manhua */
    --gray: #6B6862;   /* lainnya */
  }
  [data-theme="dark"]{
    --paper: #121214;
    --paper-card: #1C1C20;
    --line: #2C2C33;
    --muted: #9A968D;
  }
  html,body{ background: var(--paper); }
  body{ font-family: 'Inter', sans-serif; color: var(--ink); transition: background-color .2s ease, color .2s ease; }
  .font-display{ font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.02em; }

  .halftone{
    background-image: radial-gradient(rgba(255,255,255,0.14) 1.4px, transparent 1.4px);
    background-size: 11px 11px;
  }

  .header-wrap{
    background: var(--ink);
    position: relative;
    overflow: hidden;
  }
  .speed-lines{
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
      100deg,
      transparent 0px,
      transparent 38px,
      rgba(232,56,45,0.10) 38px,
      rgba(232,56,45,0.10) 40px
    );
    pointer-events: none;
  }

  .icon-btn{
    width: 38px; height: 38px;
    border-radius: 9999px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    color: #F6F4EF;
    transition: background 0.2s ease, transform 0.2s ease;
    flex: 0 0 auto;
    cursor: pointer;
  }
  .icon-btn:hover{ background: rgba(255,255,255,0.16); transform: translateY(-1px); }

  .search-input{
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.16);
    color: #F6F4EF;
  }
  .search-input::placeholder{ color: rgba(246,244,239,0.5); }
  .search-input:focus{ outline: none; border-color: var(--red); background: rgba(255,255,255,0.12); }

  .tab-bar{
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .tab-bar::-webkit-scrollbar{ display: none; }
  .tab-item{
    white-space: nowrap;
    padding: 0.55rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--muted);
    transition: background 0.2s ease, color 0.2s ease;
  }
  .tab-item:hover{ background: var(--line); color: var(--ink); }
  .tab-item.active{
    background: var(--ink);
    color: var(--paper);
  }

  .badge{
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.28rem 0.6rem;
    border-radius: 6px;
    color: #fff;
  }
  .badge-manga{ background: var(--red); }
  .badge-manhwa{ background: var(--blue); }
  .badge-manhua{ background: var(--green); }
  .badge-lainnya{ background: var(--gray); }
  .badge-status{
    background: rgba(18,18,20,0.75);
    color: #fff;
  }

  .featured{
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--paper-card);
  }
  .featured img{ width: 100%; height: 340px; object-fit: cover; display: block; }
  .featured-overlay{
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.88) 10%, rgba(0,0,0,0.15) 55%, transparent 75%);
  }

  .comic-card{
    background: var(--paper-card);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color .2s ease, border-color .2s ease;
    position: relative;
    display: block;
  }
  .comic-card:hover{
    transform: translateY(-4px);
    box-shadow: 0 12px 28px -14px rgba(18,18,20,0.28);
  }
  .cover-wrap{ position: relative; aspect-ratio: 3/4; overflow: hidden; background: var(--line); }
  .cover-wrap img{ width: 100%; height: 100%; object-fit: cover; }

  .clamp2{
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
  }

  .card-bookmark-btn{
    position: absolute;
    top: 8px; left: 8px;
    width: 30px; height: 30px;
    border-radius: 9999px;
    background: rgba(18,18,20,0.7);
    color: #fff;
    border: none;
    font-size: 15px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: background .2s ease;
  }
  .card-bookmark-btn.active{ background: var(--red); }

  .fab-donate{
    position: fixed;
    right: 1.1rem;
    bottom: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.1rem;
    border-radius: 9999px;
    background: var(--red);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 10px 24px -8px rgba(232,56,45,0.55);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 40;
  }
  .fab-donate:hover{ transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(232,56,45,0.65); }

  .ad-slot{ margin: 1.5rem 0; text-align: center; overflow: hidden; }
  .ad-slot:empty{ display: none; }

  /* ============ HEADER MINIMAL (comic.html, chapter.html) ============ */
  .header-mini{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }
  .back-link{
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(246,244,239,0.75);
    font-size: 0.85rem;
    font-weight: 600;
  }
  .back-link:hover{ color: #F6F4EF; }

  /* ============ HERO DETAIL KOMIK ============ */
  .detail-hero{
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 1.25rem;
    background: var(--paper-card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1.25rem;
  }
  .detail-hero .cover-wrap{ border-radius: 12px; }
  .detail-hero h1{ font-size: 1.7rem; line-height: 1.15; margin-bottom: 0.5rem; }
  .badge-outline{
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.28rem 0.65rem;
    border-radius: 6px;
    border: 1px solid var(--line);
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }
  .bookmark-toggle-btn{
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 9999px;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
  }
  .bookmark-toggle-btn.active{ background: var(--red); color: #fff; border-color: var(--red); }
  .view-count-inline{
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--muted);
  }

  /* ============ DAFTAR CHAPTER ============ */
  .chapter-list-wrap{
    background: var(--paper-card);
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
  }
  .chapter-row{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--line);
  }
  .chapter-row:last-child{ border-bottom: none; }
  .chapter-row:hover{ background: var(--paper); }
  .chapter-row .ch-title{ font-weight: 600; font-size: 0.9rem; color: var(--ink); }
  .chapter-row .ch-date{ font-size: 0.75rem; color: var(--muted); white-space: nowrap; }

  /* ============ READER (chapter.html) ============ */
  .reader-bar{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    background: var(--paper-card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.85rem 1.1rem;
  }
  .reader-bar .comic-name{ font-weight: 700; font-size: 0.9rem; }
  .reader-bar .comic-name a{ color: var(--ink); }
  .reader-nav{ display: flex; align-items: center; gap: 0.4rem; }
  .reader-nav a, .reader-nav select{
    padding: 0.5rem 0.8rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--ink);
  }
  .reader-nav a:hover{ background: var(--red); color: #fff; border-color: var(--red); }
  .reader-nav a.disabled{ opacity: 0.35; pointer-events: none; }

  .reader-images{ display: flex; flex-direction: column; align-items: center; gap: 0; margin: 1rem 0; }
  .reader-images img{ width: 100%; display: block; }

  .no-data{ text-align: center; padding: 3rem 1rem; color: var(--muted); }

  @media (max-width: 640px){
    .detail-hero{ grid-template-columns: 120px 1fr; padding: 1rem; }
    .detail-hero h1{ font-size: 1.3rem; }
    .reader-images{ margin-left: -1.25rem; margin-right: -1.25rem; }
  }
