

/*
Theme Name: Manga Reader Pro
Theme URI: https://qx.bznio.my.id/
Author: Yozora
Author URI: https://qx.bznio.my.id/
Description: Tema WordPress premium untuk website manga dan anime reader. Mendukung tampilan responsif, slider unggulan, dan integrasi meta box untuk manga terbaru.
Version: 1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: manga, anime, responsive, slider, reader, dark-mode, seo-friendly
Text Domain: manga-reader-pro
*/


/* =========================
   GLOBAL
========================= */
html, body {
    height: 100%;
    margin: 0;
    font-family: Arial, sans-serif;
}

body {
    background:#0b0b0b;
    color:#fff;
}

.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1;
    padding: 20px;
}

/* =========================
   FOOTER / HOVER
========================= */
.footer-menu a:hover,
.footer-social a:hover {
    color: #ff6600;
}

/* =========================
   HOME LAYOUT
========================= */
.home-wrapper{
    max-width:1200px;
    margin:auto;
    padding:20px;
}

.home-content{
    display:grid;
    grid-template-columns:70% 30%;
    gap:25px;
}

@media(max-width:900px){
    .home-content{
        grid-template-columns:1fr;
    }
}

/* =========================
   MANGA GRID / CARD
========================= */
.manga-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
    gap:16px;
}

.manga-card{
    background:#111;
    border-radius:12px;
    overflow:hidden;
    transition:.25s;
}

.manga-card:hover{
    transform:translateY(-5px);
}

.manga-card img{
    width:100%;
    height:230px;
    object-fit:cover;
}

.manga-card h4,
.manga-title{
    font-size:14px;
    font-weight:600;
    color:#fff;
    margin:8px 10px 2px;
}

.manga-chapter{
    font-size:12px;
    color:#aaa;
    margin:0 10px 10px;
}

/* =========================
   HOME SLIDER
========================= */
.home-slider-top{
    margin:30px 0;
}

.slider-track{
    display:flex;
    gap:12px;
    overflow-x:auto;
    scroll-behavior:smooth;
}

.slider-track::-webkit-scrollbar{
    display:none;
}

.slider-item{
    width:180px;
    background:#111;
    border-radius:14px;
    overflow:hidden;
    position:relative;
}

.slider-item img{
    width:100%;
    height:280px;
    object-fit:cover;
}

.slider-item .title{
    position:absolute;
    bottom:0;
    left:0;
    right:0;
    padding:20px 12px 10px;
    font-size:14px;
    font-weight:600;
    color:#fff;
    background:linear-gradient(
        to top,
        rgba(0,0,0,.95),
        rgba(0,0,0,.3),
        transparent
    );
    text-shadow:0 2px 4px rgba(0,0,0,1);
}

/* =========================
   SINGLE MANGA PAGE (FIX)
========================= */
body.single-manga{
    background:#0b0b0b;
    color:#ddd;
}

.manga-detail-wrapper{
    max-width:1200px;
    margin:30px auto;
    padding:0 15px;
}

/* HEADER */
.manga-header{
    display:flex;
    gap:30px;
    background:#121212;
    padding:20px;
    border-radius:14px;
    box-shadow:0 10px 40px rgba(0,0,0,.6);
}

.manga-cover img{
    width:220px;
    aspect-ratio:2/3;
    object-fit:cover;
    border-radius:12px;
}

/* INFO */
.manga-info{
    flex:1;
    display:flex;
    flex-direction:column;
    gap:14px;
}

.manga-info h1{
    font-size:28px;
    font-weight:700;
    color:#fff;
    margin:0;
}

/* META */
.manga-meta{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px 20px;
}

.manga-meta span{
    background:#1c1c1c;
    padding:6px 10px;
    border-radius:8px;
    font-size:14px;
    color:#ccc;
}

.manga-meta strong{
    color:#fff;
}

/* TEXT */
.manga-info p{
    font-size:14px;
    line-height:1.7;
    color:#bbb;
    margin:0;
}

