/* ================================================================
   墨阁 · 小说创作平台 — 主样式表 v3
   设计理念：宣纸为底、墨色为骨、朱砂为印、茶金为饰
   ================================================================ */

/* ===== 色彩系统 ===== */
:root {
    /* 背景层 — 宣纸渐变 */
    --bg: #f5f0e6;
    --bg-card: #fdfaf2;
    --bg-soft: #ebe3d3;
    --bg-input: #f8f3e9;
    --bg-dark: #1c1714;
    --bg-dark-soft: #2a2218;

    /* 主色 — 赭石/茶褐 */
    --primary: #7b4a2d;
    --primary-light: #a06548;
    --primary-dark: #5c3520;

    /* 点缀色 — 茶金 */
    --accent: #c4915c;
    --accent-light: #d9b48a;
    --gold: #b8860b;

    /* 墨色 */
    --ink: #1a1410;
    --ink-light: #4a3f35;
    --ink-muted: #7a6e62;

    /* 文字 */
    --text: #2e2520;
    --text-mid: #5c5048;
    --text-light: #968a80;
    --text-main: var(--text);

    /* 印章红 */
    --seal-red: #c0392b;
    --seal-red-dark: #a93226;

    /* 边框 */
    --border: #d9cdba;
    --border-light: #e8dfd0;

    /* 阴影 — 轻柔墨晕 */
    --shadow-sm: 0 1px 3px rgba(60,40,20,.06), 0 1px 2px rgba(60,40,20,.04);
    --shadow: 0 2px 12px rgba(60,40,20,.08), 0 1px 3px rgba(60,40,20,.04);
    --shadow-lg: 0 8px 30px rgba(60,40,20,.12), 0 2px 8px rgba(60,40,20,.06);
    --shadow-xl: 0 12px 48px rgba(60,40,20,.16), 0 4px 16px rgba(60,40,20,.08);

    /* 圆角 */
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 16px;

    /* 字体 */
    --serif: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
    --sans: 'Noto Sans SC', system-ui, -apple-system, sans-serif;
    --brush: 'Ma Shan Zheng', 'KaiTi', cursive;

    /* 过渡 */
    --transition: all .3s cubic-bezier(.4,0,.2,1);
    --transition-soft: all .4s cubic-bezier(.34,1.56,.64,1);

    /* 装饰 */
    --cloud-opacity: 0.06;
    --seal-opacity: 0.08;
}

/* ===== 暗色主题 ===== */
:root[data-theme="dark"] {
    --bg: #14110e;
    --bg-card: #1f1b16;
    --bg-soft: #2a241d;
    --bg-input: #1a1612;
    --bg-dark: #0a0807;
    --bg-dark-soft: #14110e;

    --primary: #d4a373;
    --primary-light: #e8c39e;
    --primary-dark: #b07d4f;

    --accent: #e8c39e;
    --accent-light: #d4a373;
    --gold: #e6c84b;

    --ink: #ede5dc;
    --ink-light: #b8aea3;
    --ink-muted: #8a8077;

    --text: #ede5dc;
    --text-mid: #b8aea3;
    --text-light: #8a8077;

    --border: #3a3228;
    --border-light: #2a241d;

    --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
    --shadow: 0 2px 12px rgba(0,0,0,.4);
    --shadow-lg: 0 8px 30px rgba(0,0,0,.5);
    --shadow-xl: 0 12px 48px rgba(0,0,0,.6);

    --cloud-opacity: 0.04;
    --seal-opacity: 0.06;
}

/* ===== 牛皮纸主题 ===== */
:root[data-theme="sepia"] {
    --bg: #f5ecd9;
    --bg-card: #faf3e6;
    --bg-soft: #ebe0c8;
    --bg-input: #f8f1e0;
    --bg-dark: #d4c5a8;
    --bg-dark-soft: #e0d3ba;

    --primary: #8b6914;
    --primary-light: #a07c2e;
    --primary-dark: #6b4f10;

    --accent: #c4915c;
    --accent-light: #d9b48a;
    --gold: #b8860b;

    --ink: #3a2a18;
    --ink-light: #5c4a35;
    --ink-muted: #8a7560;

    --text: #3a2a18;
    --text-mid: #5c4a35;
    --text-light: #8a7560;

    --border: #c4b896;
    --border-light: #d9cfb4;

    --shadow-sm: 0 1px 3px rgba(80,60,30,.08);
    --shadow: 0 2px 12px rgba(80,60,30,.1);
    --shadow-lg: 0 8px 30px rgba(80,60,30,.14);
    --shadow-xl: 0 12px 48px rgba(80,60,30,.18);

    --cloud-opacity: 0.06;
    --seal-opacity: 0.08;
}

/* ===== 护眼绿主题 ===== */
:root[data-theme="green"] {
    --bg: #e8efde;
    --bg-card: #f2f6ec;
    --bg-soft: #dae5cc;
    --bg-input: #eef4e6;
    --bg-dark: #c7d6b5;
    --bg-dark-soft: #d5e2c5;

    --primary: #4a7c3f;
    --primary-light: #5d924f;
    --primary-dark: #3a642f;

    --accent: #7a9a65;
    --accent-light: #9bb58a;
    --gold: #8b6914;

    --ink: #2d3a22;
    --ink-light: #4a5c3a;
    --ink-muted: #6e8060;

    --text: #2d3a22;
    --text-mid: #4a5c3a;
    --text-light: #6e8060;

    --border: #c4d4b2;
    --border-light: #d9e4ca;

    --shadow-sm: 0 1px 3px rgba(50,70,30,.08);
    --shadow: 0 2px 12px rgba(50,70,30,.1);
    --shadow-lg: 0 8px 30px rgba(50,70,30,.14);
    --shadow-xl: 0 12px 48px rgba(50,70,30,.18);

    --cloud-opacity: 0.06;
    --seal-opacity: 0.08;
}

/* ===== 基础 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html {
    scroll-behavior: smooth;
    background: var(--bg);
}
body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 滚动条 — 墨竹风格 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-light), var(--primary-light));
    border-radius: 4px;
    border: 1px solid var(--bg-soft);
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent), var(--primary));
}

/* 选中文本 */
::selection { background: rgba(196,145,92,.25); color: var(--ink); }

/* ===== 导航栏 ===== */
#navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2.5rem;
    height: 62px;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-soft) 100%);
    box-shadow: 0 2px 20px rgba(0,0,0,.12);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--accent);
}

.nav-left { display: flex; align-items: center; gap: 1.8rem; }

.logo {
    font-family: var(--brush);
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--accent-light);
    text-decoration: none;
    text-shadow: 0 2px 8px rgba(196,145,92,.25);
    letter-spacing: .12em;
    position: relative;
    padding: 0 4px;
    transition: var(--transition);
}
.logo:hover { color: #fff; }
.logo svg { transition: transform .3s ease; }
.logo:hover svg { transform: rotate(-5deg) scale(1.05); }

.nav-divider {
    width: 1px;
    height: 20px;
    background: linear-gradient(180deg, transparent, rgba(255,255,255,.2), transparent);
}

.nav-link {
    color: rgba(255,255,255,.72);
    text-decoration: none;
    font-size: .88rem;
    transition: var(--transition);
    font-weight: 400;
    position: relative;
    padding: .2rem 0;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--primary-light));
    border-radius: 1px;
    transition: all .3s ease;
    transform: translateX(-50%);
}
.nav-link:hover { color: #fff; }
.nav-link:hover::after { width: 100%; }
.nav-link.active { color: #fff; }
.nav-link.active::after { width: 100%; }

.btn-register {
    background: linear-gradient(135deg, var(--accent), var(--primary-light));
    color: #fff !important;
    padding: .4rem 1.3rem;
    border-radius: 22px;
    font-weight: 500;
    transition: var(--transition-soft);
}
.btn-register::after { display: none; }
.btn-register:hover {
    box-shadow: 0 4px 16px rgba(196,145,92,.4);
    transform: translateY(-2px);
}

.nav-right { display: flex; align-items: center; gap: 1.2rem; }
.nav-user-name {
    color: var(--accent-light);
    font-weight: 500;
    font-size: .9rem;
    text-decoration: none;
    transition: var(--transition);
}
.nav-user-name:hover { color: #fff; }

/* 主题切换按钮 */
.theme-toggle {
    background: transparent;
    border: 1px solid rgba(255,255,255,.2);
    color: rgba(255,255,255,.85);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}
.theme-toggle:hover { background: rgba(255,255,255,.1); transform: rotate(15deg); }

/* 公告按钮 */
.nav-announcement-btn {
    background: transparent;
    border: none;
    padding: .5rem .4rem;
    color: rgba(255,255,255,.7);
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
}
.nav-announcement-btn:hover { color: #fff; transform: translateY(-1px); }
.nav-announcement-btn .svg-icon { width: 1.2em; height: 1.2em; }

.announcement-badge {
    position: absolute;
    top: 0;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #c0392b;
    color: #fff;
    border-radius: 9px;
    font-size: .65rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(192,57,43,.4);
    animation: badge-pulse 2s ease-in-out infinite;
}
@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 2px 6px rgba(192,57,43,.4); }
    50% { box-shadow: 0 2px 12px rgba(192,57,43,.8); }
}

/* 移动端汉堡菜单 */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: rgba(255,255,255,.8);
    cursor: pointer;
    padding: .5rem;
    align-items: center;
}
.mobile-menu-btn:hover { color: #fff; }

/* ===== 主区域 ===== */
main {
    flex: 1;
    max-width: 1140px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    width: 100%;
}

/* ===== 首页 Hero ===== */
.hero {
    text-align: center;
    padding: 4rem 1rem 3rem;
    background:
        radial-gradient(ellipse at 30% 0%, rgba(196,145,92,.1) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 100%, rgba(123,74,45,.06) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-soft) 0%, transparent 100%);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}
.hero h1 {
    font-family: var(--brush);
    font-size: 3.5rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: .6rem;
    letter-spacing: .18em;
    text-shadow: 0 4px 24px rgba(123,74,45,.1);
    position: relative;
    z-index: 1;
}
.hero p {
    color: var(--text-mid);
    font-size: 1.05rem;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0 1rem;
    position: relative;
    z-index: 1;
}
.stat-item {
    text-align: center;
    position: relative;
    transition: transform .3s ease;
}
.stat-item:hover { transform: translateY(-4px); }
.stat-item:hover .stat-num { color: var(--primary-dark); }
.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 32px;
    background: linear-gradient(180deg, transparent, var(--border), transparent);
}
.stat-num {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    font-family: var(--serif);
    transition: color .3s;
}
.stat-label {
    font-size: .78rem;
    color: var(--text-light);
    margin-top: .2rem;
}

