/* =========================================
   STYLE.CSS - STYNXVEIL.CO (FINAL FIXED)
   ========================================= */

/* --- Variabel Global & Pengaturan Dasar --- */
:root {
    --navbar-height: 60px;
    --navbar-bg: #1a1a1e;
    --sidebar-bg: #222226;
    --highlight-bg: #333338;
    --text-color: #f0f0f0;
    --brand-color: #fbc02d;
}


html, body {
    width: 100%;
    max-width: 100%;
    font-display: swap;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    padding-top: var(--navbar-height); 
    overflow-x: hidden !important; /* Mencegah scroll menyamping */
    background-color: #12121a;
    color: var(--text-color);
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* --- [1] Navbar (Desktop-First) --- */
.site-header {
    background-color: var(--navbar-bg);
    border-bottom: 1px solid #333;
    height: var(--navbar-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.navbar-container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: 0.5px;
    margin-right: 2rem;
}

.menu-toggle,
.search-toggle-mobile {
    display: none;
}

.nav-search-area {
    display: flex;
    align-items: center;
}

.nav-menu {
    position: static;
    width: auto;
    height: auto;
    background: none;
    padding-top: 0;
}

.nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.nav-menu li a {
    display: block;
    padding: 0 1rem;
    height: var(--navbar-height);
    line-height: var(--navbar-height);
    color: var(--text-color);
    text-decoration: none;
    border: none;
    white-space: nowrap;
}

.nav-menu li a:hover {
    background: none;
    color: var(--brand-color);
}

.nav-menu li a.active {
    background: none;
    color: var(--brand-color);
    box-shadow: inset 0 -2px 0 var(--brand-color);
}

/* Form Pencarian Desktop */
.search-form-desktop {
    display: flex;
    margin-left: 1rem;
}

.search-form-desktop input {
    background-color: var(--sidebar-bg);
    border: 1px solid #333;
    border-right: none;
    border-radius: 5px 0 0 5px;
    padding: 0.5rem 0.8rem;
    color: var(--text-color);
    width: 200px;
}

.search-form-desktop button {
    background-color: var(--sidebar-bg);
    border: 1px solid #333;
    border-radius: 0 5px 5px 0;
    color: #888;
    cursor: pointer;
    padding: 0 0.5rem;
}

/* Dropdown Menu Desktop */
.nav-menu li.has-dropdown {
    position: relative;
}

.dropdown-menu {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--sidebar-bg);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    min-width: 200px;
    z-index: 1001;
    list-style: none;
    padding: 0;
    margin: 0;
    transition: opacity 0.1s ease, visibility 0.1s ease;
}

.nav-menu li.has-dropdown:hover .dropdown-menu {
    visibility: visible;
    opacity: 1;
}

.dropdown-menu li a {
    display: block;
    height: auto;
    line-height: 1.5;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #333;
    white-space: nowrap;
}

.dropdown-menu li:last-child a {
    border-bottom: none;
}

.dropdown-menu li a:hover {
    background-color: var(--highlight-bg);
    color: var(--brand-color);
}

.dropdown-menu li a.active {
    background-color: var(--highlight-bg);
    color: var(--brand-color);
    box-shadow: none;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 997;
}

/* Tombol Logout */
#logout-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    height: var(--navbar-height);
    line-height: var(--navbar-height);
    padding: 0 1rem;
    display: block;
}

#logout-btn:hover {
    color: var(--brand-color);
}

