/* =========================================================
   NovelPress v2 - 19202 风格主题样式
   主色：#206be7（参照 192文学网）
   ========================================================= */
:root {
    --theme-color: #206be7;
    --theme-hover: #1162e8;
    --theme-bg: #f5f5f5;
    --card-bg: #fff;
    --header-bg: #fff;
    --black: #232323;
    --title-color: #232323;
    --text-color: #333;
    --desc-color: #888;
    --meta-color: #999;
    --line-color: #eee;
    --line-soft: #f2f2f2;
    --tag-bg: #f5f5f5;
    --danger: #e65100;
    --success: #2e7d32;
    --shadow: 0 1px 3px rgba(0, 0, 0, .06);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}
body.dark {
    --theme-bg: #0e1116;
    --card-bg: #171c23;
    --header-bg: #161b22;
    --black: #e8eaed;
    --title-color: #e8eaed;
    --text-color: #b9c0c9;
    --desc-color: #8a93a0;
    --meta-color: #6f7885;
    --line-color: #232a33;
    --line-soft: #20262e;
    --tag-bg: #222a33;
    --shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font: 14px/1.6 var(--font);
    color: var(--black);
    background: var(--theme-bg);
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--theme-hover); }
img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, h5, p { margin: 0; }
button, input { font-family: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* ============ Header ============ */
.header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: var(--header-bg);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}
.header-inner { position: relative; display: flex; align-items: center; height: 60px; }

.mobile-toggle {
    display: none;
    width: 36px; height: 36px;
    align-items: center; justify-content: center;
    background: none; border: 0; color: var(--black);
    font-size: 17px; cursor: pointer; margin-right: 4px;
}

.logo { flex-shrink: 0; }
h1.logo { margin: 0; font-size: inherit; font-weight: inherit; line-height: inherit; }
.logo a { display: inline-flex; align-items: center; height: 60px; }
.logo-img { max-height: 36px; width: auto; }
.logo-text { font-size: 23px; font-weight: 700; color: var(--black); letter-spacing: .5px; }
.logo-text:hover { color: var(--theme-color); }

.primary-menu { margin-left: 36px; }
.primary-menu ul { display: flex; align-items: center; }
.primary-menu li { position: relative; }
.primary-menu li.current-menu-item > a,
.primary-menu li.current-post-parent > a,
.primary-menu li.current-post-ancestor > a,
.primary-menu a:hover { color: var(--theme-color); }
.primary-menu > ul > li > a {
    display: block;
    padding: 0 15px;
    font-size: 15px;
    line-height: 60px;
    color: var(--black);
}
.primary-menu > ul > li > a::after {
    content: "";
    position: absolute;
    left: 15px; right: 15px; bottom: 0;
    height: 2px;
    background: transparent;
}
.primary-menu > ul > li.current-menu-item > a::after,
.primary-menu > ul > li.current-post-parent > a::after { background: var(--theme-color); }

.primary-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 140px;
    background: var(--card-bg);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
    border-radius: 4px;
    padding: 6px 0;
    z-index: 100;
}
.primary-menu li:hover > .sub-menu { display: block; }
.primary-menu .sub-menu a { display: block; padding: 8px 18px; font-size: 14px; color: var(--text-color); white-space: nowrap; }
.primary-menu .sub-menu a:hover { color: var(--theme-color); background: var(--tag-bg); }

.navbar-action { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.action-item {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    color: var(--black);
    font-size: 16px;
}
.action-item:hover { background: var(--tag-bg); color: var(--theme-color); }
.dark-toggle i:last-child { display: none; }
body.dark .dark-toggle i:first-child { display: none; }
body.dark .dark-toggle i:last-child { display: inline; }

/* 下拉搜索框 */
.navbar-search { display: none; }
.navbar-search.active {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 0; right: 0; top: 100%;
    padding: 13px 15px;
    background: var(--header-bg);
    border-top: 1px solid var(--line-color);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .09);
    z-index: 990;
}
.search-close { font-size: 16px; color: var(--meta-color); cursor: pointer; padding: 0 12px; }
.search-close:hover { color: var(--theme-color); }
.navbar-search-input {
    width: min(720px, calc(100vw - 150px));
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line-color);
    border-right: 0;
    border-radius: 4px 0 0 4px;
    outline: none;
    font-size: 14px;
    background: var(--card-bg);
    color: var(--black);
}
.navbar-search-input:focus { border-color: var(--theme-color); }
.navbar-search-btn {
    height: 40px;
    padding: 0 20px;
    border: 0;
    background: var(--theme-color);
    color: #fff;
    font-size: 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}