.hero-divider {
    position: relative;
    z-index: 1;
    width: 120px;
    height: 2px;
    margin: 1.2rem auto 0;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: 2px;
}
.hero-divider::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    opacity: .5;
}

.hero-actions {
    margin-top: 1.2rem;
    display: flex;
    justify-content: center;
    gap: .6rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.home-bottom-cta {
    text-align: center;
    margin: 2.5rem auto 1rem;
    padding: 1rem;
}

/* Section 标题 */
.section-title {
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin: 2rem 0 1.2rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}
.section-title::before {
    content: '';
    width: 4px;
    height: 22px;
    background: linear-gradient(180deg, var(--accent), var(--primary));
    border-radius: 2px;
}

/* 搜索栏 */
.search-bar {
    display: flex;
    gap: .6rem;
    margin-bottom: 2rem;
    background: var(--bg-card);
    padding: .4rem;
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all .3s ease;
}
.search-bar:focus-within {
    box-shadow: 0 4px 20px rgba(123,74,45,.1), 0 0 0 2px rgba(196,145,92,.15);
    transform: translateY(-1px);
}
.search-bar input {
    flex: 1;
    padding: .7rem 1.2rem;
    border: none;
    border-radius: 20px;
    font-size: .92rem;
    background: transparent;
    outline: none;
    color: var(--text);
}
.search-bar input::placeholder { color: var(--text-light); }
.search-bar button {
    padding: .7rem 1.8rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: .88rem;
    font-weight: 500;
    transition: var(--transition);
}
.search-bar button:hover {
    box-shadow: 0 4px 15px rgba(123,74,45,.3);
    transform: translateY(-1px);
}

/* ===== 小说卡片 ===== */
.novel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}
.novel-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition-soft);
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-light);
    position: relative;
}
.novel-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .4s ease;
    z-index: 2;
}
.novel-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-light);
}
.novel-card:hover::before { transform: scaleX(1); }

.novel-cover {
    width: 100%;
    height: 260px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    padding: 1.5rem;
    overflow: hidden;
}
.novel-cover::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, var(--primary-dark) 100%);
}
.novel-cover::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.15) 0%, transparent 60%);
    transition: opacity .4s ease;
}
.novel-cover span {
    position: relative; z-index: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.novel-cover img {
    width: 100%; height: 100%;
    object-fit: cover;
    position: absolute; top: 0; left: 0;
}
.novel-card:hover .novel-cover img { transform: scale(1.05); transition: transform .4s; }
.novel-card:hover .novel-cover::after { opacity: .5; }

.novel-card-body { padding: 1rem 1rem 1.2rem; }
.novel-card-title {
    font-size: .98rem;
    font-weight: 700;
    margin-bottom: .35rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    display: inline-block;
    max-width: 100%;
}
.novel-card-title::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 0; height: 2px;
    background: var(--primary);
    transition: width .3s ease;
}
.novel-card:hover .novel-card-title::after { width: 100%; }

.novel-card-author { font-size: .8rem; color: var(--text-light); margin-bottom: .4rem; }
.novel-card-summary {
    font-size: .8rem;
    color: var(--text-mid);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.novel-card-meta { display: flex; gap: .8rem; font-size: .72rem; color: var(--text-light); margin-top: .5rem; }
.tags { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .5rem; }
.tag {
    background: var(--bg-soft);
    color: var(--primary);
    padding: .15rem .6rem;
    border-radius: 12px;
    font-size: .7rem;
    font-weight: 500;
}
.novel-card-rating { margin: .35rem 0; }

/* ===== 小说详情 ===== */
.novel-detail-header { display: flex; gap: 2rem; margin-bottom: 2rem; }
.novel-detail-cover {
    width: 190px; height: 260px;
    border-radius: var(--radius);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: var(--serif);
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    padding: 1.5rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.novel-detail-cover::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--primary), var(--accent), var(--primary-dark));
}
.novel-detail-cover::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.15) 0%, transparent 60%);
}
.novel-detail-cover span { position: relative; z-index: 1; text-shadow: 0 2px 10px rgba(0,0,0,.3); }

.novel-detail-cover-img-wrap {
    width: 190px; height: 260px;
    border-radius: var(--radius);
    flex-shrink: 0;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
}
.novel-detail-cover-img-wrap::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--primary), var(--accent), var(--primary-dark));
    z-index: 0;
}
.novel-detail-cover-img {
    width: 100%; height: 100%;
    object-fit: cover;
    position: relative; z-index: 1;
}