/* --- [1.A] Navbar (Mobile) --- */
@media (max-width: 991.98px) {
    .navbar-container {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        padding: 0 1rem;
    }
    .logo {
        grid-column: 2 / 3;
        justify-self: center;
        margin-right: 0;
    }
    .menu-toggle {
        display: flex;
        grid-column: 1 / 2;
        justify-self: start;
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
        flex-direction: column;
        gap: 5px;
    }
    .menu-toggle span {
        display: block;
        width: 24px;
        height: 3px;
        background: var(--text-color);
        border-radius: 3px;
        transition: all 0.3s;
    }
    .menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    
    .nav-search-area {
        grid-column: 3 / 4;
        justify-self: end;
    }
    .search-toggle-mobile {
        display: block;
        background: none;
        border: none;
        color: var(--text-color);
        cursor: pointer;
        padding: 0;
    }
    .search-form-desktop { display: none; }
    
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background-color: var(--sidebar-bg);
        padding-top: var(--navbar-height);
        z-index: 998;
        transition: left 0.3s ease-in-out;
    }
    .nav-menu.active {
        left: 0;
        box-shadow: 5px 0 15px rgba(0,0,0,0.2);
    }
    .nav-menu ul { display: block; }
    .nav-menu li a {
        display: block;
        padding: 1rem 1.5rem;
        height: auto;
        line-height: 1.5;
        border-bottom: 1px solid #333;
    }
    .nav-menu li a:hover { background-color: var(--highlight-bg); }
    .nav-menu li a.active {
        background-color: var(--highlight-bg);
        font-weight: bold;
        color: var(--text-color);
        box-shadow: none;
    }
    
    .dropdown-menu {
        display: block;
        visibility: visible;
        opacity: 1;
        position: static;
        background: none;
        box-shadow: none;
        border-radius: 0;
        min-width: auto;
        padding: 0;
    }
    .dropdown-menu li a {
        padding-left: 2.5rem;
        border-bottom: 1px solid #333;
    }
    .dropdown-menu li a:hover,
    .dropdown-menu li a.active {
        background-color: var(--highlight-bg);
        color: var(--text-color);
    }

    #logout-btn {
        width: 100%;
        height: auto;
        line-height: 1.5;
        padding: 1rem 1.5rem;
        text-align: left;
    }

    .overlay.active { display: block; }
}