.manga-info p:last-of-type{
    background:#181818;
    padding:14px;
    border-left:4px solid #ff3b3b;
    border-radius:6px;
}

/* =========================
   CHAPTER LIST
========================= */
.chapter-box{
    margin-top:30px;
    background:#121212;
    border-radius:14px;
    padding:15px;
}

.chapter-box::before{
    content:"Daftar Chapter";
    display:block;
    font-weight:600;
    margin-bottom:12px;
}

.chapter-list{
    display:flex;
    flex-direction:column;
    gap:10px;
    max-height:420px;
    overflow-y:auto;
}

.chapter-list a{
    display:flex;
    gap:12px;
    padding:10px;
    border-radius:10px;
    background:#1a1a1a;
    text-decoration:none;
}

.chapter-list a:hover{
    background:#262626;
}

.chapter-list img{
    width:90px;
    height:60px;
    object-fit:cover;
    border-radius:8px;
}

.chapter-list div{
    color:#eee;
    font-size:14px;
}

/* =========================
   MOBILE
========================= */
@media(max-width:768px){
    .manga-header{
        flex-direction:column;
        text-align:center;
    }

    .manga-cover img{
        width:180px;
    }

    .manga-meta{
        grid-template-columns:1fr;
    }
}








/* =========================
   SLIDER FIX SHADOW & TITLE
========================= */

.slider-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 10px 5px 20px;
}

.slider-track::-webkit-scrollbar {
    display: none;
}

.slider-item {
    position: relative;
    min-width: 180px;
    height: 280px;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 12px 25px rgba(0,0,0,.55);
    transition: transform .25s ease, box-shadow .25s ease;
}

.slider-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0,0,0,.8);
}

/* IMAGE */
.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* DARK OVERLAY GRADIENT */
.slider-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,.95) 0%,
        rgba(0,0,0,.5) 35%,
        rgba(0,0,0,.15) 60%,
        rgba(0,0,0,0) 100%
    );
    z-index: 1;
}

/* LINK WRAP */
.slider-item a {
    position: absolute;
    inset: 0;
    z-index: 2;
    text-decoration: none;
}

/* TITLE */
.slider-item .title {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    z-index: 3;
    text-shadow: 0 2px 6px rgba(0,0,0,.9);
}

.slider-badge{
    position:absolute;
    top:10px;
    left:10px;

    display:inline-flex;        /* PENTING */
    align-items:center;
    justify-content:center;

    width:auto !important;      /* PAKSA */
    max-width:fit-content;
    white-space:nowrap;

    background:#ff2d2d;
    color:#fff;
    font-size:11px;
    font-weight:700;
    padding:4px 8px;
    border-radius:6px;

    z-index:5;
    box-shadow:0 3px 10px rgba(0,0,0,.6);
}





/* =========================================
   CHAPTER READER FIX (ONLY CHAPTER PAGE)
   ========================================= */

/* Container utama chapter */
.chapter-container {
    padding: 0 !important;
}

/* Area isi chapter */
.chapter-container .chapter-content {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0; /* penting biar gambar nempel */
}

/* Semua gambar manga */
.chapter-container .chapter-content img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important; /* HILANGKAN RADIUS */
}

/* Antisipasi kalau ada p / figure nyempil */
.chapter-container .chapter-content p,
.chapter-container .chapter-content figure {
    margin: 0 !important;
    padding: 0 !important;
}