.novel-detail-info { flex: 1; }
.novel-detail-title {
    font-family: var(--serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: .4rem;
}
.novel-detail-author { color: var(--text-mid); margin-bottom: .6rem; font-size: .9rem; }
.novel-detail-summary { color: var(--text-mid); line-height: 1.7; margin-bottom: .6rem; font-size: .92rem; }
.novel-detail-stats { display: flex; gap: 1.5rem; color: var(--text-light); font-size: .82rem; }
.novel-detail-rating { margin: .75rem 0; display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.novel-detail-rating .rating-row { transform: scale(1.15); transform-origin: left center; }
.novel-detail-rating .btn { margin-left: auto; }

.status-badge { padding: .2rem .7rem; border-radius: 12px; font-size: .72rem; font-weight: 600; }
.status-ongoing { background: #e8f5e9; color: #2e7d32; }
.status-completed { background: #e3f2fd; color: #1565c0; }
.status-hiatus { background: #fff3e0; color: #e65100; }

.novel-latest-update {
    margin-top: .5rem;
    font-size: .82rem;
    color: var(--text-mid);
    padding: .4rem .6rem;
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent);
}
.novel-latest-update a { font-weight: 500; }

.chapter-list {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.2rem 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}
.chapter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .7rem 0;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}
.chapter-item:last-child { border-bottom: none; }
.chapter-item:hover { padding-left: .5rem; }
.chapter-item a { color: var(--text); text-decoration: none; font-size: .9rem; font-weight: 500; }
.chapter-item a:hover { color: var(--primary); }
.chapter-meta { font-size: .75rem; color: var(--text-light); }

/* ===== 阅读页 ===== */
.reader { max-width: 720px; margin: 0 auto; }
.reader-title {
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    position: relative;
}
.reader-title::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%; transform: translateX(-50%);
    width: 40px; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

.reader-nav { display: flex; justify-content: space-between; margin-bottom: 1.5rem; }
.reader-nav a {
    padding: .5rem 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    text-decoration: none;
    color: var(--primary);
    font-size: .85rem;
    font-weight: 500;
    transition: var(--transition);
}
.reader-nav a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.reader-nav a.disabled { opacity: .3; pointer-events: none; }

.reader-content {
    font-family: var(--serif);
    font-size: 1.1rem;
    line-height: 2.1;
    letter-spacing: .02em;
    color: var(--text);
    white-space: pre-wrap;
    background: var(--bg-card);
    padding: 3rem 3.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    position: relative;
}
.reader-content p { text-indent: 2em; margin-bottom: .8em; }
.reader-content blockquote {
    margin: 1.5em 0;
    padding: 1em 1.5em;
    border-left: 4px solid var(--accent);
    background: rgba(196,145,92,.04);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-mid);
    font-style: italic;
    position: relative;
}
.reader-content blockquote::before {
    content: '「';
    position: absolute;
    top: -.2em; left: .2em;
    font-size: 2rem;
    color: var(--accent);
    opacity: .3;
    font-family: var(--serif);
}
.reader-content hr {
    border: none;
    height: 2px;
    width: 60%;
    margin: 2.5em auto;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    position: relative;
}
.reader-content hr::before {
    content: '';
    position: absolute;
    top: -3px; left: 50%; transform: translateX(-50%);
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent);
    opacity: .5;
}

.reader-meta { display: flex; justify-content: center; gap: 1.5rem; color: var(--text-light); font-size: .82rem; margin-bottom: .8rem; }
.reader-toolbar { display: flex; justify-content: center; gap: .3rem; margin-bottom: 1rem; }
.reader-tool {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: .25rem .7rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: .85rem;
    color: var(--text-mid);
    transition: all .15s;
}
.reader-tool:hover { background: var(--bg-soft); color: var(--primary); }
.reader-tool-divider { width: 1px; height: 20px; background: var(--border); margin: 0 .2rem; }
.reader-keys { text-align: center; color: var(--text-light); font-size: .75rem; margin-top: 1rem; }

.reader-chapter-info {
    display: flex; justify-content: space-between; align-items: center;
    font-size: .8rem; color: var(--text-light); margin-bottom: .5rem;
}
.reader-novel-link { color: var(--primary); text-decoration: none; font-weight: 500; }
.reader-novel-link:hover { text-decoration: underline; }
.reader-chapter-pos { font-weight: 500; }
.reader-end-badge { color: var(--gold); font-weight: 600; }

.reader-scroll-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    z-index: 9999; transition: width .1s ease-out;
    box-shadow: 0 0 6px var(--primary);
}

/* 夜间阅读模式 */
.reader.night-mode { background: #1a1814; border-radius: var(--radius-lg); padding: 1rem; }
.reader.night-mode .reader-title,
.reader.night-mode .reader-content,
.reader.night-mode .reader-chapter-info .reader-novel-link {
    color: #c8b896 !important;
}
.reader.night-mode .reader-content {
    background: #1a1814 !important;
    color: #b8a890 !important;
    border-color: #2a2620 !important;
}
.reader.night-mode .reader-meta,
.reader.night-mode .reader-keys { color: #6a6055 !important; }
.reader.night-mode .reader-tool { background: #2a2620 !important; border-color: #3a3530 !important; color: #8a8075 !important; }

/* 末章引导 */
.reader-end-card {
    text-align: center;
    padding: 2rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}
.reader-end-title { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; color: var(--primary); margin-bottom: .5rem; }
.reader-end-text { color: var(--text-mid); font-size: .88rem; margin-bottom: 1rem; }
.reader-end-actions { display: flex; justify-content: center; gap: .5rem; flex-wrap: wrap; }

/* ===== 写作页 ===== */
.write-layout { display: flex; gap: 1.5rem; }
.novel-list-panel { width: 260px; flex-shrink: 0; }
.novel-list-panel h3 { font-family: var(--serif); color: var(--primary); margin-bottom: .8rem; font-size: 1.1rem; }
.novel-list-item {
    padding: .7rem .9rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: .88rem;
    transition: var(--transition);
    margin-bottom: .3rem;
    border: 1px solid transparent;
}
.novel-list-item:hover { background: var(--bg-card); border-color: var(--border-light); }
.novel-list-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border-color: transparent;
}

.editor-panel { flex: 1; }
.editor-panel textarea {
    width: 100%;
    min-height: 400px;
    padding: 1.2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--serif);
    font-size: 1rem;
    line-height: 1.9;
    resize: vertical;
    background: var(--bg-card);
    transition: var(--transition);
    color: var(--text);
}
.editor-panel textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(196,145,92,.1); }
.editor-panel input {
    width: 100%;
    padding: .7rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: .95rem;
    margin-bottom: .8rem;
    background: var(--bg-card);
    transition: var(--transition);
    color: var(--text);
}
.editor-panel input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(196,145,92,.1); }

.chapter-list-edit {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    margin-top: 1rem;
    border: 1px solid var(--border-light);
}
.chapter-edit-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 0;
    border-bottom: 1px solid var(--border-light);
    transition: background .15s;
}
.chapter-edit-item:last-child { border-bottom: none; }
.chapter-edit-item.dragging { opacity: .4; }
.chapter-edit-item.drag-over { background: var(--bg-soft); border-top: 2px solid var(--primary); }
.chapter-edit-item a { flex: 1; color: var(--text); text-decoration: none; font-size: .88rem; }
.chapter-edit-item a:hover { color: var(--primary); }
.chapter-edit-item .btn-del { color: #c0392b; cursor: pointer; font-size: .78rem; border: none; background: none; }

.editor-status { display: flex; justify-content: space-between; margin: -.3rem 0 .5rem; padding: 0 .2rem; }
.editor-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; flex-wrap: wrap; gap: .5rem; }
.editor-title { font-family: var(--serif); color: var(--primary); font-size: 1.3rem; margin: 0; }
.editor-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.drag-handle { color: var(--text-light); cursor: grab; user-select: none; padding: 0 .3rem; font-size: 1.1rem; }
.drag-handle:active { cursor: grabbing; }
.chap-title { flex: 1; color: var(--text); text-decoration: none; font-size: .88rem; }
.chap-title:hover { color: var(--primary); }
.btn-icon { background: transparent; border: none; cursor: pointer; font-size: .95rem; padding: .2rem .4rem; border-radius: 4px; transition: background .15s; }
.btn-icon:hover { background: var(--bg-soft); }
.char-count { text-align: right; margin-top: .2rem; }

/* ===== 表单 ===== */
.form-card {
    max-width: 420px;
    margin: 3rem auto;
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}
.form-card h2 { font-family: var(--serif); color: var(--primary); margin-bottom: 1.2rem; text-align: center; font-size: 1.5rem; }
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; margin-bottom: .4rem; font-size: .85rem; color: var(--text-mid); font-weight: 500; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: .7rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .92rem;
    background: var(--bg);
    transition: var(--transition);
    color: var(--text);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(196,145,92,.1);
}
.form-group textarea { min-height: 90px; resize: vertical; }

/* ===== 按钮 ===== */
.btn {
    display: inline-block;
    padding: .65rem 1.6rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: .88rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    transform: translate(-50%, -50%);
    transition: width .5s, height .5s;
}
.btn:hover::after { width: 300px; height: 300px; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; }
.btn-primary:hover { box-shadow: 0 4px 15px rgba(123,74,45,.3); transform: translateY(-1px); }
.btn-secondary { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-soft); border-color: var(--accent-light); }
.btn-danger { background: #c0392b; color: #fff; }
.btn-danger:hover { background: #a93226; }
.btn-block { width: 100%; }
.btn-sm { padding: .3rem .7rem; font-size: .78rem; }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-active { background: var(--bg-soft) !important; color: var(--text-mid) !important; border-color: var(--border) !important; }

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 2rem; left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--bg-dark);
    color: #fff;
    padding: .8rem 1.8rem;
    border-radius: 24px;
    z-index: 2000;
    opacity: 0;
    transition: var(--transition);
    font-size: .88rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(196,145,92,.3);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.toast-ok { border-color: #4caf50; }
.toast.toast-error { border-color: #f44336; }
.toast.toast-warn { border-color: #ff9800; }

/* ===== 空状态 ===== */
.empty { text-align: center; padding: 3.5rem 1rem; color: var(--text-light); }
.empty-icon { font-size: 3.5rem; margin-bottom: .8rem; opacity: .6; }
.empty p { font-size: .92rem; }
.empty a {
    display: inline-block;
    margin-top: .5rem;
    padding: .4rem 1.2rem;
    border-radius: 20px;
    background: var(--bg-soft);
    color: var(--primary);
    text-decoration: none;
    font-size: .85rem;
    font-weight: 500;
    transition: all .3s ease;
}
.empty a:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(123,74,45,.2);
}

/* ===== Footer ===== */
footer {
    text-align: center;
    padding: 2.5rem 2rem 2rem;
    margin-top: auto;
    background: var(--bg-dark);
    color: rgba(255,255,255,.4);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    width: 100%;
}
.footer-content { display: flex; flex-direction: column; gap: .3rem; align-items: center; }
.footer-brand { font-family: var(--brush); font-size: 1.3rem; color: var(--accent-light); position: relative; display: inline-block; }
.footer-slogan { font-size: .82rem; }
.footer-copy { font-size: .72rem; opacity: .6; }

/* ===== 顶部进度条 ===== */
.top-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    z-index: 10000; pointer-events: none;
    transition: width .4s ease, opacity .3s;
    box-shadow: 0 0 8px var(--primary);
}
.top-progress.loading { width: 90%; animation: top-progress-anim 1.5s ease-in-out infinite; }
.top-progress.done { width: 100%; opacity: 0; transition: width .2s, opacity .3s .1s; }
@keyframes top-progress-anim {
    0% { transform: translateX(-30%); }
    50% { transform: translateX(60%); }
    100% { transform: translateX(120%); }
}

/* ===== 模态框 ===== */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 2000;
    opacity: 0; transition: opacity .2s;
    backdrop-filter: blur(2px);
}
.modal-overlay.show { opacity: 1; }
.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    max-width: 420px;
    width: calc(100% - 2rem);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
    transform: scale(.95);
    transition: transform .2s;
}
.modal-overlay.show .modal { transform: scale(1); }
.modal h3 { font-family: var(--serif); color: var(--primary); margin-bottom: .8rem; font-size: 1.2rem; }
.modal p { color: var(--text-mid); margin-bottom: 1.2rem; line-height: 1.6; }
.modal-actions { display: flex; justify-content: flex-end; gap: .5rem; }

