/*
Theme Name: Novel Full
Theme URI: https://novel.darulhikmah.or.id
Author: Tiko
Description: Tema novel terinspirasi novelfull.com — bersih, responsif, dark mode.
Version: 1.0.0
License: GPL v2 or later
Text Domain: novel-full
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 14px; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f4f4f4; color: #333; line-height: 1.5;
}
a { color: #428bca; text-decoration: none; }
a:hover { color: #2a6496; text-decoration: underline; }
img { max-width: 100%; height: auto; vertical-align: middle; }
ul, ol { list-style: none; padding: 0; margin: 0; }
.container { max-width: 1170px; margin: 0 auto; padding: 0 15px; }
.row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.clearfix::after { content: ''; display: table; clear: both; }

/* ===== GRID ===== */
.col-xs-12 { width: 100%; padding: 0 15px; }
@media (min-width: 768px) {
    .col-sm-3 { width: 25%; }
    .col-sm-4 { width: 33.333%; }
    .col-sm-6 { width: 50%; }
    .col-sm-8 { width: 66.666%; }
    .col-sm-9 { width: 75%; }
    [class*="col-sm"] { float: left; padding: 0 15px; }
}
@media (min-width: 992px) {
    .col-md-2 { width: 16.666%; }
    .col-md-3 { width: 25%; }
    .col-md-4 { width: 33.333%; }
    .col-md-6 { width: 50%; }
    .col-md-8 { width: 66.666%; }
    .col-md-9 { width: 75%; }
    [class*="col-md"] { float: left; padding: 0 15px; }
}
.row::after { content: ''; display: table; clear: both; }

