/*
Theme Name: Eventure Novel
Theme URI: 
Description: A clean WordPress theme designed for online novel/book reading.
Author: Eventure
Version: 2.0
*/

/* ========================
   CSS Custom Properties
   ======================== */
:root {
    --color-primary:     #3F82C4;
    --color-primary-lt:  #699DD1;
    --color-border:      #CADCEE;
    --color-bg-light:    #E5EEF7;
    --color-bg-nav:      #F1F1F1;
    --color-text:        #000;
    --color-text-muted:  #999;
    --color-link:        #036;
    --color-link-hover:  #09F;
    --color-white:       #FFF;

    --font-body: "微软雅黑", "Microsoft YaHei", Arial, sans-serif;
    --container-width: 960px;
    --radius: 3px;
    --shadow: 0 0 10px #CCC;
    --gradient-blue: linear-gradient(to bottom, #699DD1, #3F82C4);
    --gradient-nav:  linear-gradient(to bottom, #F9F9F9, #ECECEC);
}

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

body, input, textarea, select {
    font-family: var(--font-body);
    font-size: 16px;
    background: #EEE;
    color: var(--color-text);
}

a { color: var(--color-link); text-decoration: none; cursor: pointer; }
a:hover { color: var(--color-link-hover); }
img { border: none; max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-size: 100%; font-weight: normal; }

.screen-reader-text {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    border: 0; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap;
}

.clearfix::after { content: ""; display: block; clear: both; }

/* ========================
   Container
   ======================== */
.container {
    width: var(--container-width);
    margin: 0 auto;
    background: url(images/container_bg.png);
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* ========================
   Top Bar
   ======================== */
.top {
    height: 44px;
    padding: 0 15px;
    background: #FAFAFA url(images/top_bg.png) repeat-x;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.top h1 {
    height: 40px;
    line-height: 40px;
    color: var(--color-white);
}

.top ul {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 0;
}

.top ul li a {
    display: block;
    height: 20px;
    background-repeat: no-repeat;
}

.top ul li .home              { width: 24px; background-image: url(images/icon.png); }
.top ul li .jiathis_button_tsina { width: 25px; background-image: url(images/sina.png); }
.top ul li .jiathis_button_tqq   { width: 22px; background-image: url(images/qq.png); }
.top ul li .jiathis_button_qzone { width: 22px; background-image: url(images/zone.png); }
.top a { color: var(--color-white); }

/* ========================
   Search Bar
   ======================== */
.search {
    padding: 15px;
    background: var(--color-bg-light);
    position: relative;
}

.search #s {
    width: 97%;
    height: 30px;
    line-height: 30px;
    padding: 0 8px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    border-radius: var(--radius);
}

.search #searchsubmit {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
}

/* ========================
   Navigation
   ======================== */
.nav-wrapper { margin: 10px 10px 0; }

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.nav li {
    padding: 10px 4px;
    font-size: 14px;
    white-space: nowrap;
}

.nav li a {
    padding: 5px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    display: block;
}

.nav .current_page_item > a,
.nav .current-menu-ancestor > a,
.nav .current-menu-item > a,
.nav .current-menu-parent > a {
    background: var(--gradient-blue);
    border-color: var(--color-primary);
    font-weight: bold;
    color: var(--color-white);
}

/* ========================
   Banner / Cover
   ======================== */
#banner {
    margin: 15px 20px 0;
    padding: 1px;
    border: 1px solid var(--color-border);
}