.navbar-search-btn:hover { background: var(--theme-hover); }

/* ============ Mobile Nav ============ */
.mobile-mask { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 9997; }
.mobile-nav {
    display: block;
    position: fixed;
    top: 0; bottom: 0; left: -280px;
    width: 280px;
    background: var(--header-bg);
    z-index: 9998;
    overflow-y: auto;
    transition: left .28s ease;
    padding: 12px 0 30px;
}
.mobile-nav a { display: block; padding: 13px 22px; font-size: 15px; color: var(--black); border-bottom: 1px solid var(--line-soft); }
.mobile-nav a:hover { color: var(--theme-color); background: var(--tag-bg); }
.mobile-nav .sub-menu a { padding-left: 40px; }
body.nav-open { overflow: hidden; }
body.nav-open .mobile-mask { display: block; }
body.nav-open .mobile-nav { left: 0; }

/* ============ Layout ============ */
.wrap { display: flex; gap: 20px; align-items: flex-start; padding: 20px 0 30px; }
.main { flex: 1; min-width: 0; }
.sidebar { width: 300px; flex: none; }

/* ============ Post List ============ */
.sec-panel {
    background: var(--card-bg);
    border-radius: 4px;
    box-shadow: var(--shadow);
    padding: 6px 24px 10px;
}
.sec-head { padding: 16px 0 2px; }
.page-title { font-size: 20px; font-weight: 700; color: var(--title-color); }
.page-desc { margin-top: 8px; font-size: 14px; color: var(--desc-color); line-height: 1.7; }
.page-count { margin-top: 6px; font-size: 12px; color: var(--meta-color); }