.modal-card { background: var(--bg-card); padding: 1.8rem; border-radius: var(--radius); box-shadow: var(--shadow-lg); max-width: 360px; width: 90%; }
.modal-card h3 { margin: 0 0 .5rem; color: var(--primary); }

/* ===== 加载骨架屏 ===== */
.novel-grid-skeleton { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; }
.novel-card-skeleton {
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    height: 380px;
}
.novel-card-skeleton::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(196,145,92,.08) 50%, transparent 100%);
    animation: skeleton-sweep 1.8s infinite;
}
@keyframes skeleton-sweep {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ===== 通用小工具 ===== */
.muted { color: var(--text-light); }
.small { font-size: .82rem; }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    main { max-width: 100%; }
    .novel-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

@media (max-width: 768px) {
    #navbar { padding: 0 1rem; height: 52px; }
    .nav-left { gap: 1rem; }
    .logo { font-size: 1.5rem; }
    .hero h1 { font-size: 2.4rem; letter-spacing: .15em; }
    .stats-bar { gap: 1.5rem; }
    .stat-num { font-size: 1.5rem; }
    .novel-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
    .novel-cover { height: 200px; font-size: 1.1rem; }
    .novel-detail-header { flex-direction: column; }
    .novel-detail-cover { width: 100%; height: 220px; }
    .novel-detail-title { font-size: 1.5rem; }
    .write-layout { flex-direction: column; }
    .novel-list-panel { width: 100%; }
    .reader-content { padding: 1.5rem 1.2rem; font-size: 1.02rem; line-height: 2; }
    .form-card { margin: 1.5rem 1rem; padding: 1.5rem; }
}

@media (max-width: 720px) {
    .mobile-menu-btn { display: inline-flex; }
    .nav-left {
        position: fixed; top: 60px; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--bg-dark);
        max-height: 0; overflow: hidden;
        transition: max-height .3s ease;
        box-shadow: 0 4px 20px rgba(0,0,0,.2);
        z-index: 99;
    }
    .nav-left.open { max-height: 400px; }
    .nav-left .logo { padding: 1rem 1.5rem; display: flex; align-items: center; border-bottom: 1px solid rgba(255,255,255,.1); }
    .nav-left .nav-divider { display: none; }
    .nav-left .nav-link {
        padding: .85rem 1.5rem;
        border-bottom: 1px solid rgba(255,255,255,.05);
    }
    .nav-left .nav-link::after { display: none; }
}

@media (max-width: 640px) {
    .editor-panel { width: 100%; }
    .editor-header { flex-direction: column; align-items: stretch; }
    .reader-toolbar { flex-wrap: wrap; }
    .reader-nav { flex-wrap: wrap; gap: .5rem; justify-content: center; }
    .shelf-tab { padding: .4rem .8rem; font-size: .82rem; }
    .shelf-progress { flex-direction: column; align-items: stretch; gap: .3rem; }
    .progress-bar { min-width: 100%; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2rem; }
    .hero-divider { width: 80px; }
}

/* ===== 快捷小贴士 + 快捷键按钮 ===== */
.shortcut-float-btn {
    position: fixed; bottom: 120px; right: 20px;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-light);
    z-index: 998;
    transition: all .2s;
}
.shortcut-float-btn:hover { color: var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-2px); }

/* ===== 快捷键悬浮面板 ===== */
.shortcut-float {
    position: fixed; bottom: 165px; right: 20px;
    width: 260px; max-height: 70vh;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    overflow: hidden;
    opacity: 0; transform: translateY(10px) scale(.95);
    transition: opacity .2s, transform .2s;
    pointer-events: none;
}
.shortcut-float.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.shortcut-float-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: .65rem 1rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-soft);
}
.shortcut-float-title { font-weight: 600; font-size: .85rem; color: var(--text); }
.shortcut-float-close {
    background: none; border: none;
    color: var(--text-light); cursor: pointer;
    font-size: 1.2rem; line-height: 1; padding: 0 .2rem;
}
.shortcut-float-close:hover { color: var(--seal-red); }
.shortcut-float-body {
    padding: .6rem .8rem;
    overflow-y: auto;
    max-height: calc(70vh - 42px);
}
.shortcut-float-body .shortcut-group { margin-bottom: .8rem; }
.shortcut-float-body .shortcut-group h4 {
    font-size: .75rem; color: var(--primary);
    margin-bottom: .3rem; font-weight: 600;
}
.shortcut-float-body .shortcut-row {
    display: flex; align-items: center; gap: .4rem;
    padding: .25rem 0; font-size: .78rem; color: var(--text-mid);
}
.shortcut-float-body kbd {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: .1rem .35rem;
    font-size: .72rem;
    font-family: monospace;
    color: var(--text);
}

@media (max-width: 480px) {
    .shortcut-float-btn { right: 8px; bottom: 110px; }
    .shortcut-float {
        right: 8px; left: 8px; width: auto;
        bottom: 70px;
    }
}

/* ===== PC 大屏自适应 ===== */
@media (min-width: 1400px) {
    main { max-width: 1280px; padding: 3rem 2rem; }
    .novel-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.8rem; }
    .hero { padding: 5rem 2rem 4rem; }
    .hero h1 { font-size: 3rem; letter-spacing: .2em; }
}

@media (min-width: 1800px) {
    main { max-width: 1500px; }
    .novel-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2rem; }
}

@media (min-width: 2200px) {
    main { max-width: 1800px; }
    .novel-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2.2rem; }
}

/* ===== 减动效偏好 ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01s !important;
    }
}

/* ===== 书架 ===== */
.shelf-tabs {
    display: flex; gap: .3rem; margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border); padding-bottom: .3rem;
}
.shelf-tab {
    padding: .55rem 1.3rem;
    border: none; background: transparent;
    color: var(--text-light);
    font-size: .9rem; cursor: pointer;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: var(--transition);
    position: relative;
}
.shelf-tab:hover { color: var(--primary); }
.shelf-tab.active { color: var(--primary); font-weight: 700; }
.shelf-tab.active::after {
    content: ''; position: absolute; bottom: -.3rem; left: 0;
    width: 100%; height: 2px; background: var(--primary);
    border-radius: 1px;
}