.banner {
    padding: 20px;
    border: 5px solid var(--color-bg-light);
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.banner img { flex-shrink: 0; }

.banner .content h2  { padding-bottom: 10px; font-size: 36px; }
.banner .content p   { padding-bottom: 10px; font-size: 14px; color: var(--color-link-hover); }
.banner .content div { line-height: 1.8em; }

/* ========================
   Section Title
   ======================== */
.title {
    background: var(--color-primary-lt);
    border: 1px solid var(--color-primary);
    padding: 1px;
}

.title div {
    padding-left: 10px;
    height: 35px;
    line-height: 35px;
    background: url(images/title_bg.png) repeat-x;
}

.title div span {
    padding-left: 15px;
    background: url(images/add.gif) no-repeat left center;
    font-size: 14px;
    font-weight: bold;
    color: var(--color-white);
}

.title_fen {
    height: 40px;
    line-height: 40px;
    margin: 10px 0;
    border-bottom: 2px solid var(--color-border);
    text-align: center;
    font-size: 16px;
    font-weight: bold;
}

/* ========================
   Chapter List
   ======================== */
.section { margin: 15px 20px 0; }

.section .list { padding-bottom: 5px; display: flex; flex-wrap: wrap; }

.section .list li {
    width: 265px;
    padding-left: 15px;
    margin: 0 12px;
    height: 35px;
    line-height: 35px;
    overflow: hidden;
    background: url(images/point.gif) no-repeat left 15px;
    border-bottom: 1px dashed var(--color-border);
}

.section .list li a { color: var(--color-link); }
.section .list li a:hover { color: var(--color-link-hover); }

/* ========================
   Pagination
   ======================== */
.pagination {
    margin: 15px 0 0;
    text-align: center;
}

.pagination span,
.pagination a {
    display: inline-block;
    padding: 6px 10px;
    margin: 0 4px;
    border: 1px solid var(--color-primary);
    line-height: 1;
    border-radius: var(--radius);
}

.pagination a:hover,
.pagination .current {
    background: var(--gradient-blue);
    border-color: var(--color-primary);
    color: var(--color-white);
}

/* ========================
   Footer Links
   ======================== */
.link {
    margin: 15px 20px 0;
    border-bottom: 1px dashed var(--color-border);
}

.link ul { padding: 10px 0; display: flex; flex-wrap: wrap; }
.link ul li { margin: 0 10px; line-height: 2em; white-space: nowrap; }

.footer {
    margin: 0 20px;
    line-height: 2em;
    padding: 10px 0;
    text-align: center;
}

/* ========================
   Single Post
   ======================== */
.single { margin: 15px 20px 0; }

/* Reading controls toolbar */
.single .function {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 5px;
}

.single .function .color { display: flex; align-items: center; margin-right: 10px; }
.single .function .color span { display: block; margin-right: 5px; }
.single .function .color a {
    display: block;
    width: 13px; height: 13px;
    margin-right: 10px;
    cursor: pointer;
}

.single .function .color .bg1 { background: #fff; border: 1px solid #EEE; width: 11px; height: 11px; }
.single .function .color .bg2 { background: #CCC; }
.single .function .color .bg3 { background: #333; }
.single .function .color .bg4 { background: #090; }
.single .function .color .bg5 { background: #06C; }
.single .function .color .bg6 { background: #C00; }
.single .function .color .bg7 { background: #F90; }

.single .function .font { display: flex; align-items: center; }
.single .function .font a { margin-right: 10px; cursor: pointer; }

.single .function .display { display: flex; align-items: center; margin-left: auto; }
.single .function .display a { margin-left: 10px; cursor: pointer; }

/* Article */
.single .article {
    padding: 20px 30px 10px;
    margin-top: 15px;
}

.single .article h1 { font-size: 28px; text-align: center; }

.single .article .data {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px 0 25px;
    border-bottom: 1px solid #eee;
}

.single .article .content {
    font-size: 18px; /* default: large */
    line-height: 1.8em;
}

.single .article .content p { padding-bottom: 1.5em; }

/* Prev/Next paging */
.single .paging {
    padding: 25px 0 45px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}

.single .paging a {
    margin: 0 5px;
    padding: 8px 20px;
    background: var(--gradient-blue);
    border: 1px solid var(--color-primary);
    font-size: 14px;
    color: var(--color-white);
    border-radius: var(--radius);
}

.single .paging a:hover { color: #FF9; }
.single .paging span { font-size: 12px; color: var(--color-text-muted); padding: 0 5px; }

/* ========================
   Search Results
   ======================== */
.search_list li {
    border-bottom: 1px dashed var(--color-border);
    height: 35px;
    line-height: 35px;
    background: url(images/point.gif) no-repeat left center;
    padding-left: 15px;
}

.search_list .no-results {
    background: none;
    padding: 200px 0;
    text-align: center;
    font-size: 18px;
}

/* ========================
   Display Mode IDs
   ======================== */
#wide   { width: auto; margin: 0 30px; }
#normal { width: 960px; }
#narrow { width: 640px; }

/* ========================
   Background Color Themes
   ======================== */
#bg1 { background: #fff;    border: 3px solid #fff; }
#bg2 { background: #fafafa; border: 3px solid #EEE; }
#bg3 { background: #666;    border: 3px solid #444; color: #FFF; }
#bg4 { background: #F9FFE6; border: 3px solid #F1FFC8; color: #030; }
#bg5 { background: #E6F9FF; border: 3px solid #BBEEFF; color: #003; }
#bg6 { background: #FFF1EC; border: 3px solid #FFD3C4; color: #300; }
#bg7 { background: #FFFFE1; border: 3px solid #FFF297; color: #403000; }

/* ========================
   Font Size IDs
   ======================== */
#small { font-size: 14px; }
#ln    { font-size: 16px; }
#large { font-size: 18px; }

/* ========================
   Active Indicators
   ======================== */
#cur  { background-image: url(images/right.png); }
#cur2 { color: #F90; }
#cur3 { color: #F90; }

/* ========================
   Tooltip (aToolTip)
   ======================== */
#aToolTip {
    position: absolute;
    display: none;
    z-index: 50000;
}

#aToolTip .aToolTipContent { position: relative; margin: 0; padding: 0; }

.defaultTheme {
    background: #333;
    color: #fff;
    margin: 0;
    padding: 12px 15px;
    width: 300px;
    line-height: 1.6em;
}

.defaultTheme h3 { color: var(--color-link-hover); padding-bottom: 5px; }

/* ========================
   Ads
   ======================== */
.ad {
    width: 920px;
    margin: 15px auto 0;
    text-align: center;
    overflow: hidden;
}

.ds { margin: 15px 20px 0; }

/* ========================
   Comments
   ======================== */
#comments { padding-bottom: 10px; font-size: 18px; }

.commentlist .comment-body {
    padding: 10px 0;
    border-bottom: 1px solid #EEE;
}

.commentlist .comment-body p {
    padding: 5px 0;
    line-height: 1.6em;
    color: var(--color-text-muted);
}

.commentlist .children { margin-left: 30px; }
.commentlist .avatar   { float: left; margin-right: 10px; }

.navigation { height: 35px; line-height: 35px; }
.navigation .alignleft  { float: left; }
.navigation .alignright { float: right; }

#respond { margin-top: 15px; }
#respond h3 { padding-bottom: 10px; font-size: 18px; }

#respond input[type="text"],
#respond textarea {
    width: 440px;
    margin-right: 10px;
    padding: 3px;
    background: var(--color-white);
    border: 1px solid #EEE;
    border-radius: var(--radius);
}

#respond input[type="submit"] {
    padding: 5px 12px;
    background: #333;
    border: none;
    color: var(--color-white);
    cursor: pointer;
    border-radius: var(--radius);
}

#respond p { padding-bottom: 10px; }

/* ========================
   Static Page Content
   ======================== */
.cont p {
    padding-top: 1em;
    line-height: 1.8em;
    text-indent: 2em;
    font-size: 14px;
}

.cont img {
    border: 1px solid var(--color-border);
    background: var(--color-white);
    padding: 5px;
}

.cont .alignleft  { display: inline; float: left;  margin: 5px 15px 5px 0; }
.cont .alignright { display: inline; float: right; margin: 5px 0 5px 15px; }
.cont .aligncenter { display: block; clear: both; margin: 5px auto 15px; }

/* ========================================
   RESPONSIVE — Tablet  ≤ 1020px
   ======================================== */
@media (max-width: 1020px) {
    .container {
        width: 100%;
        box-shadow: none;
    }

    #normal { width: 100%; }
    #wide   { margin: 0 10px; }
    #narrow { width: 100%; }

    .ad { width: 100%; }

    /* 3-column chapter list → 2 columns */
    .section .list li {
        width: calc(50% - 24px);
    }

    #respond input[type="text"],
    #respond textarea {
        width: 100%;
        max-width: 440px;
    }
}

/* ========================================
   RESPONSIVE — Mobile  ≤ 768px
   ======================================== */
@media (max-width: 768px) {

    /* --- Base --- */
    body { font-size: 14px; }

    /* --- Container --- */
    .container { width: 100%; border-radius: 0; }

    /* --- Top bar --- */
    .top {
        height: auto;
        min-height: 44px;
        padding: 8px 12px;
        flex-wrap: wrap;
        gap: 6px;
    }

    .top h1 {
        height: auto;
        line-height: 1.4;
        font-size: 14px;
        flex: 1 1 0;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Hide share buttons on mobile, keep home icon */
    .top ul li:has(.jiathis_button_tsina),
    .top ul li:has(.jiathis_button_tqq),
    .top ul li:has(.jiathis_button_qzone) { display: none; }

    /* --- Search --- */
    .search { padding: 10px 12px; }

    .search #s {
        width: 100%;
        height: 38px;
        font-size: 15px;
        padding-right: 48px;
    }

    .search #searchsubmit {
        top: 50%;
        transform: translateY(-50%);
        right: 12px;
    }

    /* --- Navigation --- */
    .nav-wrapper { margin: 0; }

    .nav {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0;
        padding: 8px 8px 0;
        scrollbar-width: none;
    }

    .nav::-webkit-scrollbar { display: none; }

    .nav li {
        padding: 6px 4px;
        flex-shrink: 0;
    }

    .nav li a {
        padding: 6px 12px;
        font-size: 13px;
        white-space: nowrap;
    }

    /* --- Banner / Cover --- */
    #banner { margin: 10px 0 0; }

    .banner {
        flex-direction: column;
        align-items: center;
        padding: 15px;
        gap: 12px;
        text-align: center;
    }

    .banner img {
        max-width: 160px;
        margin: 0 auto;
    }

    .banner .content h2  { font-size: 22px; }
    .banner .content p   { font-size: 13px; }

    /* --- Section / Chapter list --- */
    .section { margin: 10px 0 0; }

    .section .list { padding-bottom: 0; }

    /* Single column on mobile */
    .section .list li {
        width: 100%;
        margin: 0;
        padding: 0 15px;
        height: 40px;
        line-height: 40px;
    }

    .title_fen { font-size: 14px; margin: 8px 0; }

    /* --- Single post --- */
    .single { margin: 0; }

    /* Reading toolbar: stack into two rows */
    .single .function {
        padding: 8px 12px;
        flex-wrap: wrap;
        row-gap: 8px;
        background: #f9f9f9;
        border-bottom: 1px solid var(--color-border);
    }

    .single .function .color { flex: 1 1 100%; }
    .single .function .color a { width: 18px; height: 18px; }
    .single .function .color .bg1 { width: 16px; height: 16px; }

    .single .function .font  { flex: 1 0 auto; }
    .single .function .display { margin-left: 0; flex: 1 0 auto; justify-content: flex-end; }

    /* Article body */
    .single .article {
        padding: 15px 15px 10px;
        margin-top: 0;
    }

    .single .article h1 { font-size: 20px; line-height: 1.4; }

    .single .article .data { font-size: 13px; padding: 8px 0 15px; }

    /* Font size overrides — keep readable on mobile */
    #small { font-size: 15px; }
    #ln    { font-size: 17px; }
    #large { font-size: 19px; }

    /* Prev/Next navigation */
    .single .paging {
        padding: 20px 12px 30px;
        gap: 8px;
    }

    .single .paging a {
        padding: 10px 16px;
        font-size: 15px;
        flex: 1 1 auto;
        text-align: center;
        min-width: 80px;
    }

    /* Hide keyboard shortcut hints on mobile */
    .single .paging span { display: none; }

    /* Home button in paging */
    .single .paging a.home { flex: 0 0 auto; }

    /* --- Display mode overrides --- */
    #wide, #normal, #narrow {
        width: 100% !important;
        margin: 0 !important;
    }

    /* --- Pagination --- */
    .pagination span,
    .pagination a {
        padding: 8px 12px;
        margin: 2px;
        font-size: 14px;
    }

    /* --- Footer links --- */
    .link { margin: 10px 0 0; }
    .link ul { padding: 8px 12px; }
    .link ul li { margin: 0 8px; font-size: 13px; }

    .footer { margin: 0 12px; font-size: 13px; }

    /* --- Ads --- */
    .ad { width: 100%; margin: 10px 0 0; overflow-x: hidden; }

    .ds { margin: 10px 12px 0; }

    /* --- Comments --- */
    #respond input[type="text"],
    #respond textarea {
        width: 100%;
        margin-right: 0;
        margin-bottom: 8px;
        font-size: 15px;
        padding: 6px 8px;
    }

    #respond input[type="submit"] {
        width: 100%;
        padding: 10px;
        font-size: 15px;
    }

    /* --- Page content --- */
    .cont p { font-size: 15px; text-indent: 2em; }
    .cont .alignleft,
    .cont .alignright {
        float: none;
        display: block;
        margin: 10px auto;
    }

    /* --- Search results --- */
    .search_list li {
        height: 40px;
        line-height: 40px;
        font-size: 14px;
    }

    /* --- Tooltip: disable on touch devices --- */
    #aToolTip { display: none !important; }
}

/* ========================================
   RESPONSIVE — Small phone  ≤ 480px
   ======================================== */
@media (max-width: 480px) {
    .top h1 { font-size: 13px; }

    .banner .content h2 { font-size: 18px; }

    .single .article h1 { font-size: 18px; }

    .single .paging a {
        padding: 10px 10px;
        font-size: 14px;
    }

    .nav li a { padding: 5px 9px; font-size: 12px; }
}