/* --- [1.B] Mobile Search Form --- */
.mobile-search-form {
    display: none;
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: 100%;
    background: #333;
    padding: 0.8rem 1rem;
    z-index: 999;
    gap: 0.5rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.mobile-search-form.active {
    display: flex;
}
.mobile-search-form input {
    flex: 1;
    background-color: var(--sidebar-bg);
    border: 1px solid #444;
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    color: var(--text-color);
    font-size: 1rem;
}
.mobile-search-form input:focus {
    outline: none;
    border-color: var(--brand-color);
}
.mobile-search-form button {
    background: var(--brand-color);
    color: #111;
    border: none;
    border-radius: 6px;
    padding: 0 0.8rem;
    cursor: pointer;
}

/* --- [2] Image Slider (Desktop) --- */
.slider-container {
    width: 90%;
    max-width: 1200px;
    height: 450px; 
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    margin: 2rem auto; 
}
.slider-wrapper {
    display: flex;
    height: 100%;
    width: 500%;
    transition: transform 0.7s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.slide {
    width: 20%;
    height: 100%;
    position: relative;
    overflow: hidden;
    color: white;
}
.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(20px) brightness(0.6);
    transform: scale(1.1);
    z-index: 1;
}
.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(20, 20, 30, 0.95) 0%, 
        rgba(20, 20, 30, 0.7) 40%, 
        rgba(20, 20, 30, 0.1) 100%
    );
    z-index: 2;
}
.slide-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 5%;
}
.comic-info {
    flex-basis: 50%;
    padding-right: 2rem;
}
.comic-info .chapter {
    font-size: 1rem;
    font-weight: bold;
    color: #ccc;
}
.comic-info .title {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0.5rem 0;
    line-height: 1.2;
}
.comic-info .description {
    font-size: 0.9rem;
    color: #e0e0e0;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tags span {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 1.5rem;
}
.read-btn {
    display: inline-block;
    background: #fbc02d;
    color: #111;
    text-decoration: none;
    font-weight: bold;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    transition: background 0.3s;
}
.read-btn:hover { background: #f9a825; }
.comic-cover {
    flex-basis: 45%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.comic-cover img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: rotate(4deg) scale(1.05);
    transition: transform 0.4s ease;
}
.slide:hover .comic-cover img {
    transform: rotate(2deg) scale(1.08);
}
.slider-dots {
    position: absolute;
    bottom: 20px;
    right: 5%;
    z-index: 4;
    display: flex;
}
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    margin: 0 4px;
    cursor: pointer;
    transition: background 0.3s;
}
.dot.active { background: #ffffff; }

/* --- [2.A] Image Slider (Mobile) --- */
@media (max-width: 768px) {
    .slider-container {
        height: 200px;
        border-radius: 10px;
        width: 100%;
        margin: 1rem 0;
    }
    .slide-bg, .slide::before { display: none; }
    .slide {
        background: linear-gradient(105deg, 
            rgba(66, 39, 83, 1) 0%, 
            rgba(34, 19, 45, 1) 100%
        );
    }
    .slide-content {
        flex-direction: row-reverse;
        justify-content: flex-end;
        padding: 1.5rem;
        align-items: center;
    }
    .comic-cover {
        flex-basis: auto;
        margin-right: 1rem; 
    }
    .comic-cover img {
        transform: none; 
        width: 100px;
        height: 140px;
        object-fit: cover;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    }
    .slide:hover .comic-cover img { transform: none; }
    .comic-info {
        flex-basis: 70%;
        padding-right: 0; 
    }
    .comic-info .chapter,
    .comic-info .tags {
        display: none;
    }
    .comic-info .title {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }
    .comic-info .description {
        font-size: 0.85rem;
        line-height: 1.4;
        margin-bottom: 1rem;
        -webkit-line-clamp: 2;
    }
    .read-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    .slider-dots {
        bottom: 10px;
        right: 1.5rem;
        transform: scale(0.8);
    }
}

/* --- [3] Section Komik Populer --- */
.popular-section { margin-bottom: 3rem; }
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2a2a30;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    margin-bottom: 1.5rem;
}
.filter-bar .filter-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.filter-bar .filter-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    transition: background 0.3s, color 0.3s;
}
.filter-bar .filter-links a:hover,
.filter-bar .filter-links a.active {
    background-color: #fff;
    color: #111;
}
.filter-bar .all-manga-btn {
    background-color: #f0f0f0;
    color: #111;
    text-decoration: none;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: bold;
    white-space: nowrap;
}
.section-title {
    display: inline-block;
    background-color: #222226;
    font-size: 1.1rem;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    margin: 0 0 1rem 0;
    color: #fff;
}
.comic-scroller {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 1.5rem;
    white-space: nowrap;
}
.comic-scroller::-webkit-scrollbar { height: 8px; }
.comic-scroller::-webkit-scrollbar-track { background: #222226; border-radius: 4px; }
.comic-scroller::-webkit-scrollbar-thumb { background: #444; border-radius: 4px; }
.comic-scroller::-webkit-scrollbar-thumb:hover { background: #555; }

.comic-card {
    flex: 0 0 160px;
    width: 160px;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    transform: translateZ(0);
}
.comic-card:hover {
    transform: scale(1.03) translateZ(0);
    z-index: 10;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}
.comic-card a { text-decoration: none; color: inherit; }

.card-image-container {
    position: relative;
    display: block;
    margin-bottom: 0.5rem;
    aspect-ratio: 3 / 4; /* Rasio standar komik */
    overflow: hidden;
    background-color: #222;
    border-radius: 6px;
}
.card-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.badge {
    position: absolute;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    color: #fff;
    z-index: 2;
}
/* Badge HOT */
.badge.hot {
    display: flex;
    align-items: center;
    gap: 3px;
    background: #e53935;
    bottom: 8px;
    right: 8px;
    padding: 0.2rem 0.4rem;
}
.badge.hot svg { width: 14px; height: 14px; display: block; }

/* Badge WARNA */
.badge.warna {
    bottom: 8px;
    left: 8px;
    background: var(--brand-color);
    color: #111;
}

/* Badge FLAG (Bendera) */
.badge.flag {
    background: none;
    padding: 0;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
    overflow: hidden;
}
.badge.flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comic-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0.5rem 0;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}
.comic-card h3 a:hover { color: var(--brand-color); }
.comic-card .chapter-info {
    font-size: 0.85rem;
    color: #999;
    display: block;
    margin-bottom: 0.3rem;
    white-space: normal;
}
.comic-card .rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    font-weight: bold;
    color: #ccc;
}
.comic-card .rating svg {
    width: 14px;
    height: 14px;
    fill: #fbc02d;
}

/* --- [3.A] Komik Populer (Mobile) --- */
@media (max-width: 991.98px) {
    .filter-bar { display: none; }
    .popular-section { margin: 2rem 0; }
    .section-title { margin-left: 1rem; }
    .comic-scroller { padding-left: 1rem; padding-right: 1rem; }
    .comic-card { flex: 0 0 140px; width: 140px; }
    .comic-card h3 { font-size: 0.9rem; }
}


/* --- [4] Layout Utama (Konten + Sidebar) --- */
.main-layout-container {
    display: flex;
    flex-direction: row; 
    width: 90%;
    max-width: 1200px;
    margin: 3rem auto;
    gap: 1.5rem;
}
.main-content {
    flex: 1;
    min-width: 0;
}
.sidebar-content {
    flex-basis: 320px;
    flex-shrink: 0;
}

/* Section "Project Update" */
/* =========================================
   [5] PROJECT UPDATE SECTION (GRID SYSTEM)
   ========================================= */

.project-update-section {
    margin-bottom: 3rem;
}

/* Header Section */
.project-update-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #333;
    padding-bottom: 0.5rem;
}