.shelf-card { position: relative; }
.shelf-card .btn-unbookmark {
    position: absolute; top: .5rem; right: .5rem; z-index: 2;
    width: 26px; height: 26px; border-radius: 50%;
    background: rgba(0,0,0,.4); color: #fff; font-size: .8rem;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .2s;
}
.shelf-card:hover .btn-unbookmark { opacity: 1; }
.shelf-card .btn-unbookmark:hover { background: #c0392b; }

.shelf-progress {
    display: flex; align-items: center; gap: .5rem; margin-top: .6rem;
    flex-wrap: wrap;
}
.btn-continue {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff; border: none;
    padding: .35rem .9rem; border-radius: 16px;
    font-size: .78rem; font-weight: 500;
    cursor: pointer; transition: var(--transition);
    white-space: nowrap;
}
.btn-continue:hover { box-shadow: 0 2px 10px rgba(123,74,45,.3); transform: translateY(-1px); }
.progress-bar {
    flex: 1; min-width: 60px; height: 5px;
    background: var(--bg-soft); border-radius: 3px; overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    border-radius: 3px; transition: width .5s ease;
}

/* ===== 排行榜 ===== */
.ranking-list { display: flex; flex-direction: column; gap: .8rem; }
.ranking-item {
    display: flex; align-items: flex-start; gap: 1rem;
    text-decoration: none; color: inherit;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1rem 1.2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    cursor: pointer;
}
.ranking-item:hover { transform: translateX(4px); box-shadow: var(--shadow-lg); border-color: var(--accent-light); }
.ranking-rank {
    font-size: 1.5rem; font-weight: 700; color: var(--text-light);
    min-width: 48px; text-align: center; flex-shrink: 0; line-height: 1.5;
    font-family: var(--serif);
}
.ranking-cover {
    width: 50px; height: 70px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0;
}
.ranking-item.rank-1 { border-left: 4px solid #ffd700; }
.ranking-item.rank-2 { border-left: 4px solid #c0c0c0; }
.ranking-item.rank-3 { border-left: 4px solid #cd7f32; }
.ranking-item.rank-1 .ranking-rank,
.ranking-item.rank-2 .ranking-rank,
.ranking-item.rank-3 .ranking-rank { font-size: 2rem; }

/* ===== 分类导航 ===== */
.category-nav-wrap {
    display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.5rem;
    padding: .8rem 0;
}
.category-chip {
    display: inline-flex; align-items: center; gap: .3rem;
    background: var(--bg-card); color: var(--text-mid);
    border: 1px solid var(--border);
    padding: .35rem .9rem; border-radius: 20px;
    font-size: .82rem; text-decoration: none;
    transition: var(--transition); font-weight: 500;
}
.category-chip:hover {
    background: var(--primary); color: #fff; border-color: var(--primary);
    transform: translateY(-1px);
}
.category-count {
    background: var(--bg-soft); color: var(--text-light);
    padding: .1rem .4rem; border-radius: 10px; font-size: .7rem;
    min-width: 18px; text-align: center;
}
.category-chip:hover .category-count { background: rgba(255,255,255,.25); color: rgba(255,255,255,.8); }

/* ===== 最近更新 ===== */
.recent-updates-list {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: .8rem; margin-bottom: 1.5rem;
}
.recent-update-item {
    display: flex; gap: .8rem;
    text-decoration: none; color: inherit;
    background: var(--bg-card); border-radius: var(--radius);
    padding: .6rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition); cursor: pointer;
}
.recent-update-item:hover { box-shadow: var(--shadow); border-color: var(--accent-light); transform: translateY(-2px); }
.recent-update-cover {
    width: 50px; height: 70px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0;
}
.recent-update-body { flex: 1; min-width: 0; }
.recent-update-title {
    font-size: .88rem; font-weight: 600; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.recent-update-author { font-size: .75rem; color: var(--text-light); }
.recent-update-latest {
    font-size: .75rem; color: var(--primary); font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-top: .15rem;
}
.recent-update-time { font-size: .7rem; color: var(--text-light); margin-top: .15rem; }
.recent-update-badge { color: #2e7d32; font-weight: 600; }

/* ===== 作者主页 ===== */
.author-header {
    display: flex; gap: 1.5rem; align-items: center; margin-bottom: 2rem;
    background: var(--bg-card); padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}
.author-avatar {
    width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; font-weight: 700;
}
.author-info { flex: 1; }
.author-name { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; color: var(--text); margin-bottom: .3rem; }
.author-joined { font-size: .8rem; color: var(--text-light); margin-bottom: .5rem; }
.author-stats { display: flex; gap: 1.5rem; font-size: .82rem; color: var(--text-mid); flex-wrap: wrap; }

/* ===== 评论区 ===== */
.comments-section { margin-top: 2rem; }
.comment-form-wrap {
    background: var(--bg-card); border-radius: var(--radius); padding: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 1.5rem;
}
.comment-form-wrap textarea {
    width: 100%; padding: .7rem;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: .9rem; background: var(--bg); color: var(--text);
    resize: vertical; font-family: var(--sans);
    transition: var(--transition);
}
.comment-form-wrap textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(196,145,92,.1); }

.comment-list { display: flex; flex-direction: column; gap: .8rem; }
.comment-item {
    display: flex; gap: .8rem;
    background: var(--bg-card); border-radius: var(--radius);
    padding: .9rem 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}
.comment-item:hover { border-color: var(--border); }
.comment-avatar {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .85rem;
}
.comment-body { flex: 1; min-width: 0; }
.comment-header { display: flex; align-items: center; gap: .6rem; margin-bottom: .3rem; flex-wrap: wrap; }
.comment-author { font-weight: 600; font-size: .85rem; color: var(--text); }
.comment-time { font-size: .75rem; color: var(--text-light); }
.comment-text { font-size: .88rem; color: var(--text-mid); line-height: 1.6; word-break: break-word; margin-bottom: .3rem; }
.comment-actions { display: flex; gap: 1rem; align-items: center; }
.btn-comment-action {
    background: none; border: none; cursor: pointer;
    font-size: .8rem; color: var(--text-light);
    padding: .15rem .3rem; border-radius: 4px;
    transition: all .15s;
}
.btn-comment-action:hover { color: var(--primary); background: var(--bg-soft); }
.btn-comment-action.liked { color: var(--primary); font-weight: 600; }
.btn-del-comment { margin-left: auto; font-size: .8rem; }
.btn-del-comment:hover { color: #c0392b; }
.reply-to-label { color: var(--primary); font-weight: 600; }
.btn-fold { cursor: pointer; }
.btn-fold:hover { color: var(--primary); }
.comment-replies.folded { display: none; }
.comment-replies {
    margin-top: .6rem; padding-left: .8rem;
    border-left: 2px solid var(--border);
    display: flex; flex-direction: column; gap: .5rem;
}
.reply-form-wrapper { margin-top: .5rem; }
.reply-form { margin-top: .5rem; }
.reply-form textarea {
    width: 100%; padding: .5rem;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: .85rem; background: var(--bg); color: var(--text);
    resize: vertical;
}
.reply-form textarea:focus { border-color: var(--accent); outline: none; }

/* ===== 目录抽屉 ===== */
.toc-drawer-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.4); z-index: 1500;
    opacity: 0; transition: opacity .2s;
    backdrop-filter: blur(2px);
}
.toc-drawer-overlay.show { opacity: 1; }
.toc-drawer {
    position: absolute; top: 0; right: 0;
    height: 100%; width: 360px; max-width: 85vw;
    background: var(--bg-card);
    box-shadow: -8px 0 30px rgba(0,0,0,.15);
    transform: translateX(100%);
    transition: transform .25s ease;
    display: flex; flex-direction: column;
    border-left: 1px solid var(--border);
}
.toc-drawer-overlay.show .toc-drawer { transform: translateX(0); }
.toc-drawer-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border);
    font-family: var(--serif); font-size: 1.1rem; font-weight: 700; color: var(--primary);
}
.toc-close { background: none; border: none; cursor: pointer; font-size: 1.2rem; color: var(--text-light); transition: color .2s; }
.toc-close:hover { color: var(--text); }
.toc-drawer-body { flex: 1; overflow-y: auto; padding: .5rem 0; }
.toc-drawer-item {
    display: flex; align-items: center; gap: .5rem;
    padding: .6rem 1.2rem;
    text-decoration: none; color: var(--text);
    transition: background .15s;
    border-bottom: 1px solid var(--border-light);
    font-size: .88rem;
}
.toc-drawer-item:hover { background: var(--bg-soft); }
.toc-drawer-item.current {
    background: var(--bg-soft); color: var(--primary); font-weight: 600;
    border-left: 3px solid var(--primary);
}
.toc-drawer-num { color: var(--text-light); font-size: .78rem; min-width: 28px; }
.toc-drawer-title-text { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toc-drawer-wc { color: var(--text-light); font-size: .72rem; }

/* ===== 章节搜索 ===== */
.chapter-search-bar { margin-bottom: .8rem; }
.chapter-search-bar input {
    width: 100%; padding: .55rem .9rem;
    border: 1px solid var(--border); border-radius: 20px;
    font-size: .85rem; background: var(--bg-card); color: var(--text);
    transition: var(--transition);
}
.chapter-search-bar input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(196,145,92,.1); }

/* ===== 搜索高亮 ===== */
.search-highlight { background: rgba(196,145,92,.25); color: inherit; border-radius: 3px; padding: 0 2px; font-weight: 600; }

/* ===== 返回顶部 ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    box-shadow: var(--shadow-lg);
    z-index: 800;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    overflow: hidden;
}
.back-to-top::before {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 50%;
    pointer-events: none;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-5px) scale(1.05); box-shadow: 0 6px 20px rgba(123,74,45,.4); }

/* ===== 全站数据看板 ===== */
.platform-stats-card {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    margin: 2rem 0;
}
.platform-stats-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem; margin-top: .5rem;
}
.platform-stat {
    text-align: center;
    padding: .8rem .4rem;
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
    transition: var(--transition);
}
.platform-stat:hover { background: var(--border-light); transform: translateY(-2px); }
.platform-stat-num { font-size: 1.3rem; font-weight: 700; color: var(--primary); font-family: var(--serif); }
.platform-stat-label { font-size: .72rem; color: var(--text-light); margin-top: .2rem; }