/* Kalau tema kasih efek shadow / rounded */
.chapter-container img {
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* =========================================
   ANTI DOWNLOAD IMAGE (CHAPTER ONLY)
   ========================================= */

.chapter-container img {
    pointer-events: none;        /* blok klik & long tap */
    -webkit-user-drag: none;     /* blok drag (Chrome/Safari) */
    user-select: none;           /* blok select */
    -webkit-touch-callout: none; /* blok save image (iOS) */
}

.chapter-container {
    -webkit-user-select: none;
    user-select: none;
}











/* =================================================
   HEADER FINAL FIX (ANTI NABRAK DESKTOP & MOBILE)
================================================= */

.site-header{
    position:sticky;
    top:0;
    z-index:999;
    background:#0f0f0f;
    border-bottom:1px solid #222;
}

/* ===== GRID HEADER (INI KUNCINYA) ===== */
.header-inner{
    max-width:1200px;
    margin:auto;
    padding:12px 16px;

    display:grid;
    grid-template-columns:
        auto        /* LOGO */
        minmax(260px, 1fr) /* SEARCH */
        auto;       /* RIGHT ZONE */

    align-items:center;
    column-gap:16px;
}

/* ===== LOGO ===== */
.site-logo{
    white-space:nowrap;
}

.site-logo a,
.site-logo img{
    color:#fff;
    font-size:22px;
    font-weight:700;
    text-decoration:none;
    max-height:38px;
}

/* ===== SEARCH ===== */
.header-search{
    position:relative;
    width:100%;
}

.header-search input{
    width:100%;
    padding:10px 14px;
    border-radius:10px;
    border:1px solid #222;
    background:#171717;
    color:#fff;
    font-size:14px;
    outline:none;
}

.header-search input::placeholder{
    color:#888;
}

/* SEARCH RESULT */
#search-results{
    position:absolute;
    top:110%;
    left:0;
    width:100%;
    background:#171717;
    border:1px solid #222;
    border-radius:10px;
    display:none;
    max-height:260px;
    overflow-y:auto;
    z-index:9999;
}

#search-results li{list-style:none}

#search-results a.search-item{
    display:flex;
    align-items:center;
    gap:12px;
    padding:10px 14px;
    text-decoration:none;
}

#search-results a.search-item:hover{
    background:#222;
}

#search-results img{
    width:42px;
    height:60px;
    object-fit:cover;
    border-radius:6px;
    background:#333;
}

#search-results span{
    color:#ddd;
    font-size:14px;
}

/* ===== RIGHT ZONE (18+ + MENU) ===== */
.toggle-18plus{
    display:flex;
    align-items:center;
    gap:10px;
    white-space:nowrap;
}

/* 18+ SWITCH */
.toggle-18plus label{
    display:flex;
    align-items:center;
    gap:6px;
    font-size:13px;
    color:#ccc;
    cursor:pointer;
}

.toggle-18plus input{
    appearance:none;
    width:36px;
    height:18px;
    background:#333;
    border-radius:18px;
    position:relative;
}

.toggle-18plus input::before{
    content:"";
    width:14px;
    height:14px;
    background:#aaa;
    border-radius:50%;
    position:absolute;
    top:2px;
    left:2px;
    transition:.2s;
}

.toggle-18plus input:checked{
    background:#ff4d4d;
}

.toggle-18plus input:checked::before{
    transform:translateX(18px);
    background:#fff;
}

/* NAV */
.main-nav ul{
    list-style:none;
    display:flex;
    gap:16px;
    margin:0;
    padding:0;
}

.main-nav a{
    color:#ccc;
    text-decoration:none;
    font-size:14px;
}

.main-nav a:hover{
    color:#fff;
}

/* MOBILE BUTTON */
.menu-toggle{
    display:none;
    font-size:24px;
    cursor:pointer;
    color:#fff;
}

/* =================================================
   MOBILE (BENAR, TIDAK JELEK)
================================================= */
@media(max-width:768px){

    .header-inner{
        grid-template-columns: auto auto;
        grid-template-areas:
            "logo right"
            "search search";
        row-gap:12px;
    }

    .site-logo{grid-area:logo}
    .toggle-18plus{
        grid-area:right;
        justify-content:flex-end;
    }

    .menu-toggle{
        display:block;
        margin-left:10px;
    }

    .header-search{
        grid-area:search;
    }

    .main-nav{
        position:absolute;
        top:100%;
        left:0;
        width:100%;
        background:#0f0f0f;
        border-top:1px solid #222;
        display:none;
    }

    .main-nav.active{
        display:block;
    }

    .main-nav ul{
        flex-direction:column;
        padding:14px;
        gap:12px;
    }
}






/* slider hero */