/* ===== HEADER ===== */
.header {
    background: #fff; border-bottom: 1px solid #e7e7e7;
    position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    max-width: 1170px; margin: 0 auto; padding: 0 15px; height: 56px;
}
.header-logo { font-size: 1.3rem; font-weight: 700; color: #333; }
.header-logo:hover { text-decoration: none; color: #428bca; }
.header-logo span { color: #428bca; }
.search-form { display: flex; align-items: center; flex: 0 1 320px; }
.search-form input {
    width: 100%; padding: 6px 12px; border: 1px solid #ccc;
    border-radius: 4px 0 0 4px; font-size: 13px; outline: none;
}
.search-form button {
    padding: 6px 12px; background: #428bca; color: #fff; border: 1px solid #428bca;
    border-radius: 0 4px 4px 0; cursor: pointer; font-size: 13px;
}
.header-nav { display: flex; align-items: center; gap: 5px; }
.header-nav a {
    padding: 6px 10px; color: #555; font-size: 13px; border-radius: 3px;
}
.header-nav a:hover { background: #f0f0f0; color: #333; text-decoration: none; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; padding: 5px; }

/* ===== GENRE TABS ===== */
.genre-tabs {
    background: #fff; border-bottom: 1px solid #e7e7e7;
    overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch;
}
.genre-tabs-inner {
    max-width: 1170px; margin: 0 auto; padding: 0 15px;
    display: flex; align-items: center; gap: 2px;
}
.genre-tabs .tab-label {
    font-weight: 700; font-size: 13px; color: #428bca; padding: 10px 12px 10px 0; white-space: nowrap;
}
.genre-tabs a {
    display: inline-block; padding: 10px 8px; font-size: 12px; color: #666;
    white-space: nowrap; border-bottom: 2px solid transparent;
}
.genre-tabs a:hover, .genre-tabs a.active { color: #428bca; border-bottom-color: #428bca; text-decoration: none; }

/* ===== HERO / HOT NOVEL SECTION ===== */
.hero-section { background: #fff; padding: 20px 0; }
.section-title {
    font-size: 1.1rem; font-weight: 700; color: #333;
    padding-bottom: 10px; margin-bottom: 15px; border-bottom: 2px solid #428bca;
    display: flex; align-items: center; gap: 8px;
}
.section-title .hot-icon { color: #fd8383; }
.novel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}
.novel-card {
    background: #fff; border-radius: 4px; overflow: hidden;
    transition: transform 0.15s; border: 1px solid #eee;
}
.novel-card:hover { transform: translateY(-2px); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.novel-card .cover {
    aspect-ratio: 3/4; background: #f0f0f0; display: flex; align-items: center; justify-content: center;
    overflow: hidden; position: relative;
}
.novel-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.novel-card .cover .no-cover {
    color: #999; font-size: 2rem; opacity: 0.3;
}
.novel-card .info { padding: 8px; }
.novel-card .title {
    font-size: 13px; font-weight: 600; color: #333;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    line-height: 1.3; min-height: 2.6em;
}
.novel-card .title:hover { color: #428bca; }
.novel-card .meta { font-size: 11px; color: #888; margin-top: 4px; }
.novel-card .label {
    display: inline-block; font-size: 10px; padding: 1px 4px; border-radius: 2px;
    margin-right: 3px; font-weight: 600; text-transform: uppercase;
}
.label-hot { background: #fd8383; color: #fff; }
.label-full { background: #86ad86; color: #fff; }
.label-new { background: #8eb3fd; color: #fff; }

/* ===== LATEST RELEASE ===== */
.latest-section { padding: 20px 0; }
.latest-list { background: #fff; border: 1px solid #eee; border-radius: 4px; }
.latest-item {
    display: flex; align-items: center; padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0; gap: 10px;
}
.latest-item:last-child { border-bottom: none; }
.latest-item:hover { background: #fafafa; }
.latest-item .num { width: 28px; font-size: 13px; font-weight: 700; color: #aaa; text-align: center; }
.latest-item .thumb {
    width: 40px; height: 54px; background: #f0f0f0; border-radius: 2px; overflow: hidden; flex-shrink: 0;
}
.latest-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.latest-item .info { flex: 1; min-width: 0; }
.latest-item .novel-title { font-size: 13px; font-weight: 600; color: #333; }
.latest-item .novel-title:hover { color: #428bca; }
.latest-item .chapter-title { font-size: 12px; color: #888; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.latest-item .genre { font-size: 11px; color: #428bca; }
.latest-item .time { font-size: 11px; color: #aaa; white-space: nowrap; }

/* ===== SIDEBAR ===== */
.sidebar-section { padding: 20px 0; }
.sidebar-box {
    background: #fff; border: 1px solid #eee; border-radius: 4px; margin-bottom: 15px;
}
.sidebar-box .box-title {
    font-size: 14px; font-weight: 700; padding: 10px 12px;
    border-bottom: 1px solid #eee; color: #333;
}
.sidebar-box .box-content { padding: 10px 12px; }

/* ===== NOVEL DETAIL ===== */
.novel-detail { padding: 20px 0; }
.novel-detail .cover-col { text-align: center; }
.novel-detail .cover-main {
    width: 220px; margin: 0 auto; border-radius: 4px; overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.novel-detail .cover-main img { width: 100%; display: block; }
.novel-detail .info-col { padding: 0 20px; }
.novel-detail h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 10px; }
.novel-detail .meta-row { margin-bottom: 6px; font-size: 13px; color: #666; }
.novel-detail .meta-row strong { color: #333; display: inline-block; min-width: 100px; }
.novel-detail .genre-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; }
.novel-detail .genre-tag {
    padding: 3px 8px; background: #f0f0f0; border-radius: 3px; font-size: 12px; color: #555;
}
.novel-detail .genre-tag:hover { background: #428bca; color: #fff; text-decoration: none; }
.novel-detail .status-badge {
    display: inline-block; padding: 3px 10px; border-radius: 3px;
    font-size: 12px; font-weight: 600; color: #fff;
}
.status-ongoing { background: #5cb85c; }
.status-completed { background: #888; }
.novel-detail .rating {
    display: flex; align-items: center; gap: 5px; margin: 10px 0;
}
.novel-detail .rating .stars { color: #f5a623; font-size: 1.1rem; }
.novel-detail .rating .score { font-size: 1.1rem; font-weight: 700; }
.novel-detail .rating .total { font-size: 12px; color: #888; }
.novel-detail .desc {
    margin: 15px 0; font-size: 14px; line-height: 1.7; color: #555;
    max-height: 150px; overflow: hidden; position: relative;
}
.novel-detail .desc.expanded { max-height: none; }
.novel-detail .desc-toggle {
    color: #428bca; cursor: pointer; font-size: 13px; display: inline-block; margin-top: 5px;
}

/* ===== CHAPTER LIST ===== */
.chapter-list-section { padding: 0 0 20px; }
.chapter-list-box { background: #fff; border: 1px solid #eee; border-radius: 4px; }
.chapter-list-box .list-title {
    font-size: 14px; font-weight: 700; padding: 12px 15px;
    border-bottom: 1px solid #eee;
}
.chapter-list { max-height: 500px; overflow-y: auto; }
.chapter-item {
    display: flex; align-items: center; padding: 8px 15px;
    border-bottom: 1px solid #f5f5f5; font-size: 13px;
}
.chapter-item:hover { background: #fafafa; }
.chapter-item .ch-num { width: 40px; color: #aaa; font-weight: 600; }
.chapter-item .ch-title { flex: 1; color: #333; }
.chapter-item .ch-title:hover { color: #428bca; }
.chapter-item .ch-date { font-size: 11px; color: #aaa; white-space: nowrap; }

/* ===== READING PAGE ===== */
.reading-page { padding: 20px 0; max-width: 800px; margin: 0 auto; }
.reading-page .novel-title {
    text-align: center; font-size: 1.2rem; margin-bottom: 5px;
}
.reading-page .chapter-title {
    text-align: center; font-size: 1.1rem; color: #555; margin-bottom: 15px;
}
.chapter-nav {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; margin: 15px 0; flex-wrap: wrap;
}
.chapter-nav .btn {
    padding: 8px 16px; background: #fff; border: 1px solid #ddd; border-radius: 4px;
    font-size: 13px; color: #333; cursor: pointer; transition: 0.15s;
}
.chapter-nav .btn:hover { background: #f5f5f5; border-color: #428bca; color: #428bca; text-decoration: none; }
.chapter-nav select {
    padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px;
    font-size: 13px; max-width: 200px;
}
.chapter-content {
    background: #fff; padding: 30px 25px; border-radius: 4px;
    border: 1px solid #eee; line-height: 1.8; font-size: 16px; color: #333;
}
.chapter-content p { margin-bottom: 15px; }
.dark-background .chapter-content { background: #1a1a2e; color: rgba(255,255,255,0.8); border-color: #333; }

/* ===== FOOTER ===== */
.footer {
    background: #f8f8f8; border-top: 1px solid #e7e7e7;
    padding: 20px 0; margin-top: 30px; font-size: 13px; color: #666;
}
.footer-inner { max-width: 1170px; margin: 0 auto; padding: 0 15px; text-align: center; }

/* ===== DARK MODE ===== */
body.dark-background { background: #121212; color: #aaa; }
.dark-background .header { background: #1a1a1a; border-color: #333; }
.dark-background .header-logo { color: #ddd; }
.dark-background .header-nav a { color: #999; }
.dark-background .header-nav a:hover { background: #333; }
.dark-background .search-form input { background: #2a2a2a; border-color: #444; color: #ddd; }
.dark-background .search-form button { background: #333; border-color: #444; }
.dark-background .genre-tabs { background: #1a1a1a; border-color: #333; }
.dark-background .genre-tabs a { color: #999; }
.dark-background .hero-section { background: #1a1a1a; }
.dark-background .novel-card { background: #222; border-color: #333; }
.dark-background .novel-card .title { color: #ddd; }
.dark-background .novel-card .cover { background: #2a2a2a; }
.dark-background .section-title { color: #ddd; border-color: #555; }
.dark-background .latest-list, .dark-background .sidebar-box, 
.dark-background .chapter-list-box, .dark-background .novel-detail .cover-main { background: #1a1a1a; border-color: #333; }
.dark-background .latest-item { border-color: #2a2a2a; }
.dark-background .latest-item:hover { background: #222; }
.dark-background .latest-item .novel-title { color: #ddd; }
.dark-background .chapter-item { border-color: #2a2a2a; }
.dark-background .chapter-item .ch-title { color: #ccc; }
.dark-background .chapter-item:hover { background: #222; }
.dark-background .footer { background: #1a1a1a; border-color: #333; color: #888; }

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
    .header-inner { height: auto; padding: 10px 15px; flex-wrap: wrap; gap: 8px; }
    .header-logo { font-size: 1.1rem; }
    .search-form { flex: 1; min-width: 140px; order: 3; }
    .header-nav { display: none; }
    .nav-toggle { display: block; }
    .header-nav.open { display: flex; flex-direction: column; width: 100%; gap: 2px; }
    .genre-tabs a { padding: 8px 6px; font-size: 11px; }
    .novel-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
    .novel-card .title { font-size: 12px; }
    .latest-item .num { display: none; }
    .latest-item .thumb { width: 32px; height: 44px; }
    .reading-page .chapter-content { padding: 20px 15px; font-size: 15px; }
}
@media (max-width: 480px) {
    .novel-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .novel-card .info { padding: 6px; }
    .novel-card .title { font-size: 11px; }
}