/* ===== 同类推荐 ===== */
.similar-novels-section { margin-top: 2rem; }
.similar-novels-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}
.similar-novel-card {
    text-decoration: none; color: inherit; text-align: center;
    transition: var(--transition); cursor: pointer;
}
.similar-novel-card:hover { transform: translateY(-4px); }
.similar-novel-card img {
    width: 100%; aspect-ratio: 3/4; object-fit: cover;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm); margin-bottom: .4rem;
    transition: var(--transition);
}
.similar-novel-card:hover img { box-shadow: var(--shadow-lg); }
.similar-novel-title {
    font-size: .82rem; font-weight: 600; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.similar-novel-author { font-size: .72rem; color: var(--text-light); }

/* ===== 热力图 ===== */
.writing-heatmap {
    background: var(--bg-card); border-radius: var(--radius);
    padding: 1rem 1.2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-top: 1rem;
}
.heatmap-title { font-size: .85rem; font-weight: 600; color: var(--text-mid); margin-bottom: .6rem; }
.heatmap-grid {
    display: grid; grid-template-columns: repeat(15, 1fr); gap: 4px;
}
.heatmap-cell {
    aspect-ratio: 1; border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: .6rem; color: var(--text-light);
    transition: var(--transition);
    position: relative;
}
.heatmap-cell:hover { transform: scale(1.3); z-index: 2; box-shadow: var(--shadow); }
.heatmap-day { opacity: 0; transition: opacity .15s; }
.heatmap-cell:hover .heatmap-day { opacity: 1; }
.heatmap-cell.level-0 { background: var(--bg-soft); }
.heatmap-cell.level-1 { background: rgba(196,145,92,.2); }
.heatmap-cell.level-2 { background: rgba(196,145,92,.4); }
.heatmap-cell.level-3 { background: rgba(196,145,92,.65); }
.heatmap-cell.level-4 { background: var(--primary); }
.heatmap-cell.level-4 .heatmap-day { color: #fff; opacity: .7; }
.heatmap-legend { display: flex; align-items: center; gap: 4px; margin-top: .6rem; font-size: .72rem; color: var(--text-light); }
.heatmap-legend .heatmap-cell { width: 16px; height: 16px; aspect-ratio: unset; }

.reading-heatmap {
    display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px;
    padding: 1rem; background: var(--bg-card); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); margin-top: 1rem;
}
.reading-heatmap .heatmap-cell { cursor: default; }

/* ===== 阅读动态时间轴 ===== */
.timeline-stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-top: 1.5rem;
}
.timeline-stat-card {
    background: var(--bg-card); padding: 1.2rem; border-radius: var(--radius);
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
    text-align: center; transition: var(--transition);
}
.timeline-stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.timeline-stat-icon { font-size: 1.6rem; margin-bottom: .4rem; }
.timeline-stat-val { font-size: 1.6rem; font-weight: 700; color: var(--primary); }
.timeline-stat-label { font-size: .8rem; color: var(--text-light); margin-top: .25rem; }

.timeline-updates { display: flex; flex-direction: column; gap: .75rem; margin-top: 1rem; }
.timeline-update-item {
    background: var(--bg-card); padding: 1rem 1.2rem; border-radius: var(--radius);
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
    display: flex; justify-content: space-between; align-items: center;
    gap: 1rem; flex-wrap: wrap;
    transition: var(--transition);
}
.timeline-update-item:hover { border-color: var(--accent-light); }
.timeline-update-info { flex: 1; min-width: 200px; }
.timeline-novel-link { color: var(--primary); font-weight: 600; text-decoration: none; }
.timeline-novel-link:hover { text-decoration: underline; }
.timeline-update-meta { display: block; color: var(--text-light); font-size: .85rem; margin-top: .25rem; }
.timeline-author-link { color: var(--text-mid); }
.timeline-chapter-link {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .5rem .9rem; background: var(--bg-soft); border-radius: 6px;
    color: var(--text-main); text-decoration: none; font-size: .9rem;
    transition: var(--transition);
}
.timeline-chapter-link:hover { background: var(--primary); color: #fff; }
.timeline-wc { font-size: .75rem; opacity: .75; }

.following-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-top: 1rem; }
.following-card {
    background: var(--bg-card); padding: 1rem 1.2rem; border-radius: var(--radius);
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
    display: flex; flex-direction: column; gap: .5rem;
    transition: var(--transition);
}
.following-card:hover { border-color: var(--accent-light); }
.following-name { color: var(--primary); font-weight: 600; text-decoration: none; }
.following-name:hover { text-decoration: underline; }
.following-meta { font-size: .85rem; color: var(--text-light); }
.following-card .btn { align-self: flex-start; }

/* ===== 个人中心 ===== */
.profile-page { max-width: 900px; margin: 0 auto; }
.profile-skeleton { padding: 2rem; }

.profile-header {
    display: flex; gap: 1.5rem; align-items: center; margin-bottom: 2rem;
    background: var(--bg-card); padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}
