/*
Theme Name: Novel Seru
Theme URI: https://novel.darulhikmah.or.id
Author: Timo
Description: Tema kustom dark untuk website novel — nyaman dibaca, elegan, responsif.
Version: 1.1.0
License: GPL v2 or later
Text Domain: novel-seru
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #0a0a14;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(245,176,66,0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(46,158,58,0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(100,50,200,0.02) 0%, transparent 50%);
    color: #e0e0e0;
    line-height: 1.8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: #f5b042; text-decoration: none; transition: color .2s; }
a:hover { color: #ffd700; }

img { max-width: 100%; height: auto; }

/* Subtle dot pattern overlay */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    z-index: 0;
}

.site-content { position: relative; z-index: 1; }

/* ===== HEADER ===== */
.site-header {
    background: rgba(10, 10, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(245, 176, 66, 0.2);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.site-branding { display: flex; align-items: center; gap: 15px; }

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}
.site-title a { color: #f5b042; }
.site-title a:hover { color: #ffd700; }

.site-tagline {
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
    display: none;
}

/* ===== NAVIGATION ===== */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 5px;
    flex-wrap: wrap;
}

.main-nav ul li a {
    display: block;
    padding: 8px 16px;
    color: #ccc;
    font-size: 0.95rem;
    border-radius: 6px;
    transition: all .2s;
}

.main-nav ul li a:hover,
.main-nav ul li.current-menu-item a {
    background: rgba(245, 176, 66, 0.15);
    color: #f5b042;
}

.menu-toggle {
    display: none;
    background: none;
    border: 2px solid #f5b042;
    color: #f5b042;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
}

/* ===== MAIN CONTENT ===== */
.site-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    width: 100%;
}

/* ===== HERO SECTION (Front Page) ===== */
.hero-section {
    text-align: center;
    padding: 80px 20px;
    margin-bottom: 50px;
    background: linear-gradient(135deg, rgba(26,26,46,0.9), rgba(22,33,62,0.9)), url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23f5b042" fill-opacity="0.03"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
    border-radius: 16px;
    border: 1px solid rgba(245, 176, 66, 0.15);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '📖';
    position: absolute;
    top: -30px;
    right: -30px;
    font-size: 120px;
    opacity: 0.04;
    transform: rotate(15deg);
}

.hero-section::after {
    content: '📚';
    position: absolute;
    bottom: -20px;
    left: -20px;
    font-size: 100px;
    opacity: 0.04;
    transform: rotate(-10deg);
}

.hero-section h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #f5b042, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    position: relative;
}

.hero-section p {
    font-size: 1.1rem;
    color: #aaa;
    max-width: 600px;
    margin: 0 auto 30px;
}

