/*
 Theme Name:   GeneratePress Child (Bacakomik)
 Theme URI:    https://generatepress.com
 Description:  Tema khusus Bacakomik, ringan, tanpa bloat, dark mode native.
 Author:       Lin (Trae AI)
 Template:     generatepress
 Version:      1.0.0
*/

/* === GLOBAL DARK MODE === */
body {
    background-color: #121212;
    color: #e0e0e0;
}

a {
    color: #90caf9;
    text-decoration: none;
    transition: 0.2s;
}

a:hover {
    color: #42a5f5;
    text-decoration: underline;
}

/* Header & Nav */
.site-header {
    background-color: #1e1e1e;
    border-bottom: 1px solid #333;
}

.main-navigation, 
.main-navigation ul ul {
    background-color: #1e1e1e;
}

.main-navigation .main-nav ul li a {
    color: #fff;
}

/* === KOMIK SERIES LAYOUT === */
.komik-info-wrapper {
    display: flex;
    gap: 25px;
    margin-bottom: 30px;
    background: #1e1e1e;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.komik-thumb img {
    width: 200px;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.komik-meta h1 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #fff;
}

.komik-meta-item {
    margin-bottom: 8px;
    font-size: 14px;
    color: #bbb;
}

.komik-meta-item strong {
    color: #fff;
    width: 80px;
    display: inline-block;
}

.genre-tag {
    display: inline-block;
    background: #333;
    color: #ddd;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.genre-tag:hover {
    background: #0d47a1;
    color: #fff;
    text-decoration: none;
}

/* === CHAPTER LIST === */
.chapter-list-wrapper {
    margin-top: 30px;
}

.chapter-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Scrollbar Keren */
.chapter-grid::-webkit-scrollbar {
    width: 6px;
}
.chapter-grid::-webkit-scrollbar-track {
    background: #1e1e1e; 
}
.chapter-grid::-webkit-scrollbar-thumb {
    background: #444; 
    border-radius: 3px;
}

.chapter-item {
    background: #2a2a2a;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    border: 1px solid #333;
}

.chapter-item:hover {
    background: #0d47a1;
    border-color: #0d47a1;
    text-decoration: none;
    transform: translateY(-2px);
}

/* === CHAPTER READER & PROTECTION === */
.reader-area {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.reader-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.nav-btn {
    background: #333;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
}

.nav-btn:hover {
    background: #0d47a1;
    text-decoration: none;
}

/* PROTEKSI GAMBAR (Sinkron dengan Native Reader) */
.viewer-komik { 
    width: 100%; 
    max-width: 100%; 
    overflow: hidden;
    position: relative; 
}

.chapter-images-wrapper img,
.viewer-komik img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
    pointer-events: none; /* Mouse tembus gambar */
    user-select: none;    /* Gak bisa diblok */
    -webkit-user-select: none;
}

/* Overlay Transparan untuk blokir klik kanan */
.img-protector {
    position: relative;
    display: block;
}

.overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0); /* Transparan penuh */
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .komik-info-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .komik-meta-item strong {
        display: block;
        width: 100%;
        margin-bottom: 2px;
        color: #90caf9;
    }
    
    .chapter-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .chapter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}