.profile-avatar {
    width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; font-weight: 700;
}
.profile-meta { flex: 1; }
.profile-name { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; color: var(--text); margin-bottom: .3rem; }
.profile-badge {
    display: inline-block; padding: .25rem .8rem; border-radius: 14px;
    font-size: .8rem; font-weight: 600;
}
.reader-level-1 { background: #e8f5e9; color: #2e7d32; }
.reader-level-2 { background: #e3f2fd; color: #1565c0; }
.reader-level-3 { background: #f3e5f5; color: #7b1fa2; }
.reader-level-4 { background: #fff3e0; color: #e65100; }
.reader-level-5 { background: #fce4ec; color: #c62828; }
.reader-level-6 { background: linear-gradient(135deg, #ffd700, #ff8f00); color: #fff; }

.profile-section { margin-bottom: 2rem; }

.stat-cards {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem; margin-bottom: 1rem;
}
.stat-card {
    background: var(--bg-card); border-radius: var(--radius);
    padding: 1.2rem 1rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent-light); }
.stat-card-icon { font-size: 1.5rem; margin-bottom: .3rem; }
.stat-card-num { font-size: 1.4rem; font-weight: 700; color: var(--primary); font-family: var(--serif); }
.stat-card-label { font-size: .75rem; color: var(--text-light); margin-top: .2rem; }

.reading-progress-bar {
    background: var(--bg-card); border-radius: var(--radius);
    padding: 1rem 1.2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-top: .5rem;
}
.reading-progress-label { font-size: .85rem; color: var(--text-mid); margin-bottom: .4rem; font-weight: 500; }
.reading-progress-bar .progress-bar { height: 8px; background: var(--bg-soft); border-radius: 4px; overflow: hidden; }
.reading-progress-bar .progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--primary)); border-radius: 4px; transition: width .5s; }
.reading-progress-detail { font-size: .72rem; color: var(--text-light); margin-top: .3rem; }

.recent-read-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .8rem; }
.recent-read-item {
    display: flex; gap: .8rem; text-decoration: none; color: inherit;
    background: var(--bg-card); border-radius: var(--radius); padding: .6rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition); cursor: pointer;
}
.recent-read-item:hover { box-shadow: var(--shadow); border-color: var(--accent-light); transform: translateY(-2px); }
.reading-progress-text { font-size: .75rem; color: var(--primary); font-weight: 500; }

.writing-novel-bar {
    background: var(--bg-card); border-radius: var(--radius);
    padding: .8rem 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-top: .6rem;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: .5rem;
}
.writing-novel-info { display: flex; align-items: center; gap: .5rem; }
.writing-novel-title { color: var(--text); text-decoration: none; font-weight: 600; font-size: .9rem; }
.writing-novel-title:hover { color: var(--primary); }
.writing-novel-stats { display: flex; gap: .8rem; font-size: .78rem; color: var(--text-light); flex-wrap: wrap; }

/* 阅读目标环 */
.reading-goal-card {
    background: var(--bg-card); border-radius: var(--radius);
    padding: 1.2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    display: flex; align-items: center; gap: 1rem;
    margin-bottom: 1rem;
}
.goal-progress-ring {
    width: 80px; height: 80px; flex-shrink: 0; position: relative;
}
.goal-progress-ring svg { transform: rotate(-90deg); }
.goal-progress-ring .ring-bg { fill: none; stroke: var(--bg-soft); stroke-width: 8; }
.goal-progress-ring .ring-fg { fill: none; stroke: var(--primary); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .5s; }
.goal-progress-ring .ring-text {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: var(--primary); font-size: .95rem;
}
.goal-info { flex: 1; min-width: 0; }
.goal-info h3 { margin: 0 0 .35rem; font-size: 1rem; color: var(--text-main); }
.goal-info p { margin: 0 0 .5rem; color: var(--text-light); font-size: .85rem; }
.goal-info .btn { font-size: .85rem; padding: .35rem .85rem; }

/* ===== 书库页 ===== */
.library-header { text-align: center; padding: 2rem 1rem 1rem; }
.library-header h1 { font-family: var(--serif); font-size: 2.2rem; font-weight: 900; color: var(--primary); margin: 0 0 .4rem; }
.page-subtitle { color: var(--text-light); font-size: 1rem; margin: 0; }
.library-toolbar { max-width: 1100px; margin: 1.5rem auto; padding: 0 1rem; }
.library-search-bar { margin-bottom: 1rem; }
.library-search-bar input {
    width: 100%; padding: .9rem 1.2rem;
    border: 2px solid var(--border-light); border-radius: var(--radius);
    font-size: 1rem; background: var(--bg-card); color: var(--text-main);
    transition: var(--transition);
}
.library-search-bar input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(196,145,92,.15); }
.library-filters {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem; padding: 1rem; background: var(--bg-card); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
}
.filter-group, .filter-group-inline { display: flex; flex-direction: column; gap: .4rem; }
.filter-group label, .filter-group-inline label { font-size: .8rem; color: var(--text-light); font-weight: 500; }
.filter-group select, .filter-group-inline select {
    padding: .55rem .75rem; border: 1px solid var(--border-light); border-radius: 6px;
    background: var(--bg-input); color: var(--text-main); font-size: .9rem;
}
.library-tags-bar {
    max-width: 1100px; margin: 1rem auto; padding: 0 1rem;
    display: flex; flex-wrap: wrap; gap: .5rem;
}
.tag-chip {
    padding: .4rem .85rem; border: 1px solid var(--border-light); border-radius: 999px;
    background: var(--bg-card); color: var(--text-mid); font-size: .85rem; cursor: pointer;
    transition: var(--transition); display: inline-flex; align-items: center; gap: .3rem;
}
.tag-chip:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.tag-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.tag-chip.active .tag-count { color: rgba(255,255,255,.85); }
.tag-count { font-size: .75rem; opacity: .7; }
.library-stats-row {
    max-width: 1100px; margin: 1rem auto; padding: 0 1rem;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem;
}
.library-count { color: var(--text-light); font-size: .9rem; }
.library-pagination {
    max-width: 1100px; margin: 2rem auto; padding: 0 1rem;
    display: flex; justify-content: center; align-items: center;
    gap: .4rem; flex-wrap: wrap;
}
.page-btn {
    padding: .45rem .85rem; border: 1px solid var(--border-light); border-radius: 6px;
    background: var(--bg-card); color: var(--text-mid); cursor: pointer;
    transition: var(--transition);
    font-size: .9rem; min-width: 38px;
}
.page-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.page-btn.current { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: .5; cursor: not-allowed; }
.page-dots { color: var(--text-light); padding: 0 .25rem; }

/* ===== 增强搜索页 ===== */
.search-page { max-width: 960px; margin: 0 auto; padding: 1rem; }
.search-bar-large { display: flex; gap: .5rem; margin: 1.5rem 0; }
.search-bar-large input {
    flex: 1; padding: .85rem 1.1rem;
    border: 2px solid var(--border-light); border-radius: var(--radius);
    font-size: 1rem; background: var(--bg-card); color: var(--text-main);
    transition: var(--transition);
}
.search-bar-large input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(196,145,92,.15); }
.search-filters {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem; padding: 1rem; background: var(--bg-card); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); margin-bottom: 1.5rem;
}
.search-count { color: var(--text-light); margin: 1rem 0; font-size: .9rem; }

