/* --- Styling Halaman Detail Komik --- */

/* Tombol Global */
.btn {
    display: inline-block;
    padding: 0.7rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

/* [1] Breadcrumbs */
.breadcrumbs {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 1rem;
}
.breadcrumbs a {
    color: #ccc;
    text-decoration: none;
}
.breadcrumbs a:hover {
    color: var(--brand-color);
}

/* [2] Hero Komik (Box Info) */
.comic-info-box {
    background-color: var(--sidebar-bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    color: #ccc;
}
.comic-info-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(10px) brightness(0.3);
    z-index: 1;
}
.comic-info-cover, .comic-info-details {
    position: relative;
    z-index: 2;
}

.comic-info-cover {
    flex-basis: 200px;
    flex-shrink: 0;
}
.comic-info-cover img {
    width: 100%;
    aspect-ratio: 7 / 10;
    object-fit: cover;
    border-radius: 6px;
    background-color: #333;
}
.btn-bookmark {
    background: rgba(0,0,0,0.7);
    color: #fff;
    width: 100%;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-bookmark:hover {
    background: var(--brand-color);
    color: #111;
}

.comic-info-details {
    flex: 1;
    min-width: 0;
}
.comic-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #fff;
    margin: 0 0 0.2rem 0;
}
.comic-alt-title {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 0.5rem;
}
.comic-rating-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 1rem;
}
.comic-info-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
}
.comic-info-list li {
    display: flex;
}
.comic-info-list li span:first-child {
    font-weight: bold;
    color: #fff;
    width: 80px;
    flex-shrink: 0;
}
.comic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}
.tag-link {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
}
.tag-link:hover {
    background: var(--brand-color);
    color: #111;
}
.synopsis-box {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    background: rgba(0,0,0,0.2);
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    max-height: 100px;
    overflow-y: auto;
}
.discord-btn {
    background-color: #5865F2;
    color: #fff;
}
.discord-btn:hover {
    filter: brightness(1.1);
}

/* [3] Tombol Baca */
.chapter-read-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}
.btn-read {
    flex: 1;
    background-color: var(--sidebar-bg);
    color: #fff;
}
.btn-read.first {
    background-color: var(--brand-color);
    color: #111;
}
.btn-read:hover {
    filter: brightness(1.1);
}