/* ===== SEARCH ===== */
.search-form {
    display: flex;
    max-width: 520px;
    margin: 0 auto;
    gap: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.search-form input[type="text"] {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid rgba(255,255,255,0.08);
    border-right: none;
    background: rgba(26, 26, 46, 0.8);
    color: #e0e0e0;
    font-size: 1rem;
    outline: none;
    transition: border-color .2s, background .2s;
}

.search-form input[type="text"]:focus {
    border-color: rgba(245, 176, 66, 0.5);
    background: rgba(30, 30, 55, 0.9);
}

.search-form button {
    padding: 14px 30px;
    border: 2px solid #f5b042;
    background: linear-gradient(135deg, #f5b042, #e6a030);
    color: #0f0f1a;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all .25s;
    letter-spacing: 0.5px;
}

.search-form button:hover {
    background: linear-gradient(135deg, #ffd700, #f5b042);
    border-color: #ffd700;
}

/* ===== NOVEL GRID ===== */
.section-title {
    font-size: 1.5rem;
    color: #f5b042;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid #2a2a3e;
}

.novel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.novel-card {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 28px;
    transition: all .35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.novel-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(245,176,66,0.3), transparent);
    opacity: 0;
    transition: opacity .3s;
}

.novel-card:hover {
    border-color: rgba(245, 176, 66, 0.3);
    transform: translateY(-5px);
    box-shadow:
        0 12px 40px rgba(245, 176, 66, 0.08),
        0 4px 12px rgba(0,0,0,0.3);
    background: rgba(30, 30, 55, 0.8);
}

.novel-card:hover::before {
    opacity: 1;
}

.novel-card .novel-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.novel-card h3 {
    font-size: 1.15rem;
    color: #f5b042;
    margin-bottom: 8px;
    line-height: 1.4;
}

.novel-card h3 a { color: inherit; }

.novel-card .novel-meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 12px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.novel-card .novel-category {
    display: inline-block;
    background: rgba(245, 176, 66, 0.1);
    color: #f5b042;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.novel-card .novel-excerpt {
    color: #bbb;
    font-size: 0.9rem;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.novel-card .read-more {
    display: inline-block;
    color: #f5b042;
    font-weight: 600;
    font-size: 0.9rem;
    align-self: flex-start;
}

.novel-card .read-more:hover { color: #ffd700; }

.novel-card .read-more::after {
    content: ' →';
}

/* ===== SINGLE NOVEL (Baca Chapter) ===== */
.single-novel-container {
    max-width: 1100px;
    margin: 0 auto;
    background: transparent;
    padding: 25px 10px;
    border: none;
}

.single-novel-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #2a2a3e;
}

.single-novel-header .novel-category {
    display: inline-block;
    background: rgba(245, 176, 66, 0.1);
    color: #f5b042;
    padding: 4px 14px;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.single-novel-header h1 {
    font-size: 2rem;
    color: #f0f0f0;
    margin-bottom: 10px;
    line-height: 1.4;
}

.single-novel-header .meta {
    color: #888;
    font-size: 0.9rem;
}

.single-novel-content {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #ddd;
}

.single-novel-content p {
    margin-bottom: 0.8em;
    text-indent: 2em;
}

.single-novel-content h2,
.single-novel-content h3 {
    color: #f5b042;
    margin: 30px 0 15px;
    text-indent: 0;
}

.single-novel-content blockquote {
    border-left: 3px solid #f5b042;
    padding: 10px 20px;
    margin: 20px 0;
    background: rgba(245, 176, 66, 0.05);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #ccc;
}

/* ===== SECTION TITLE ===== */
.section-title {
    font-size: 1.5rem;
    color: #f5b042;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===== CHAPTER NAV ===== */
.chapter-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid rgba(255,255,255,0.06);
    gap: 15px;
}

.chapter-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: rgba(245, 176, 66, 0.08);
    border: 1px solid rgba(245, 176, 66, 0.15);
    border-radius: 10px;
    color: #f5b042;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all .25s;
    max-width: 40%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chapter-nav a:hover {
    border-color: #f5b042;
    background: rgba(245, 176, 66, 0.15);
    color: #ffd700;
    transform: translateY(-1px);
}

.chapter-nav .back-to-list {
    font-size: 0.85rem;
    color: #888;
    padding: 10px 20px;
    background: transparent;
    border-color: rgba(255,255,255,0.08);
    max-width: none;
}

.chapter-nav .back-to-list:hover {
    border-color: #f5b042;
    color: #f5b042;
    background: rgba(245, 176, 66, 0.08);
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 50px 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    background: rgba(26, 26, 46, 0.4);
    color: #ccc;
    font-size: 0.9rem;
    transition: all .25s;
}

.pagination a:hover {
    border-color: rgba(245, 176, 66, 0.3);
    color: #f5b042;
    background: rgba(245, 176, 66, 0.08);
    transform: translateY(-1px);
}

.pagination .current {
    background: linear-gradient(135deg, #f5b042, #e6a030);
    border-color: #f5b042;
    color: #0f0f1a;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(245, 176, 66, 0.2);
}

/* ===== PAGE (static) ===== */
.page-container {
    max-width: 800px;
    margin: 0 auto;
}

.page-container h1 {
    font-size: 2rem;
    color: #f5b042;
    margin-bottom: 25px;
    text-align: center;
}

.page-container p {
    margin-bottom: 1.2em;
    line-height: 1.8;
    color: #ddd;
}

/* ===== 404 ===== */
.error-404 {
    text-align: center;
    padding: 80px 20px;
}

.error-404 h1 {
    font-size: 4rem;
    color: #f5b042;
    margin-bottom: 10px;
}

.error-404 p {
    color: #888;
    margin-bottom: 30px;
}

.error-404 .btn-home {
    display: inline-block;
    padding: 12px 30px;
    background: #f5b042;
    color: #0f0f1a;
    border-radius: 8px;
    font-weight: 600;
    transition: all .2s;
}

.error-404 .btn-home:hover {
    background: #ffd700;
}

/* ===== READING TOOLBAR ===== */
.reading-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 12px 20px;
    margin-bottom: 25px;
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    flex-wrap: wrap;
    position: sticky;
    top: 65px;
    z-index: 99;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar-label {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 4px;
}

.toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: #e0e0e0;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
    line-height: 1;
}

.toolbar-btn:hover {
    background: rgba(245, 176, 66, 0.15);
    border-color: rgba(245, 176, 66, 0.3);
    color: #f5b042;
}

.font-size-indicator {
    min-width: 40px;
    text-align: center;
    font-size: 0.8rem;
    color: #f5b042;
    font-weight: 600;
}

.theme-toggle {
    min-width: 80px;
    gap: 6px;
}

.theme-toggle:hover {
    background: rgba(245, 176, 66, 0.15);
    border-color: rgba(245, 176, 66, 0.3);
}

/* ===== LIGHT MODE ===== */
.single-novel-container.light-mode {
    background: transparent;
    border-color: transparent;
}

.single-novel-container.light-mode .single-novel-header h1 {
    color: #222;
}

.single-novel-container.light-mode .single-novel-header .meta {
    color: #888;
}

.single-novel-container.light-mode .single-novel-content {
    color: #333;
}

.single-novel-container.light-mode .single-novel-content p {
    color: #333;
}

.single-novel-container.light-mode .single-novel-content blockquote {
    background: #f5f5f0;
    border-left-color: #f5b042;
    color: #555;
}

body.reading-light {
    background: #f5f5f0;
}

body.reading-light .site-header {
    background: rgba(255,255,255,0.9);
    border-bottom-color: rgba(0,0,0,0.08);
}

body.reading-light .site-header .site-title a {
    color: #c8952e;
}

body.reading-light .main-nav ul li a {
    color: #555;
}

body.reading-light .main-nav ul li a:hover,
body.reading-light .main-nav ul li.current-menu-item a {
    background: rgba(200, 149, 46, 0.1);
    color: #c8952e;
}

body.reading-light .site-footer {
    background: rgba(255,255,255,0.9);
    border-top-color: rgba(0,0,0,0.08);
}

body.reading-light .site-footer p { color: #999; }
body.reading-light .site-footer a { color: #c8952e; }

/* Light mode toolbar override */
.single-novel-container.light-mode .reading-toolbar {
    background: rgba(255,255,255,0.85);
    border-color: rgba(0,0,0,0.08);
}

.single-novel-container.light-mode .toolbar-btn {
    border-color: rgba(0,0,0,0.1);
    color: #555;
    background: rgba(0,0,0,0.03);
}

.single-novel-container.light-mode .toolbar-btn:hover {
    background: rgba(200, 149, 46, 0.1);
    border-color: rgba(200, 149, 46, 0.3);
    color: #c8952e;
}

.single-novel-container.light-mode .font-size-indicator {
    color: #c8952e;
}

/* ===== NAVIGASI CHAPTER — STYLE BARU ===== */
.chapter-nav {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid rgba(255,255,255,0.06);
    gap: 12px;
}

.chapter-nav a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 20px;
    background: rgba(245, 176, 66, 0.05);
    border: 1px solid rgba(245, 176, 66, 0.12);
    border-radius: 10px;
    color: #f5b042;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all .25s;
    flex: 1;
    text-decoration: none;
}

.chapter-nav a:hover {
    border-color: #f5b042;
    background: rgba(245, 176, 66, 0.12);
    color: #ffd700;
    transform: translateY(-2px);
}

.chapter-nav .nav-label {
    font-size: 0.8rem;
    color: #888;
    font-weight: 400;
}

.chapter-nav .nav-title {
    font-size: 0.9rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chapter-nav .prev {
    align-items: flex-start;
    text-align: left;
}

.chapter-nav .next {
    align-items: flex-end;
    text-align: right;
}

.chapter-nav .back-to-list {
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 16px 24px;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.08);
    color: #888;
}

.chapter-nav .back-to-list:hover {
    border-color: #f5b042;
    color: #f5b042;
    background: rgba(245, 176, 66, 0.08);
}

.chapter-nav a:only-child {
    flex: 0 0 auto;
}

.chapter-nav span:empty {
    display: none;
}

/* ===== CHAPTER DROPDOWN ===== */
.chapter-dropdown-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.chapter-dropdown {
    padding: 10px 16px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    background: rgba(26, 26, 46, 0.8);
    color: #e0e0e0;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    min-width: 180px;
    max-width: 250px;
    transition: border-color .2s;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23f5b042' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.chapter-dropdown:hover {
    border-color: rgba(245, 176, 66, 0.4);
}

.chapter-dropdown:focus {
    border-color: #f5b042;
}

.chapter-dropdown option {
    background: #1a1a2e;
    color: #e0e0e0;
    padding: 8px;
}

/* Light mode dropdown */
.single-novel-container.light-mode .chapter-dropdown {
    background: #ffffff;
    border-color: rgba(0,0,0,0.15);
    color: #333;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23c8952e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

.single-novel-container.light-mode .chapter-dropdown option {
    background: #fff;
    color: #333;
}

/* Chapter nav top — lebih kecil */
.chapter-nav-top {
    margin-bottom: 25px;
}

.chapter-nav-top .chapter-dropdown {
    min-width: 150px;
    font-size: 0.8rem;
    padding: 8px 30px 8px 12px;
}

.chapter-nav-top a {
    padding: 10px 16px;
}

.chapter-nav-top .nav-title {
    display: none;
}

.chapter-nav-top .nav-label {
    font-size: 0.8rem;
}

/* ===== FOOTER ===== */
.site-footer {
    background: rgba(10, 10, 20, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(245, 176, 66, 0.1);
    padding: 40px 20px;
    margin-top: auto;
    text-align: center;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.site-footer p {
    color: #888;
    font-size: 0.85rem;
}

.site-footer a { color: #f5b042; }
.site-footer a:hover { color: #ffd700; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header-inner { padding: 12px 15px; }
    .site-title { font-size: 1.2rem; }
    .site-tagline { display: none; }

    .menu-toggle { display: block; }

    .main-nav {
        display: none;
        width: 100%;
        order: 3;
    }
    .main-nav.active { display: block; }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding-top: 10px;
    }
    .main-nav ul li a {
        padding: 12px 15px;
        border-radius: 0;
        border-bottom: 1px solid #2a2a3e;
    }

    .hero-section { padding: 40px 15px; }
    .hero-section h1 { font-size: 1.6rem; }

    .novel-grid { grid-template-columns: 1fr; gap: 15px; }

    .single-novel-header h1 { font-size: 1.5rem; }
    .single-novel-content { font-size: 1rem; }
    .single-novel-container { padding: 20px 5px; }
    .site-content { padding: 20px 8px; }

    .reading-toolbar {
        top: 58px;
        padding: 10px 14px;
        gap: 10px;
        border-radius: 10px;
    }
    .toolbar-label { display: none; }
    .toolbar-btn { min-width: 32px; height: 32px; padding: 0 8px; font-size: 0.8rem; }
    .theme-toggle { min-width: 60px; }

    .chapter-nav {
        flex-wrap: wrap;
        gap: 8px;
    }
    .chapter-nav a { flex: 1; min-width: 120px; }
    .chapter-nav .back-to-list { order: -1; width: 100%; text-align: center; }
    .chapter-nav .nav-title { font-size: 0.8rem; -webkit-line-clamp: 1; }
    .chapter-dropdown { min-width: 130px; max-width: 160px; font-size: 0.75rem; padding: 8px 28px 8px 10px; }
    .chapter-nav-top .chapter-dropdown { min-width: 120px; }

    .search-form { flex-direction: column; }
    .search-form input[type="text"] {
        border-radius: 8px;
        border-right: 2px solid #2a2a3e;
        margin-bottom: 5px;
    }
    .search-form button { border-radius: 8px; }
}

@media (max-width: 480px) {
    .site-content { padding: 20px 12px; }
    .novel-card { padding: 18px; }
}
/* ============================================================
   NOVEL GRANDMASTER — Additional Styles
   ============================================================ */

/* HERO SECTION */
.novel-hero {
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
    padding: 60px 20px;
    text-align: center;
    border-bottom: 2px solid #f5b042;
}
.hero-content { max-width: 700px; margin: 0 auto; }
.hero-title { font-size: 2.2rem; color: #f5b042; margin-bottom: 10px; }
.hero-tagline { font-size: 1.1rem; color: #b0b0b0; margin-bottom: 30px; }
.hero-search { display: flex; max-width: 500px; margin: 0 auto; gap: 0; }
.hero-search .search-input {
    flex: 1; padding: 14px 20px; border: 2px solid #333;
    border-radius: 8px 0 0 8px; background: #1a1a2e; color: #e8e8e8;
    font-size: 1rem; outline: none;
}
.hero-search .search-input:focus { border-color: #f5b042; }
.hero-search .search-btn {
    padding: 14px 24px; border: 2px solid #f5b042;
    border-radius: 0 8px 8px 0; background: #f5b042; color: #0f0f1a;
    font-size: 1.2rem; cursor: pointer; transition: all 0.3s;
}
.hero-search .search-btn:hover { background: #e6a030; }

/* NOVEL GRID */
.novel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 20px 0;
}
.novel-card {
    background: #0d0d20; border-radius: 12px; overflow: hidden;
    border: 1px solid #1a1a2e; transition: all 0.3s;
}
.novel-card:hover { border-color: #f5b042; transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.3); }
.novel-card-link { display: block; color: #e8e8e8; text-decoration: none; }
.novel-card-img {
    width: 100%; height: 200px; overflow: hidden; background: #1a1a2e;
    display: flex; align-items: center; justify-content: center;
}
.novel-card-img img { width: 100%; height: 100%; object-fit: cover; }
.novel-card-placeholder { font-size: 4rem; opacity: 0.3; }
.novel-card-body { padding: 16px; }
.novel-card-title {
    font-size: 1.1rem; color: #2e9e3a; margin: 0 0 8px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.novel-card-meta { display: flex; gap: 12px; font-size: 0.85rem; color: #999; margin-bottom: 6px; }
.novel-card-genre { font-size: 0.8rem; color: #f5b042; margin-bottom: 8px; }
.novel-card-excerpt { font-size: 0.88rem; color: #b0b0b0; line-height: 1.5; margin: 0; }

/* SECTION HEADERS */
.section-header { display: flex; justify-content: space-between; align-items: center; padding: 30px 0 10px; }
.section-header h2 { color: #f5b042; margin: 0; font-size: 1.5rem; }
.view-all { color: #2e9e3a; text-decoration: none; font-size: 0.9rem; }
.view-all:hover { text-decoration: underline; }

/* GENRE CLOUD */
.genre-section { padding: 20px 0 40px; }
.genre-section h2 { color: #f5b042; margin-bottom: 16px; }
.genre-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.genre-tag {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; background: #1a1a2e; border-radius: 20px;
    color: #e8e8e8; text-decoration: none; font-size: 0.9rem;
    border: 1px solid #333; transition: all 0.3s;
}
.genre-tag:hover { border-color: #f5b042; color: #f5b042; background: #0d0d20; }
.genre-count { font-size: 0.78rem; color: #888; }

/* NOVEL DETAIL PAGE */
.novel-detail { padding: 30px 0; }
.novel-header { display: flex; gap: 40px; margin-bottom: 40px; }
.novel-cover { flex: 0 0 280px; }
.novel-cover-img { width: 100%; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.4); }
.novel-cover-placeholder {
    width: 280px; height: 400px; background: #1a1a2e; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 6rem;
}
.novel-info { flex: 1; }
.novel-title { font-size: 2rem; color: #f5b042; margin: 0 0 16px; }
.novel-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; }
.novel-meta span { font-size: 0.95rem; color: #ccc; }
.novel-status-badge {
    padding: 3px 12px; border-radius: 12px; font-size: 0.82rem; font-weight: 600;
}
.status-ongoing { background: #2e7d32; color: #fff; }
.status-completed { background: #1565c0; color: #fff; }
.novel-genres { font-size: 0.95rem; color: #f5b042; margin-bottom: 20px; }
.novel-sinopsis h3 { color: #2e9e3a; margin-bottom: 12px; }
.novel-sinopsis p { line-height: 1.8; color: #d0d0d0; }

/* CHAPTER LIST */
.novel-chapter-list { border-top: 1px solid #1a1a2e; padding-top: 30px; }
.novel-chapter-list h2 { color: #2e9e3a; margin-bottom: 20px; }
.chapter-list { display: flex; flex-direction: column; gap: 4px; }
.chapter-item {
    display: flex; align-items: center; gap: 16px;
    padding: 12px 16px; background: #0d0d20; border-radius: 8px;
    text-decoration: none; color: #e8e8e8; border: 1px solid transparent;
    transition: all 0.3s;
}
.chapter-item:hover { border-color: #f5b042; background: #12122a; }
.chapter-num { color: #f5b042; font-weight: 600; min-width: 100px; }
.chapter-title { flex: 1; }
.chapter-date { font-size: 0.82rem; color: #666; }
.no-chapter { color: #888; font-style: italic; }

/* CHAPTER READER */
.chapter-container { max-width: 820px; margin: 0 auto; padding: 0 15px; }
.chapter-breadcrumb { padding: 16px 0; font-size: 0.88rem; color: #888; }
.chapter-breadcrumb a { color: #2e9e3a; text-decoration: none; }
.chapter-breadcrumb a:hover { text-decoration: underline; }
.chapter-breadcrumb span { color: #ccc; }
.chapter-article .chapter-title { font-size: 1.6rem; color: #f5b042; margin-bottom: 20px; }
.chapter-content { line-height: 2; font-size: 1rem; color: #e0e0e0; padding: 20px 0; }
.chapter-content p { margin-bottom: 1.2em; }
.chapter-content img { max-width: 100%; height: auto; border-radius: 8px; }

/* READING TOOLBAR */
.reading-toolbar {
    display: flex; justify-content: center; align-items: center; gap: 20px;
    padding: 12px 20px; background: #0d0d20; border-radius: 8px;
    border: 1px solid #1a1a2e; margin-bottom: 16px; position: sticky; top: 0; z-index: 100;
}
.toolbar-section { display: flex; align-items: center; gap: 8px; }
.toolbar-label { font-size: 1rem; }
.font-size-display { min-width: 40px; text-align: center; font-size: 0.85rem; color: #ccc; }
.toolbar-btn {
    padding: 6px 14px; border: 1px solid #333; border-radius: 6px;
    background: #1a1a2e; color: #e8e8e8; cursor: pointer; font-size: 0.9rem;
    transition: all 0.3s;
}
.toolbar-btn:hover { border-color: #f5b042; color: #f5b042; }

/* CHAPTER NAVIGATION */
.chapter-nav {
    display: flex; justify-content: space-between; align-items: center;
    gap: 16px; padding: 16px 0; margin: 20px 0; flex-wrap: wrap;
}
.chapter-nav a {
    flex: 1; min-width: 150px; padding: 12px 16px; background: #0d0d20;
    border-radius: 8px; text-decoration: none; color: #e8e8e8;
    border: 1px solid #1a1a2e; transition: all 0.3s;
}
.chapter-nav a:hover { border-color: #f5b042; background: #12122a; }
.chapter-nav .nav-next { text-align: right; }
.nav-label { display: block; font-size: 0.8rem; color: #f5b042; margin-bottom: 4px; }
.nav-title { display: block; font-size: 0.82rem; color: #999; }
.chapter-dropdown-wrap { flex: 0 0 auto; }
.chapter-dropdown {
    padding: 10px 14px; background: #1a1a2e; border: 1px solid #333;
    border-radius: 8px; color: #e8e8e8; cursor: pointer; max-width: 220px;
}
.chapter-dropdown:focus { border-color: #f5b042; outline: none; }

/* LIGHT MODE */
body.light-mode { background: #f5f5f0; color: #222; }
body.light-mode .novel-card { background: #fff; border-color: #ddd; }
body.light-mode .novel-card-title { color: #1b5e20; }
body.light-mode .novel-card-excerpt { color: #555; }
body.light-mode .novel-hero { background: linear-gradient(135deg, #1b5e20, #2e7d32); }
body.light-mode .chapter-item { background: #fff; border-color: #eee; }
body.light-mode .chapter-item:hover { border-color: #f5b042; background: #fafaf5; }
body.light-mode .reading-toolbar { background: #fff; border-color: #ddd; }
body.light-mode .toolbar-btn { background: #f5f5f0; color: #333; border-color: #ddd; }
body.light-mode .chapter-dropdown { background: #fff; color: #333; border-color: #ddd; }
body.light-mode .chapter-nav a { background: #fff; border-color: #ddd; color: #333; }
body.light-mode .chapter-nav a:hover { border-color: #f5b042; }
body.light-mode .chapter-content { color: #333; }
body.light-mode .genre-tag { background: #fff; color: #333; border-color: #ddd; }
body.light-mode .genre-tag:hover { border-color: #f5b042; color: #1b5e20; }
body.light-mode .hero-search .search-input { background: #fff; color: #333; border-color: #ccc; }
body.light-mode .novel-sinopsis p { color: #444; }
body.light-mode .breadcrumb { color: #666; }
body.light-mode .section-header h2 { color: #1b5e20; }

/* ARCHIVE HEADER */
.archive-header { padding: 30px 0; text-align: center; }
.archive-header h1 { color: #f5b042; font-size: 1.8rem; }
.archive-desc { color: #999; margin-top: 8px; }
.archive-filter { margin-top: 16px; }
.archive-filter input[type=search] {
    padding: 10px 16px; border: 2px solid #333; border-radius: 8px;
    background: #1a1a2e; color: #e8e8e8; width: 300px; max-width: 100%;
}

/* 404 */
.not-found { text-align: center; padding: 100px 20px; }
.not-found h1 { font-size: 5rem; color: #f5b042; margin-bottom: 10px; }
.not-found p { font-size: 1.2rem; color: #999; margin-bottom: 30px; }
.btn-home {
    display: inline-block; padding: 12px 30px; background: #f5b042;
    color: #0f0f1a; border-radius: 8px; text-decoration: none; font-weight: 600;
    transition: all 0.3s;
}
.btn-home:hover { background: #e6a030; transform: translateY(-2px); }

/* RESPONSIVE */
@media (max-width: 768px) {
    .novel-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .novel-header { flex-direction: column; }
    .novel-cover { flex: none; width: 200px; margin: 0 auto; }
    .novel-cover-placeholder { width: 200px; height: 280px; }
    .hero-title { font-size: 1.6rem; }
    .chapter-nav { flex-direction: column; }
    .chapter-nav a { width: 100%; }
    .novel-card-img { height: 150px; }
}
@media (max-width: 480px) {
    .novel-grid { grid-template-columns: 1fr; }
    .novel-card { max-width: 100%; }
}
body.sepia-mode { background: #f4ecd8; color: #5b4636; }
body.sepia-mode .novel-card { background: #faf3e0; border-color: #d4c5a9; }
body.sepia-mode .novel-card-title { color: #8b6914; }
body.sepia-mode .novel-card-meta { color: #7a6b51; }
body.sepia-mode .chapter-container { background: #faf3e0; }
body.sepia-mode .chapter-title { color: #8b6914; }
body.sepia-mode .chapter-content { color: #5b4636; }
body.sepia-mode .chapter-breadcrumb { color: #7a6b51; }
body.sepia-mode .chapter-breadcrumb a { color: #8b6914; }
body.sepia-mode .chapter-breadcrumb span { color: #5b4636; }
body.sepia-mode .chapter-nav a { color: #8b6914; border-color: #d4c5a9; }
body.sepia-mode .chapter-nav a:hover { background: #f4ecd8; }
body.sepia-mode .chapter-dropdown { background: #faf3e0; color: #5b4636; border-color: #d4c5a9; }
body.sepia-mode .chapter-dropdown option { background: #faf3e0; color: #5b4636; }
body.sepia-mode .reading-toolbar { background: #e8dcc8; }
body.sepia-mode .toolbar-btn { color: #5b4636; }
body.sepia-mode .toolbar-btn:hover { background: #d4c5a9; }
body.sepia-mode .setting-panel { background: #e8dcc8; color: #5b4636; }
body.sepia-mode .panel-header { border-color: #d4c5a9; color: #8b6914; }
body.sepia-mode .setting-group label { color: #7a6b51; }
body.sepia-mode .font-style-btn, body.sepia-mode .theme-btn { background: #faf3e0; border-color: #d4c5a9; color: #5b4636; }
body.sepia-mode .font-style-btn.active, body.sepia-mode .theme-btn.active { background: #8b6914; border-color: #8b6914; color: #fff; }
body.sepia-mode .setting-group input[type="range"] { background: #d4c5a9; }
body.sepia-mode .setting-group input[type="range"]::-webkit-slider-thumb { background: #8b6914; }
body.sepia-mode .panel-close { color: #7a6b51; }
body.sepia-mode .panel-close:hover { color: #5b4636; }
body.sepia-mode .chapter-nav { border-color: #d4c5a9; }

/* Dark mode explicit */
body.dark-mode { background: #070714; color: #e0e0e0; }
body.dark-mode .chapter-container { background: transparent; }
body.dark-mode .setting-panel { background: #0d0d20; color: #e0e0e0; }
body.dark-mode .panel-header { border-color: #1a1a35; }
body.dark-mode .panel-close { color: #888; }
body.dark-mode .panel-close:hover { color: #fff; }