/* ===== 评分星级 ===== */
.rating-row { display: inline-flex; align-items: center; gap: .25rem; }
.star { color: #f5b301; font-size: .95rem; line-height: 1; transition: all .2s; user-select: none; }
.star.empty { color: #d0d0d0; }
.star.half { background: linear-gradient(90deg, #f5b301 50%, #d0d0d0 50%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.star-interactive { cursor: pointer; }
.star-interactive:hover, .star-hover { color: #f1c40f; transform: scale(1.2); }
.rating-meta { font-size: .8rem; color: var(--text-light); margin-left: .35rem; }
.rating-label { color: var(--text-light); font-size: .9rem; }
.rating-text { font-size: .8rem; color: var(--text-light); margin-left: .6rem; }
.rating-stars-input { display: flex; gap: .4rem; justify-content: center; margin: 1.2rem 0 .5rem; }
.rating-stars-input .rating-star { font-size: 2rem; color: #d0d0d0; cursor: pointer; transition: var(--transition); }
.rating-stars-input .rating-star:hover { transform: scale(1.2); color: #f1c40f; }

/* ===== 公告面板 ===== */
.announcement-panel { max-width: 640px; max-height: 80vh; display: flex; flex-direction: column; }
.announcement-header { background: linear-gradient(135deg, #c0392b, #e67e22); }
.announcement-list-wrap { overflow-y: auto; max-height: 50vh; padding: .5rem 0; }
.announcement-item {
    padding: 1rem 1.5rem; cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-light);
    position: relative;
}
.announcement-item:hover { background: var(--bg-soft); }
.announcement-item.is-read { opacity: .65; }
.announcement-item-header { display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem; }
.announcement-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #c0392b; flex-shrink: 0;
    box-shadow: 0 0 6px rgba(192,57,43,.5);
    animation: dot-pulse 2s ease-in-out infinite;
}
@keyframes dot-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}
.announcement-title { font-weight: 600; color: var(--text-main); flex: 1; font-size: .95rem; }
.announcement-item.is-read .announcement-title { font-weight: 400; }
.announcement-time { font-size: .75rem; color: var(--text-light); flex-shrink: 0; }
.announcement-content-preview {
    color: var(--text-light); font-size: .85rem;
    line-height: 1.5; padding-left: 1rem;
}
.announcement-actions {
    padding: .75rem 1.5rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg-soft);
    display: flex; justify-content: flex-end;
}

/* 公告详情 */
.announcement-detail { max-width: 560px; }
.announcement-detail-body {
    padding: 1.5rem 1.8rem; font-size: 1rem; line-height: 1.8;
    color: var(--text-main); white-space: pre-wrap; word-break: break-word;
}

/* ===== 公告 Banner ===== */
.announcement-banner {
    display: flex; align-items: center; gap: .8rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    padding: .7rem 1.2rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 12px rgba(123,74,45,.2);
    position: relative;
    overflow: hidden;
}
.announcement-banner::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 90% 50%, rgba(255,255,255,.1) 0%, transparent 60%);
    pointer-events: none;
}
.announcement-icon { font-size: 1.3rem; flex-shrink: 0; }
.announcement-content { flex: 1; overflow: hidden; position: relative; min-height: 1.4em; }
.announcement-item-hidden { display: none; }
.announcement-sep { margin: 0 .3rem; opacity: .5; }
.announcement-text { opacity: .9; font-size: .85rem; line-height: 1.5; }
.announcement-nav {
    background: rgba(255,255,255,.15); border: none;
    color: #fff;
    width: 24px; height: 24px; border-radius: 50%;
    cursor: pointer; font-size: 1rem;
    flex-shrink: 0; transition: background .2s;
}
.announcement-nav:hover { background: rgba(255,255,255,.25); }
.announcement-close {
    background: none; border: none;
    color: rgba(255,255,255,.5); cursor: pointer;
    font-size: .85rem;
    flex-shrink: 0; transition: color .2s;
}
.announcement-close:hover { color: #fff; }

/* ===== 草稿提示 ===== */
.draft-notice {
    background: var(--bg-soft);
    border: 1px dashed var(--accent);
    border-radius: var(--radius-sm);
    padding: .6rem .9rem; margin-bottom: .8rem;
    font-size: .82rem; color: var(--text-mid);
    display: flex; align-items: center; justify-content: space-between;
    gap: .5rem;
}
.draft-notice-text { flex: 1; }
.draft-notice-actions { display: flex; gap: .3rem; }
.draft-notice-btn {
    padding: .25rem .7rem; border: none;
    border-radius: 4px; cursor: pointer;
    font-size: .76rem;
    transition: var(--transition);
}
.draft-notice-btn-restore { background: var(--primary); color: #fff; }
.draft-notice-btn-restore:hover { background: var(--primary-dark); }
.draft-notice-btn-dismiss {
    background: var(--bg-card); color: var(--text-light);
    border: 1px solid var(--border);
}
.draft-notice-btn-dismiss:hover { color: var(--text); }

/* ===== 写作字数目标 ===== */
.write-goal-bar {
    display: flex; align-items: center; gap: .8rem;
    padding: .6rem .9rem;
    background: var(--bg-card); border-radius: var(--radius);
    margin-bottom: .8rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}
.write-goal-label { font-size: .82rem; color: var(--text-mid); white-space: nowrap; }
.write-goal-progress {
    flex: 1; height: 8px;
    background: var(--bg-soft); border-radius: 4px; overflow: hidden;
}
.write-goal-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    border-radius: 4px; transition: width .5s ease;
}
.write-goal-text { font-size: .78rem; color: var(--text-light); white-space: nowrap; }
.write-goal-text .achieved { color: #27ae60; font-weight: 600; }

/* ===== 管理后台 ===== */
.admin-tabs {
    display: flex; gap: .5rem; margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border); padding-bottom: .5rem;
}
.admin-tab {
    padding: .5rem 1.2rem; border: none; background: transparent;
    color: var(--text-light); font-size: .9rem; cursor: pointer;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: var(--transition);
    position: relative;
}
.admin-tab:hover { color: var(--primary); }
.admin-tab.active { color: var(--primary); font-weight: 700; }
.admin-tab.active::after {
    content: ''; position: absolute; bottom: -.5rem; left: 0;
    width: 100%; height: 2px; background: var(--primary);
}
.admin-table {
    background: var(--bg-card); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}
.admin-table table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.admin-table th {
    background: var(--bg-soft);
    padding: .6rem .8rem; text-align: left;
    font-weight: 600; color: var(--text-mid);
    border-bottom: 2px solid var(--border);
}
.admin-table td { padding: .6rem .8rem; border-bottom: 1px solid var(--border-light); }
.admin-table tr { transition: background .15s; }
.admin-table tr:hover { background: var(--bg-soft); }

.admin-ann-form {
    background: var(--bg-card); border-radius: var(--radius); padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-light);
}
.admin-ann-form input, .admin-ann-form textarea {
    width: 100%; padding: .6rem .9rem;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: .88rem; margin-bottom: .5rem;
    background: var(--bg); color: var(--text);
}
.admin-ann-list { list-style: none; }
.admin-ann-item {
    display: flex; align-items: center; gap: .8rem;
    padding: .7rem .9rem;
    background: var(--bg-card); border-radius: var(--radius-sm);
    margin-bottom: .4rem;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}
.admin-ann-item:hover { border-color: var(--accent-light); }
.admin-ann-item-title { font-weight: 600; font-size: .88rem; }
.admin-ann-item-content { font-size: .8rem; color: var(--text-mid); flex: 1; }

/* ===== 键盘快捷键面板 ===== */
.shortcut-overlay { align-items: center; justify-content: center; }
.shortcut-overlay.show .shortcut-panel { opacity: 1; transform: scale(1) translateY(0); }
.shortcut-panel {
    background: var(--bg-card); border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3), 0 0 0 1px rgba(123,74,45,.1);
    max-width: 720px; width: 94%;
    opacity: 0; transform: scale(.95) translateY(10px);
    transition: opacity .25s, transform .25s;
    overflow: hidden;
    position: relative;
}
.shortcut-panel::before {
    content: ''; position: absolute; inset: 6px; pointer-events: none;
    border: 1px solid var(--accent); border-radius: 8px; opacity: .4;
}
.shortcut-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    padding: 1.2rem 1.5rem;
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    color: #fff; position: relative;
}
.shortcut-header::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.shortcut-title-wrap { display: flex; align-items: center; gap: 1rem; }
.shortcut-title-icon { width: 42px; height: 42px; color: var(--accent-light); flex-shrink: 0; }
.shortcut-title-wrap h3 { margin: 0; font-family: var(--serif); font-size: 1.4rem; color: #fff; letter-spacing: .05em; }
.shortcut-subtitle { margin: .2rem 0 0; font-size: .8rem; color: rgba(255,255,255,.75); letter-spacing: .1em; }
.shortcut-close {
    background: transparent; border: 1px solid rgba(255,255,255,.3);
    border-radius: 50%; width: 36px; height: 36px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #fff; transition: var(--transition); flex-shrink: 0;
}
.shortcut-close:hover { background: rgba(255,255,255,.15); border-color: #fff; transform: rotate(90deg); }
.shortcut-close svg { width: 20px; height: 20px; }

.shortcut-body { padding: 1.5rem; }
.shortcut-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.shortcut-group {
    background: var(--bg-soft); padding: 1rem 1.2rem;
    border-radius: 8px; border: 1px solid var(--border-light);
    position: relative;
}
.group-header {
    display: flex; align-items: center; gap: .6rem;
    margin-bottom: .85rem; padding-bottom: .5rem;
    border-bottom: 1px dashed var(--border-light);
}
.group-num {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--primary); color: var(--accent-light);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--serif); font-size: .9rem; font-weight: 700;
    flex-shrink: 0;
}
.group-header h4 { margin: 0; font-size: .9rem; color: var(--text-main); font-weight: 600; letter-spacing: .05em; }
.shortcut-row {
    display: flex; align-items: center; gap: .35rem;
    padding: .35rem 0; font-size: .85rem;
}
.shortcut-row span { color: var(--text-light); margin-left: auto; font-size: .82rem; }

kbd {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 26px; height: 26px; padding: 0 .4rem;
    background: var(--bg-card); border: 1px solid var(--border);
    border-bottom-width: 2px; border-radius: 4px;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: .75rem; color: var(--text-main); font-weight: 600;
    line-height: 1;
}
kbd.kbd-prefix {
    background: var(--primary); color: var(--accent-light);
    border-color: var(--primary-dark); font-size: .72rem; min-width: 22px;
}
kbd.kbd-main {
    background: var(--bg-card); color: var(--primary);
    border-color: var(--accent); box-shadow: 0 1px 0 rgba(123,74,45,.1);
}
kbd.kbd-wide { min-width: 42px; padding: 0 .6rem; }

.shortcut-footer {
    padding: .85rem 1.5rem; text-align: center;
    background: var(--bg-soft); border-top: 1px solid var(--border-light);
    display: flex; align-items: center; justify-content: center; gap: 1rem;
}
.footer-deco { color: var(--primary); font-size: 1rem; opacity: .6; }
.footer-tip { color: var(--text-light); font-size: .8rem; }

/* ===== 移动端适配补充 ===== */
@media (max-width: 640px) {
    .ranking-item { flex-direction: column; gap: .3rem; text-align: center; }
    .ranking-cover { margin: 0 auto; }
    .comment-avatar { width: 30px; height: 30px; font-size: .75rem; }
    .author-header { flex-direction: column; text-align: center; padding: 1.5rem; }
    .author-stats { justify-content: center; }
    .recent-updates-list { grid-template-columns: 1
fr; }
    .novel-detail-cover-img-wrap { width: 140px; height: 190px; margin: 0 auto; }
    .toc-drawer { width: 100vw; }
    .profile-header { flex-direction: column; text-align: center; padding: 1.5rem; }
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
    .recent-read-list { grid-template-columns: 1fr; }
    .writing-novel-bar { flex-direction: column; align-items: stretch; }
    .platform-stats-grid { grid-template-columns: repeat(3, 1fr); }
    .similar-novels-grid { grid-template-columns: repeat(2, 1fr); }
    .announcement-banner { padding: .5rem .8rem; gap: .5rem; }
    .announcement-text { font-size: .78rem; }
    .rating-stars .star { font-size: 1.1rem; }
    .write-goal-bar { flex-wrap: wrap; }
    .shortcut-grid { grid-template-columns: 1fr; }
    .shortcut-title-wrap h3 { font-size: 1.15rem; }
    .shortcut-title-icon { width: 36px; height: 36px; }
}

/* ===== 本周更新徽章 ===== */
.weekly-update-badge {
    display: inline-block; margin-top: .5rem; padding: .3rem .8rem;
    background: linear-gradient(135deg, #f39c12, #e74c3c); color: #fff;
    border-radius: 999px; font-size: .8rem; font-weight: 600;
    box-shadow: 0 2px 6px rgba(243,156,18,.3);
}