/* GRID UTAMA: DESKTOP (4 KOLOM) */
.update-grid {
    display: grid;
    /* Desktop: 4 Kotak ke kanan */
    grid-template-columns: repeat(4, 1fr); 
    gap: 1.5rem; /* Jarak antar kotak */
}

/* TAMPILAN KARTU (CARD) */
.update-card {
    background-color: var(--sidebar-bg);
    border-radius: 8px;
    overflow: hidden; /* Agar gambar tidak keluar */
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Efek Hover */
.update-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    border-color: var(--brand-color);
    z-index: 2;
}

/* WADAH GAMBAR */
.update-card .card-image-container {
    width: 100%;
    aspect-ratio: 3 / 4; /* Rasio standar komik (Portrait) */
    position: relative;
    overflow: hidden;
    background-color: #222;
}

/* GAMBAR (PAWANG GAMBAR) */
.update-card .card-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Gambar pas, tidak gepeng */
    transition: transform 0.3s ease;
}

.update-card:hover .card-image-container img {
    transform: scale(1.05); /* Zoom in dikit saat hover */
}

/* KONTEN TEKS (JUDUL & CHAPTER) */
.update-card .card-content {
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1; /* Isi ruang kosong agar tinggi kartu rata */
}

.update-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.4;
    color: #fff;
    /* Batasi judul maksimal 2 baris */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.update-card h3 a {
    text-decoration: none;
    color: inherit;
}
.update-card h3 a:hover {
    color: var(--brand-color);
}

/* LIST CHAPTER DI DALAM KARTU */
.update-card .chapter-list {
    margin-top: auto; /* Dorong ke paling bawah */
    padding: 0;
    list-style: none;
}

.update-card .chapter-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    padding: 4px 0;
    border-top: 1px dashed #444;
}
.update-card .chapter-list li:first-child {
    border-top: none;
}

.update-card .chapter-list li a {
    color: #ccc;
    text-decoration: none;
    font-weight: 500;
}
.update-card .chapter-list li a:hover {
    color: var(--brand-color);
}

/* =========================================
   RESPONSIF MOBILE (SESUAI REQUEST SS KE-2)
   ========================================= */
@media (max-width: 768px) {
    .update-grid {
        /* Mobile: Paksa jadi 2 Kolom (Grid) */
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 10px; /* Jarak lebih rapat untuk HP */
    }

    .update-card .card-content {
        padding: 8px; /* Padding lebih kecil di HP */
    }

    .update-card h3 {
        font-size: 0.85rem; /* Font judul lebih kecil */
        margin-bottom: 6px;
    }

    .update-card .chapter-list li {
        font-size: 0.75rem; /* Font chapter lebih kecil */
    }
}