/* ===============================
   HERO SLIDER FIX (ANTI POLOS)
================================ */

.hero-slider {
    position: relative;
    margin-bottom: 30px;
}

.heroSwiper {
    border-radius: 16px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(14px);
    transform: scale(1.15);
}

/* OVERLAY GRADIENT (INI KUNCI) */
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            rgba(10,10,10,0.95) 0%,
            rgba(10,10,10,0.75) 35%,
            rgba(10,10,10,0.2) 60%,
            rgba(0,0,0,0.05) 100%
        );
}

/* SLIDE */
.heroSwiper .swiper-slide {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
}

/* CONTENT */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 520px;
    padding: 40px 50px;
    color: #fff;
}

.hero-content .chapter {
    font-size: 14px;
    opacity: .85;
}

.hero-content .title {
    font-size: 32px;
    font-weight: 800;
    margin: 10px 0;
}

.hero-content .desc {
    font-size: 15px;
    line-height: 1.6;
    opacity: .9;
    margin-bottom: 15px;
}

/* GENRE */
.hero-content .genres span {
    display: inline-block;
    border: 1px solid rgba(255,255,255,.3);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    margin-right: 6px;
    margin-bottom: 6px;
}

/* BUTTON */
.btn-read {
    display: inline-block;
    margin-top: 15px;
    background: #ffd400;
    color: #000;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
}

.btn-read:hover {
    background: #ffea00;
}

/* HERO IMAGE (KANAN) */
.hero-image {
    position: absolute;
    right: 40px;
    bottom: 0;
    z-index: 2;
}

.hero-image img {
    max-height: 380px;
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(0,0,0,.6);
}

/* MOBILE */
@media(max-width:768px){

    .heroSwiper .swiper-slide {
        min-height: 360px;
    }

    .hero-content {
        padding: 24px;
        max-width: 100%;
    }

    .hero-content .title {
        font-size: 22px;
    }

    /* TAMPILKAN GAMBAR DI MOBILE */
    .hero-image {
        position: absolute;
        right: 10px;
        bottom: 10px;
        opacity: 0.35;
        pointer-events: none;
    }

    .hero-image img {
        max-height: 220px;
        border-radius: 12px;
        box-shadow: 0 10px 25px rgba(0,0,0,.5);
    }
}





/* =========================
   HERO DESC REAL FIX
========================= */

/* DESKTOP */
.hero-slider .hero-content .desc-desktop{
    display:block !important;
}

.hero-slider .hero-content .desc-mobile{
    display:none !important;
}

/* MOBILE */
@media (max-width:768px){
    .hero-slider .hero-content .desc-desktop{
        display:none !important;
    }

    .hero-slider .hero-content .desc-mobile{
        display:block !important;
    }
}






/* =========================
   LATEST UPDATE (LASTED)
========================= */

/* Section */
.lasted-section {
    max-width: 1600px;      /* cegah jumbo di layar gede */
    margin: 25px auto;
    padding: 0 10px;
}

.lasted-section .section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

/* =========================
   GRID
========================= */

.lasted-box {
    display: grid;
    grid-template-columns: repeat(9, minmax(130px, 1fr)); /* DESKTOP FULL */
    gap: 15px;
}

/* Laptop */
@media (max-width: 1400px) {
    .lasted-box {
        grid-template-columns: repeat(9, 1fr);
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .lasted-box {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Mobile */
@media (max-width: 600px) {
    .lasted-box {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =========================
   CARD
========================= */

.lasted-item {
    background: #111;
    border-radius: 10px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

.lasted-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,.35);
}

.lasted-item a {
    color: #fff;
    text-decoration: none;
    display: block;
}

/* Image */
.lasted-item img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
}

/* =========================
   INFO
========================= */

.lasted-info {
    padding: 10px;
}

.lasted-info h5 {
    font-size: 14px;
    line-height: 1.3;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lasted-info span {
    font-size: 12px;
    color: #aaa;
}



body.hide-adult .adult {
    display: none !important;
}

body.hide-adult .lasted-item.adult {
    display: none !important;
}