/* [4] Ad Banner (728x90) */
.comic-ads-stacked {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1.5rem 0;
}
.ad-banner-stacked-item {
    width: 100%;
    aspect-ratio: 728 / 90; 
    background: #333;
    border-radius: 8px;
    overflow: hidden;
}
.ad-banner-stacked-item a {
    display: block;
    width: 100%;
    height: 100%;
}
.ad-banner-stacked-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* [5] Daftar Chapter (DESAIN BARU) */
.chapter-list-section.new-design {
    background-color: var(--sidebar-bg);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 2rem;
}
.chapter-list-section.new-design .section-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    margin: 0 0 1rem 0;
    background: none;
    padding: 0;
}
.social-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.social-share-buttons .social-btn {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: bold;
}
.social-btn.facebook { background-color: #1877F2; }
.social-btn.twitter { background-color: #1DA1F2; }
.social-btn.whatsapp { background-color: #25D366; }
.social-btn.pinterest { background-color: #E60023; }
.social-btn.telegram { background-color: #0088cc; }

.chapter-search-bar {
    width: 100%;
    background: #333;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 0.7rem 1rem;
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.chapter-search-bar:focus {
    outline: none;
    border-color: var(--brand-color);
}

.chapter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}
.chapter-grid-item {
    display: flex;
    flex-direction: column;
    background: #333;
    padding: 0.7rem;
    border-radius: 6px;
    text-decoration: none;
    color: #eee;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    transition: background 0.3s;
}
.chapter-grid-item:hover {
    background-color: var(--highlight-bg);
    color: var(--brand-color);
}
.chapter-grid-item .chapter-date {
    font-size: 0.75rem;
    color: #999;
    margin-top: 0.2rem;
}
.chapter-grid-item .download-icon {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}
.chapter-grid-item:hover .download-icon {
    color: var(--brand-color);
}

/* [6] Series Terkait */
.related-series-section {
    margin-top: 2rem;
    background: var(--sidebar-bg);
    padding: 1rem;
    border-radius: 8px;
}
.related-series-section .section-title {
    margin: 0 0 1rem 0;
    background: none;
    font-size: 1.2rem;
}
.related-series-section .comic-scroller {
    padding-bottom: 0.5rem;
}

/* [7] Comment Form */
.comment-form-section {
    background: var(--sidebar-bg);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 2rem;
}
.comment-note {
    font-size: 0.8rem;
    color: #999;
}
.comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.comment-form label {
    font-size: 0.9rem;
    font-weight: bold;
    color: #fff;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    background: #333;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
}
.comment-form textarea {
    resize: vertical;
}
.comment-cookies {
    display: flex;
    align-itemss: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}
.comment-cookies label {
    font-weight: normal;
}
.btn-submit-comment {
    background-color: var(--brand-color);
    color: #111;
    align-self: flex-start;
}

/* [BARU] Penanda Chapter yang Sudah Dibaca */
.chapter-grid-item.read {
    background-color: #2a2a30; /* Warna sedikit berbeda/lebih gelap */
    color: #777; /* Buat teksnya redup */
}

/* Pastikan warna kembali normal saat di-hover */
.chapter-grid-item.read:hover {
    background-color: var(--highlight-bg);
    color: var(--brand-color);
}

.chapter-grid-item.read .chapter-date {
    color: #555; /* Buat tanggalnya lebih redup lagi */
}


/* --- [10] Media Query Halaman Detail Komik --- */
@media (max-width: 768px) {
    .comic-info-box {
        flex-direction: column;
        padding: 0.8rem;
    }
    .comic-info-cover {
        flex-basis: auto;
        width: 200px; 
        max-width: 100%;
        margin: 0 auto;
    }
    .comic-title {
        font-size: 1.5rem;
        text-align: center;
        margin-top: 1rem;
    }
    .comic-alt-title {
        text-align: center;
    }
    .comic-rating-box {
        justify-content: center;
    }
    .comic-info-list li span:first-child {
        width: 60px;
    }
    .chapter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tambahkan di bagian bawah reader-style.css */

/* 1. Wadah Utama (Kotak Luar) */
.comments-section {
    background-color: var(--sidebar-bg);
    border-radius: 8px;
    padding: 1.5rem;        /* Padding agar teks tidak mepet pinggir */
    margin-top: 2rem;       /* Jarak dari elemen atas */
    border: 1px solid #333;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    width: 100%;            /* Lebar penuh */
    box-sizing: border-box; /* Agar padding tidak melebarkan kotak */
}

/* 2. Judul Komentar */
.comments-section .widget-title {
    color: #fff; 
    border-bottom: 1px solid #444; 
    padding-bottom: 0.5rem; 
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
}

/* Paksa iframe Disqus agar tidak terlalu lebar di HP */
#disqus_thread {
    background-color: transparent;
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
    width: 100%;
}

/* --- Perbaikan Warna Link Disqus --- */
/* Menargetkan semua link di dalam area Disqus Thread */
#disqus_thread a {
    color: var(--brand-color, #ffd700) !important; /* Ganti dengan warna kuning/emas Anda */
    /* !important digunakan untuk memastikan override gaya default Disqus */
}

/* Mengubah warna teks lain yang mungkin biru */
#disqus_thread .btn-flat,
#disqus_thread .highlight {
    color: var(--brand-color, #fafafa) !important;
}

/* Mengubah warna saat hover (opsional) */
#disqus_thread a:hover {
    color: var(--brand-color-dark, #ccaa00) !important; /* Warna sedikit lebih gelap saat di-hover */
    text-decoration: underline !important; /* Tambahkan garis bawah saat di-hover */
}

/* Mengubah warna tombol Jempol (Thumbs up/down) jika perlu */
/* Ini mungkin perlu penyesuaian jika struktur HTML Disqus berubah */
#disqus_thread .voting-buttons .vote-up,
#disqus_thread .voting-buttons .vote-down {
    color: var(--text-color-light, #ccc) !important; /* Warna abu-abu terang */
}

#disqus_thread .voting-buttons .vote-up.active {
    color: var(--brand-color, #ffd700) !important; /* Warna kuning saat aktif */
}

@media (max-width: 768px) {
    .comments-section {
        padding: 1rem;    /* Padding lebih kecil di HP */
        margin-top: 1.5rem;
    }
}