.post-loop { margin: 0; padding: 0; }
.post-loop .item { padding: 22px 0; border-bottom: 1px solid var(--line-soft); }
.post-loop .item:last-child { border-bottom: 0; }
.item-title { font-size: 19px; line-height: 1.5; font-weight: 600; margin-bottom: 8px; }
.item-title a {
    color: var(--title-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.item-title a:hover { color: var(--theme-color); }
.item-excerpt p {
    font-size: 14px;
    color: var(--desc-color);
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.item-meta { display: flex; align-items: center; gap: 14px; margin-top: 12px; font-size: 13px; color: var(--meta-color); }
.item-meta-li { color: var(--meta-color); }
.item-meta-li:hover { color: var(--theme-color); }
.item-meta-right { margin-left: auto; display: inline-flex; align-items: center; gap: 18px; font-size: 13px; }
.item-meta-right .views i { font-size: 12px; margin-right: 3px; }

.status-badge { display: inline-block; padding: 1px 9px; border-radius: 3px; font-size: 12px; line-height: 1.7; }
.status-badge.is-complete { color: var(--success); background: rgba(46, 125, 50, .1); }
.status-badge.is-serial { color: var(--danger); background: rgba(230, 81, 0, .1); }

/* ============ Pagination ============ */
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 22px 0; }
.pagination .page-numbers {
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    background: var(--tag-bg);
    color: var(--text-color);
    border-radius: 4px;
    font-size: 14px;
}
.pagination .page-numbers:hover { color: var(--theme-color); }
.pagination .page-numbers.current { background: var(--theme-color); color: #fff; }

/* ============ Entry (Single) ============ */
.entry {
    background: var(--card-bg);
    border-radius: 4px;
    box-shadow: var(--shadow);
    padding: 28px 32px;
    margin-bottom: 18px;
}
.entry-head { border-bottom: 1px solid var(--line-color); padding-bottom: 16px; margin-bottom: 22px; }
.entry-title { font-size: 26px; font-weight: 700; line-height: 1.45; color: var(--title-color); margin-bottom: 12px; }
.entry-info { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 13px; color: var(--meta-color); }
.entry-info .dot { color: #ccc; }
.entry-cat { color: var(--theme-color); }
.entry-cat:hover { color: var(--theme-hover); }
.entry-info i { margin-right: 3px; font-size: 12px; }

/* 小说信息栏 */
.book-panel { display: flex; gap: 20px; background: var(--tag-bg); border: 1px solid var(--line-soft); border-radius: 6px; padding: 20px; margin-bottom: 24px; }
.book-cover { flex: none; }
.book-cover img { width: 108px; height: 148px; object-fit: cover; border-radius: 4px; box-shadow: 0 3px 12px rgba(0, 0, 0, .14); }
.book-panel-main { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.book-fields li { display: flex; align-items: baseline; margin-bottom: 10px; }
.book-fields li:last-child { margin-bottom: 0; }
.book-fields .k { flex: none; width: 48px; color: var(--meta-color); font-size: 13px; }
.book-fields .v { font-size: 14px; color: var(--text-color); line-height: 1.7; word-break: break-all; }
.btn-read-main {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 30px;
    background: var(--theme-color);
    color: #fff;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
}
.btn-read-main:hover { color: #fff; background: var(--theme-hover); }

/* 正文 */
.entry-content { font-size: 16px; line-height: 1.95; color: var(--text-color); overflow-wrap: break-word; }
.entry-content p { margin-bottom: 18px; }
.entry-content p:last-child { margin-bottom: 0; }
.entry-content ul, .entry-content ol { margin: 0 0 18px; padding-left: 2em; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 6px; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin: 22px 0 12px; color: var(--title-color); }
.entry-content h2 { font-size: 22px; }
.entry-content h3 { font-size: 18px; }
.entry-content blockquote { margin: 0 0 18px; padding: 10px 18px; border-left: 3px solid var(--theme-color); background: var(--tag-bg); color: var(--desc-color); }
.entry-content a { color: var(--theme-color); }
.entry-content a:hover { color: var(--theme-hover); text-decoration: underline; }
.entry-content img { border-radius: 4px; margin: 8px auto; }
.entry-content .wp-caption { max-width: 100%; margin-bottom: 18px; }
.entry-content table { width: 100%; border-collapse: collapse; margin-bottom: 18px; }
.entry-content table th, .entry-content table td { border: 1px solid var(--line-color); padding: 8px 10px; }
.intro-title {
    position: relative;
    padding-left: 14px;
    font-size: 18px;
    font-weight: 700;
    color: var(--title-color);
    margin-bottom: 20px;
}
.intro-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    border-radius: 2px;
    background: var(--theme-color);
}
.page-links { margin-top: 18px; text-align: center; }

/* 阅读按钮 */
.read-cta { margin-top: 30px; padding: 26px 16px; text-align: center; background: var(--tag-bg); border-radius: 6px; }
.read-cta-tip { font-size: 13px; color: var(--meta-color); margin-bottom: 16px; }
.btn-read-big {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 46px;
    background: var(--theme-color);
    color: #fff;
    border-radius: 6px;
    font-size: 17px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(32, 107, 231, .25);
}
.btn-read-big:hover { background: var(--theme-hover); color: #fff; transform: translateY(-1px); }

/* 标签 */
.entry-tag { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.entry-tag-title { font-size: 13px; color: var(--meta-color); }
.entry-tag a { padding: 4px 12px; background: var(--tag-bg); border-radius: 4px; font-size: 13px; color: var(--text-color); }
.entry-tag a:hover { background: var(--theme-color); color: #fff; }

/* 上一篇/下一篇 */
.entry-page { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 18px; }
.entry-page-prev, .entry-page-next { background: var(--card-bg); border-radius: 4px; box-shadow: var(--shadow); padding: 15px 18px; }
.entry-page-prev.empty, .entry-page-next.empty { display: none; }
.entry-page-next { text-align: right; }
.ep-label { display: block; font-size: 12px; color: var(--meta-color); margin-bottom: 6px; }
.ep-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.6;
    color: var(--title-color);
}
.entry-page-prev a:hover .ep-title, .entry-page-next a:hover .ep-title { color: var(--theme-color); }

/* 相关推荐 */
.related-posts { background: var(--card-bg); border-radius: 4px; box-shadow: var(--shadow); padding: 24px; margin-top: 18px; }
.block-title { font-size: 18px; font-weight: 700; color: var(--title-color); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line-color); }
.block-title span { position: relative; padding-left: 12px; }
.block-title span::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 3px;
    border-radius: 2px;
    background: var(--theme-color);
}
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.related-grid a {
    display: block;
    padding: 9px 0;
    font-size: 14px;
    color: var(--text-color);
    border-bottom: 1px dashed var(--line-soft);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.related-grid a:hover { color: var(--theme-color); padding-left: 6px; }

/* ============ Sidebar ============ */
.widget { background: var(--card-bg); border-radius: 4px; box-shadow: var(--shadow); padding: 20px 18px; margin-bottom: 16px; }
.widget:last-child { margin-bottom: 0; }
.widget-title { position: relative; padding-left: 12px; margin: 0 0 15px; font-size: 16px; font-weight: 700; color: var(--title-color); }
.widget-title::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 3px; border-radius: 2px; background: var(--theme-color); }
.widget ul { list-style: none; }
.widget .tagcloud a {
    display: inline-block;
    margin: 0 6px 8px 0;
    padding: 3px 11px;
    background: var(--tag-bg);
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-color);
}
.widget .tagcloud a:hover { background: var(--theme-color); color: #fff; }
.side-list li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line-soft); }
.side-list li:last-child { border-bottom: 0; }
.side-list a { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; color: var(--black); }
.side-list a:hover { color: var(--theme-color); }
.side-list .side-date { flex: none; font-size: 12px; color: var(--meta-color); }
.side-no { flex: none; width: 18px; height: 18px; border-radius: 3px; background: var(--tag-bg); color: var(--meta-color); font-size: 12px; font-style: normal; text-align: center; line-height: 18px; }
.hot-list li:nth-child(-n+3) .side-no { background: var(--theme-color); color: #fff; }

/* 兼容旧版“热门文章”小工具输出 */
.hot-posts li a { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hot-posts .text { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--black); }
.hot-posts .muted { flex: none; font-size: 12px; color: var(--meta-color); }
.hot-posts li a:hover .text { color: var(--theme-color); }

/* 后台上架的通用小工具兜底样式 */
.widget .widget-title + ul li, .widget ul li { padding: 8px 0; border-bottom: 1px dashed var(--line-soft); font-size: 14px; }
.widget ul li:last-child { border-bottom: 0; }

/* ============ No Content ============ */
.no-content { padding: 60px 20px; text-align: center; }
.no-content h2 { font-size: 20px; margin-bottom: 10px; color: var(--title-color); }
.no-content p { color: var(--meta-color); }

/* ============ Footer ============ */
.footer { background: var(--header-bg); border-top: 1px solid var(--line-color); margin-top: 10px; padding: 26px 0 30px; text-align: center; font-size: 13px; color: var(--meta-color); }
.footer-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 12px; }
.footer-nav > a { color: var(--text-color); font-size: 14px; }
.footer-nav > a:hover, .footer-nav a:hover { color: var(--theme-color); }
.footer-menu-links { display: inline-flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-menu-links a { color: var(--text-color); font-size: 14px; }
.footer-friend { margin-bottom: 10px; }
.footer-friend a { color: var(--text-color); }
.footer-friend a:hover { color: var(--theme-color); }
.copyright { line-height: 1.8; }
.copyright a { color: var(--text-color); }
.copyright a:hover { color: var(--theme-color); }
.icp-number { margin-top: 4px; }
.icp-number a { color: var(--meta-color); }
.icp-number a:hover { color: var(--theme-color); }

/* ============ Back Top ============ */
.back-top {
    position: fixed;
    right: 18px;
    bottom: 40px;
    width: 42px;
    height: 42px;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    color: var(--black);
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .14);
    cursor: pointer;
    z-index: 998;
    font-size: 15px;
}
.back-top:hover { color: var(--theme-color); }
.back-top.show { display: inline-flex; }

/* ============ Responsive ============ */
@media (max-width: 991px) {
    .sidebar { display: none; }
}
@media (max-width: 767px) {
    .primary-menu { display: none; }
    .mobile-toggle { display: inline-flex; }
    .logo a { height: 56px; }
    .logo-text { font-size: 20px; }
    .header-inner { height: 56px; justify-content: flex-start; }
    .logo { margin-left: 2px; }
    .navbar-search.active { top: 100%; }
    .entry { padding: 20px 16px; }
    .entry-title { font-size: 21px; }
    .book-panel { flex-direction: column; align-items: flex-start; padding: 16px; }
    .book-cover img { width: 96px; height: 132px; }
    .book-panel-actions { width: 100%; }
    .btn-read-main { width: 100%; justify-content: center; }
    .sec-panel { padding: 4px 16px 8px; }
    .item-title { font-size: 17px; }
    .item-meta { flex-wrap: wrap; }
    .related-grid { grid-template-columns: 1fr; }
    .footer-nav { gap: 4px 14px; }
}