/* Widget Sidebar */
.widget-box {
    background-color: var(--sidebar-bg);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #ccc;
}
.widget-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    margin: 0 0 1rem 0;
}

/* ChatBox */
.chat-list {
    list-style: none;
    padding: 0 5px 0 0; 
    margin: 0 0 1rem 0;
    height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.chat-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 0.85rem;
    text-transform: uppercase;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.1);
}
.chat-content { flex: 1; min-width: 0; }
.chat-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 2px;
}
.chat-user { font-weight: bold; font-size: 0.9rem; }
.chat-time { font-size: 0.7rem; color: #777; }
.chat-message {
    margin: 0;
    font-size: 0.95rem;
    color: #ddd;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.chat-input-form { 
    display: flex; 
    gap: 0.5rem;
    align-items: flex-end;
}
.chat-input-form input,
.chat-input-form textarea {
    background: #333;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 0.5rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.4;
}
.chat-input-form input:focus,
.chat-input-form textarea:focus {
    outline: none;
    border-color: var(--brand-color);
}
.chat-input-form input.chat-input-name { flex: 0 1 80px; }
.chat-input-form textarea.chat-input-message {
    flex: 1;
    min-width: 0;
    resize: none;
    overflow-y: hidden;
    height: auto;
}

/* Popular Series Widget */
/* =========================================
   SIDEBAR POPULAR WIDGET (MIRIP GAMBAR 1)
   ========================================= */

/* Wadah Tab (Mingguan/Bulanan) */
.tabs { 
    display: flex; 
    margin-bottom: 1.5rem; 
    background: #2a2a30; 
    border-radius: 50px; /* Bentuk kapsul */
    padding: 4px; 
    border: 1px solid #333;
}

.tab-link {
    flex: 1; 
    background: none; 
    border: none; 
    color: #888;
    padding: 0.6rem; 
    border-radius: 40px; 
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tab-link.active { 
    background: var(--brand-color); /* Kuning */
    color: #111; /* Teks Hitam */
    box-shadow: 0 2px 10px rgba(251, 192, 45, 0.3);
}

/* Daftar List */
.popular-series-list { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
    display: flex;
    flex-direction: column;
    gap: 15px; /* Jarak antar item */
}

/* Item List */
.popular-series-list li { 
    display: flex; 
    align-items: center; /* Rata tengah vertikal */
    gap: 15px; 
    padding-bottom: 15px;
    border-bottom: 1px dashed #333; /* Garis pemisah putus-putus */
}

.popular-series-list li:last-child {
    border-bottom: none;
}

/* Nomor Ranking (01, 02, 03...) */
.popular-rank { 
    font-size: 1.8rem; 
    font-weight: 900; 
    color: #444; /* Warna abu gelap untuk rank biasa */
    min-width: 35px; /* Lebar tetap agar sejajar */
    text-align: center;
    line-height: 1;
    font-family: sans-serif;
    font-style: italic;
}

/* Warna Khusus Top 3 (Emas/Kuning) */
.popular-rank.top-3 {
    color: var(--brand-color); 
    text-shadow: 0 0 15px rgba(251, 192, 45, 0.2);
}

/* Gambar Thumbnail */
.popular-img { 
    width: 65px; 
    height: 85px; 
    object-fit: cover; 
    border-radius: 6px;
    flex-shrink: 0; /* Jangan gepeng */
    background-color: #222;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Container Info Teks */
.popular-info { 
    flex: 1; 
    min-width: 0; /* Mencegah teks meluber */
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

/* Judul Komik */
.popular-title { 
    font-size: 0.95rem; 
    font-weight: 700; 
    color: #fff; 
    text-decoration: none; 
    line-height: 1.3;
    
    /* Batasi 2 baris lalu titik-titik... */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.popular-title:hover {
    color: var(--brand-color);
}

/* Genre / Info Tambahan */
.popular-genres { 
    font-size: 0.75rem; 
    color: #999; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis;
}

/* Rating / Views */
.popular-rating { 
    display: flex; 
    align-items: center; 
    gap: 4px; 
    color: #ccc; 
    font-size: 0.8rem;
    font-weight: 600;
}

.popular-rating svg { 
    width: 12px; 
    height: 12px; 
    fill: var(--brand-color); 
}

/* --- [4.A] Layout Utama (Mobile) --- */
@media (max-width: 991.98px) {
    .main-layout-container {
        flex-direction: column;
        width: 100%;
        margin: 2rem 0;
        gap: 0;
    }
    .main-content, .sidebar-content {
        flex-basis: auto;
        width: 100%;
        padding: 0 1rem;
    }
    .sidebar-content { margin-top: 2rem; }
    .update-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
}

/* --- [5] Section "Rilisan Terbaru" (REVISI FINAL: MOBILE FIX) --- */
    /* [FIX] Kembalikan Header agar Judul & Tombol sejajar */
.latest-releases-section .section-header {
    display: flex;
    justify-content: space-between; /* Judul kiri, Tombol kanan */
    align-items: center;            /* Rata tengah vertikal */
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #333;  /* Garis pemisah bawah */
    padding-bottom: 0.5rem;
}

.latest-releases-section h2 {
    color: #fff;
    font-size: 1.4rem;
    margin: 0;
}

/* --- Mulai Grid List --- */
.latest-releases-section { 
    margin-top: 3rem; 
}

/* TAMPILAN DESKTOP: 2 KOLOM */
.releases-list {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Kiri & Kanan */
    gap: 1.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

/* ITEM KARTU */
.release-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--sidebar-bg);
    border-radius: 8px;
    border: 1px solid #333;
    transition: transform 0.2s, box-shadow 0.2s;
}

.release-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border-color: var(--brand-color);
}

.release-item .item-image {
    width: 80px;  /* Sedikit diperbesar agar pas */
    height: 110px;
    object-fit: cover;
    border-radius: 6px;
    background-color: #222;
    flex-shrink: 0;
}

.release-item .item-info { 
    flex: 1; 
    min-width: 0; 
}

.release-item .item-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.release-item .item-title a { color: #fff; text-decoration: none; }
.release-item .item-title a:hover { color: var(--brand-color); }

.release-item .item-chapters { 
    list-style: none; padding: 0; margin: 0; font-size: 0.85rem; 
}

.release-item .item-chapters li {
    display: flex;
    justify-content: space-between;
    color: #ccc;
    margin-top: 0.3rem;
    padding-top: 0.3rem;
    border-top: 1px dashed #444;
}
.release-item .item-chapters li:first-child { border-top: none; }

.release-item .item-chapters li a { color: inherit; text-decoration: none; }
.release-item .item-chapters li a:hover { color: var(--brand-color); }
.release-item .item-chapters li span { color: #888; font-size: 0.8rem; font-style: italic; }

/* --- [PENTING] RESPONSIF MOBILE (PAKSA 1 KOLOM) --- */
/* Kita naikkan batasnya ke 991.98px agar tablet & HP besar juga kena */
@media (max-width: 768px) {
    .releases-list {
        /* Gunakan !important untuk memastikan tidak ada yang membantah */
        grid-template-columns: 1fr !important; 
        gap: 1rem;
    }
    
    .release-item {
        padding: 0.8rem;
    }
    
    .release-item .item-image {
        width: 70px; /* Perkecil sedikit gambar di HP */
        height: 98px;
    }
}

/* --- [6] Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    color: #ccc;
    text-decoration: none;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    background-color: var(--sidebar-bg);
    font-size: 0.9rem;
}
.pagination a:hover { background-color: var(--highlight-bg); }
.pagination a.current {
    background-color: var(--brand-color);
    color: #111;
    font-weight: bold;
}
.pagination .page-dots { background: none; }
.pagination span.disabled {
    background-color: #2a2a30;
    color: #555;
    cursor: not-allowed;
}

/* --- [7] Ad Space (Manual & Dynamic) --- */
.ad-space, .dynamic-ad-slot {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 20px 0 !important;
    padding: 0 !important;
    background-color: transparent !important;
    box-sizing: border-box !important;
}
.ad-space a, .dynamic-ad-slot a {
    display: block !important;
    width: 100% !important;
    max-width: 728px !important;
    text-decoration: none !important;
    margin: 0 auto !important;
    transition: transform 0.2s ease;
}
.ad-space a:hover, .dynamic-ad-slot a:hover {
    transform: scale(1.02);
}
.ad-space img, .dynamic-ad-slot img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    display: block !important;
    border-radius: 4px !important;
    object-fit: contain !important;
}
/* Stacked Ads */
.comic-ads-stacked {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 20px 0;
    gap: 0;
}
.comic-ads-stacked .dynamic-ad-slot {
    margin: 0 !important;
    padding: 0 !important;
}

/* --- [8] Footer --- */
.site-footer {
    background-color: var(--navbar-bg);
    color: #999;
    padding: 2rem 1rem;
    margin-top: 3rem;
    border-top: 1px solid #333;
}
.footer-content { max-width: 1200px; margin: 0 auto; text-align: center; }
.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin-bottom: 1rem;
}
.footer-links a { color: #ccc; text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: var(--brand-color); }
.footer-text { font-size: 0.85rem; margin: 1rem 0; }
.footer-copyright { font-size: 0.8rem; color: #777; }

/* --- [9] Genres Widget --- */
.genres-widget .genres-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.genres-widget .genre-tag {
    background-color: #333;
    color: #ccc;
    text-decoration: none;
    font-size: 0.8rem;
    padding: 0.4rem 0.7rem;
    border-radius: 4px;
    transition: background 0.3s;
}
.genres-widget .genre-tag:hover { background-color: var(--brand-color); color: #111; }

/* --- [10] Bookmark & History Styles --- */
.bookmark-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--sidebar-bg);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}
.bookmark-buttons { display: flex; gap: 0.5rem; margin-top: 1rem; }
.btn-export, .btn-import, .btn-select, .btn-delete {
    background-color: #333;
    color: #fff;
    border: none;
    font-size: 0.8rem;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    border-radius: 4px;
}
.btn-delete { background-color: #E60023; display: none; }
.page-title { font-size: 1.6rem; color: #fff; margin-bottom: 1rem; }
.bookmark-checkbox {
    display: none;
    position: absolute;
    top: 10px;
    left: 10px;
    width: 20px;
    height: 20px;
    z-index: 10;
}
/* Style tambahan untuk mode edit di list */
#bookmark-grid.edit-mode .list-card, #history-grid.edit-mode .list-card {
    position: relative;
}
#bookmark-grid.edit-mode .bookmark-checkbox, 
#history-grid.edit-mode .bookmark-checkbox {
    display: block;
}
#bookmark-grid.edit-mode .list-card:has(.bookmark-checkbox:checked) img,
#history-grid.edit-mode .list-card:has(.bookmark-checkbox:checked) img {
    opacity: 0.5;
    border: 2px solid var(--brand-color);
}

/* --- FIX: Styles for 'list-card' (used in Manga List, Bookmark, History) --- */
.list-card a { text-decoration: none; color: inherit; display: block; }
.list-card .list-card-image {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 6px;
    background-color: #222;
    margin-bottom: 0.5rem;
}
.list-card .list-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.list-card:hover .list-card-image img { transform: scale(1.05); }
.list-card-info h3 {
    font-size: 0.95rem;
    margin: 0.5rem 0 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}
.list-card-info .chapter-info { font-size: 0.85rem; color: #999; }

/* --- [11] Styles for Reader Images --- */
#reader-images-container img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* --- Disqus Styles --- */
#disqus_thread { margin-top: 2rem; padding: 1rem; background: var(--sidebar-bg); border-radius: 8px; }
#disqus_thread a { color: var(--brand-color) !important; }

/* Tambahkan di style.css */
.chapter-date, .chat-time {
    font-size: 0.75rem;     /* Ukuran huruf kecil */
    color: #888;            /* Warna abu-abu */
    font-weight: normal;    /* Tidak tebal */
    font-style: italic;     /* Miring (opsional, biar estetik) */
    margin-left: 5px;
}

/* --- PERBAIKAN TOMBOL VIEW ALL (Styling Baru) --- */
.view-all-btn {
    background-color: transparent; /* Latar transparan agar elegan */
    color: var(--brand-color);     /* Warna Teks Kuning */
    border: 1px solid var(--brand-color); /* Garis pinggir Kuning */
    text-decoration: none;
    padding: 0.4rem 1rem;          /* Ruang dalam tombol */
    border-radius: 20px;           /* Bentuk bulat (Pill Shape) */
    font-size: 0.85rem;
    font-weight: bold;
    white-space: nowrap;
    transition: all 0.3s ease;     /* Animasi halus */
    
    /* Flexbox untuk merapikan jika nanti ada ikon panah */
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Efek saat mouse diarahkan (Hover) */
.view-all-btn:hover {
    background-color: var(--brand-color); /* Berubah jadi Kuning penuh */
    color: #111;                          /* Teks jadi Hitam */
    transform: translateY(-2px);          /* Tombol naik sedikit */
    box-shadow: 0 4px 12px rgba(251, 192, 45, 0.4); /* Efek cahaya (Glow) */
}

/* (Opsional) Tambahkan panah otomatis lewat CSS */
.view-all-btn::after {
    content: '→'; /* Simbol panah kanan */
    font-size: 1.1em;
    transition: transform 0.3s ease;
}

.view-all-btn:hover::after {
    transform: translateX(3px); /* Panah bergerak ke kanan saat hover */
}


/* =========================================
   [TAMBAHAN] BINTANG & GENRE RAPI
   ========================================= */

/* --- 2. Styling Genre Sidebar (Scrollable & Rapi) --- */
/* Pastikan class induknya sesuai dengan HTML lama Anda (misal .genres-widget atau .widget-box) */

.genres-widget .genres-list, 
#genres-list-container { /* Support ID atau Class */
    display: flex;
    flex-wrap: wrap;
    gap: 6px; /* Jarak rapat */
    
    /* KUNCI AGAR RAPI: Batasi tinggi & Scroll */
    max-height: 300px; 
    overflow-y: auto; 
    padding-right: 5px;
}

/* Scrollbar Tipis Cantik */
.genres-widget .genres-list::-webkit-scrollbar,
#genres-list-container::-webkit-scrollbar { width: 4px; }

.genres-widget .genres-list::-webkit-scrollbar-thumb,
#genres-list-container::-webkit-scrollbar-thumb { background: #444; border-radius: 2px; }

/* Tombol Genre */
.genre-tag {
    background-color: #333;
    color: #ccc;
    text-decoration: none;
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    flex-grow: 1; /* Isi ruang kosong */
    text-align: center;
    border: 1px solid transparent;
    transition: 0.2s;
}

.genre-tag:hover {
    background-color: #fbc02d; /* Warna Brand */
    color: #000;
    border-color: #fbc02d;
    font-weight: bold;
}

/* =========================================
   [TAMBAHAN] STYLE BINTANG RATING 5
   ========================================= */
/* --- 1. Styling Bintang (Rating) --- */
.pop-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: #ccc;
    margin-top: 4px;
}

.pop-img-box, .card-image-container {
    aspect-ratio: 3 / 4; /* Rasio standar komik */
    background-color: #222; /* Placeholder warna gelap */
    display: block;
}
   

.rating {
    display: flex;
    align-items: center;
    gap: 6px; /* Jarak antara bintang dan angka */
    margin-top: 5px;
    font-size: 0.85rem;
    color: #ccc;
}

.stars-container {
    display: inline-flex;
    line-height: 1;
    letter-spacing: -1px; /* Rapatkan jarak antar bintang */
}

.star {
    font-size: 14px; /* Ukuran Bintang */
}

.star.full {
    color: #fbc02d; /* Warna Emas Penuh */
}

.star.half {
    color: #fbc02d; 
    opacity: 0.6; /* Warna Emas Pudar untuk setengah */
}

.star.empty {
    color: #444; /* Warna Abu-abu untuk kosong */
}

.score-val {
    font-weight: bold;
    color: #fff;
    font-size: 0.8rem;
    margin-top: 1px; /* Penyesuaian vertikal */
}