/* ================================================================
   墨阁 · 新增功能样式（v2 · 去 emoji + 墨阁 SVG 图标）
   A 组：加载骨架 / 章节撒花 / 阅读小报 / 目标打卡
   B 组：章末金句 / 作者印章 / 夜读模式 / 故事骰子 / 本周精选
   C 组：阅读热力图 / 字数预测 / AI 续写
   ================================================================ */

/* ===== 加载骨架屏 (A3) ===== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-soft) 25%, var(--bg-card) 50%, var(--bg-soft) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
    border-radius: 6px;
}
@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-soft);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.skeleton-line { height: 14px; margin: 8px 0; }
.skeleton-line.lg { height: 22px; width: 60%; }
.skeleton-line.md { width: 80%; }
.skeleton-line.sm { width: 40%; }
.skeleton-block { height: 160px; margin-bottom: 12px; }

/* ===== 章节撒花 (A4) ===== */
.confetti-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 9999;
}
.confetti-petal {
    position: absolute;
    top: -20px;
    width: 20px;
    height: 20px;
    animation: petal-fall linear forwards;
    user-select: none;
    pointer-events: none;
}
.confetti-petal svg {
    width: 100%;
    height: 100%;
    display: block;
}
@keyframes petal-fall {
    0%   { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
    50%  { opacity: 1; }
    100% { transform: translateY(110vh) rotate(720deg) scale(.6); opacity: 0; }
}
.chapter-complete-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    background: var(--bg-card);
    border: 2px solid var(--accent);
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: 0 8px 24px rgba(123,74,45,.2);
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-serif);
    color: var(--ink);
    animation: toast-rise .35s ease-out;
    z-index: 9998;
}
.chapter-complete-toast .seal {
    width: 38px; height: 38px;
    background: var(--seal-red);
    color: #fff;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    font-family: var(--font-brush);
}
.chapter-complete-toast .words { color: var(--primary); font-weight: 700; }
@keyframes toast-rise {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

/* ===== 阅读小报 (A1) ===== */
.reading-report {
    margin: 1.5rem auto;
    max-width: 640px;
    background: linear-gradient(135deg, var(--bg-card), #fff8e7);
    border: 1.5px solid var(--accent-light);
    border-radius: 14px;
    padding: 1.2rem 1.4rem;
    box-shadow: 0 4px 12px rgba(196,145,92,.12);
    font-family: var(--font-serif);
}
.reading-report-head {
    display: flex; align-items: center; gap: .6rem;
    margin-bottom: .8rem;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.05rem;
}
.reading-report-head svg { color: var(--seal-red); }
.reading-report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: .8rem;
}
.reading-report-cell {
    background: rgba(255,255,255,.5);
    border: 1px solid var(--bg-soft);
    border-radius: 8px;
    padding: .6rem .8rem;
    text-align: center;
}
.reading-report-num {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--ink);
    font-family: var(--font-serif);
}
.reading-report-label {
    font-size: .75rem;
    color: var(--text-mid);
    margin-top: .15rem;
}
.reading-report-vs {
    font-size: .72rem;
    color: var(--accent);
    margin-top: .15rem;
}

/* ===== 目标打卡 (A2) ===== */
.goal-ring-card {
    background: var(--bg-card);
    border: 1px solid var(--accent-light);
    border-radius: 14px;
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    font-family: var(--font-serif);
    margin: 1rem 0;
}
.goal-ring-card.achieved {
    background: linear-gradient(135deg, #fff8e7, #ffe8b8);
    border-color: var(--gold);
    animation: goal-glow 2s ease-in-out infinite;
}
@keyframes goal-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(184,134,11,.0); }
    50%      { box-shadow: 0 0 0 8px rgba(184,134,11,.15); }
}
.goal-ring-wrap {
    position: relative;
    width: 80px; height: 80px;
    flex-shrink: 0;
}
.goal-ring-wrap svg { transform: rotate(-90deg); }
.goal-ring-track { stroke: var(--bg-soft); fill: none; stroke-width: 8; }
.goal-ring-fill {
    stroke: var(--accent);
    fill: none; stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset .6s ease;
}
.goal-ring-card.achieved .goal-ring-fill { stroke: var(--seal-red); }
.goal-ring-text {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    color: var(--ink);
    font-size: .9rem;
}
.goal-ring-body { flex: 1; min-width: 0; }
.goal-ring-title { font-weight: 700; color: var(--ink); }
.goal-ring-sub { font-size: .82rem; color: var(--text-mid); margin-top: .2rem; }
.goal-ring-btn {
    margin-top: .4rem;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: .78rem;
    cursor: pointer;
}
.goal-ring-btn:hover { background: var(--accent); color: #fff; }
.goal-ring-edit { display: none; gap: .4rem; margin-top: .4rem; align-items: center; }
.goal-ring-card.editing .goal-ring-edit { display: flex; }
.goal-ring-edit input {
    width: 70px;
    padding: 3px 6px;
    border: 1px solid var(--bg-soft);
    border-radius: 4px;
    font-size: .82rem;
    background: var(--bg-input);
    color: var(--ink);
}

/* ===== 章末金句 (B5) ===== */
.chapter-quote {
    margin: 2rem auto;
    max-width: 580px;
    text-align: center;
    padding: 1.2rem 1.4rem;
    background: linear-gradient(180deg, transparent, rgba(196,145,92,.08), transparent);
    border-top: 1px dashed var(--accent-light);
    border-bottom: 1px dashed var(--accent-light);
    font-family: var(--font-brush);
    position: relative;
}
.chapter-quote-text {
    font-size: 1.25rem;
    color: var(--ink);
    line-height: 1.8;
    margin-bottom: .6rem;
    letter-spacing: .04em;
}
.chapter-quote-from {
    font-size: .85rem;
    color: var(--text-mid);
    font-family: var(--font-serif);
    font-style: italic;
}
.chapter-quote-actions {
    margin-top: .7rem;
    display: flex; gap: .6rem; justify-content: center;
}
.chapter-quote-actions button {
    background: transparent;
    border: 1px solid var(--accent-light);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 14px;
    font-size: .78rem;
    cursor: pointer;
    font-family: var(--font-serif);
    transition: all .2s;
}
.chapter-quote-actions button:hover { background: var(--accent); color: #fff; }
.chapter-quote-actions button.faved { background: var(--seal-red); color: #fff; border-color: var(--seal-red); }

/* 金句收藏列表 */
.quotes-fav-page {
    max-width: 720px;
    margin: 2rem auto;
    padding: 0 1rem;
}
.quotes-fav-list { list-style: none; padding: 0; margin: 1rem 0; }
.quotes-fav-item {
    background: var(--bg-card);
    border-left: 4px solid var(--seal-red);
    border-radius: 6px;
    padding: 1rem 1.2rem;
    margin-bottom: .8rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    font-family: var(--font-serif);
    position: relative;
}
.quotes-fav-text {
    font-family: var(--font-brush);
    font-size: 1.1rem;
    color: var(--ink);
    line-height: 1.7;
    margin-bottom: .4rem;
}
.quotes-fav-from { font-size: .82rem; color: var(--text-mid); font-style: italic; }
.quotes-fav-del {
    position: absolute;
    top: 8px; right: 12px;
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.1rem;
}
.quotes-fav-del:hover { color: var(--seal-red); }

/* ===== 作者印章 (B6) ===== */
.author-seal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--seal-red);
    color: #fff;
    font-family: var(--font-brush);
    width: 96px; height: 96px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(192,57,43,.35);
    flex-shrink: 0;
}
.author-seal.sm { width: 64px; height: 64px; font-size: 1.1rem; }
.author-seal.md { width: 80px; height: 80px; font-size: 1.3rem; }
.author-seal.lg { width: 128px; height: 128px; font-size: 2rem; }
.author-seal-text {
    writing-mode: vertical-rl;
    letter-spacing: .15em;
    line-height: 1;
    text-align: center;
    font-weight: 700;
}
.author-seal-border {
    position: absolute;
    inset: 4px;
    border: 1.5px solid rgba(255,255,255,.55);
    border-radius: 4px;
    pointer-events: none;
}

/* ===== 夜读模式 (B7) ===== */
body.night-mode {
    background: #0f0c0a !important;
    color: #d9c89f !important;
}
body.night-mode #navbar { background: #1a1410 !important; border-bottom-color: #3a2a1c !important; }
body.night-mode .nav-link { color: #d9c89f !important; }
body.night-mode main, body.night-mode .novel-card, body.night-mode .platform-stats-card,
body.night-mode .recent-update-item, body.night-mode .chapter-content,
body.night-mode .reading-report, body.night-mode .goal-ring-card {
    background: #1c1410 !important;
    color: #d9c89f !important;
    border-color: #3a2a1c !important;
}
body.night-mode .novel-card-title, body.night-mode .recent-update-title,
body.night-mode .chapter-title, body.night-mode h1, body.night-mode h2, body.night-mode h3 {
    color: #f0d99a !important;
}
body.night-mode .category-chip {
    background: #2a1f18 !important;
    color: #d9c89f !important;
    border-color: #3a2a1c !important;
}
body.night-mode .chapter-content { font-size: 1.12rem; line-height: 2; }
body.night-mode .footer-content { color: #8a7458 !important; }
.night-toggle {
    background: transparent;
    border: 1px solid var(--accent-light);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: .82rem;
    font-family: var(--font-serif);
}
body.night-mode .night-toggle {
    background: var(--gold);
    color: #1a1410;
    border-color: var(--gold);
}

/* 雨声/壁炉氛围（CSS 模拟小灯） */
.night-lamp {
    position: fixed;
    pointer-events: none;
    width: 600px; height: 600px;
    border-radius: 50%;
    top: -200px; right: -200px;
    background: radial-gradient(circle, rgba(184,134,11,.18), transparent 65%);
    z-index: 0;
    animation: lamp-flicker 4s ease-in-out infinite;
}
@keyframes lamp-flicker {
    0%, 100% { opacity: .85; }
    50%      { opacity: 1; transform: scale(1.05); }
}

/* ===== 故事骰子 (B8) ===== */
.dice-page {
    max-width: 760px;
    margin: 2rem auto;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 2px solid var(--accent);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(123,74,45,.12);
    font-family: var(--font-serif);
    text-align: center;
}
.dice-page h2 {
    font-family: var(--font-brush);
    color: var(--seal-red);
    font-size: 1.8rem;
    margin-bottom: .4rem;
}
.dice-page-sub { color: var(--text-mid); margin-bottom: 1.4rem; }
.dice-row {
    display: flex; justify-content: center; gap: 1rem;
    margin: 1rem 0 1.4rem;
    flex-wrap: wrap;
}
.die {
    width: 90px; height: 90px;
    background: linear-gradient(135deg, #fff8e7, var(--bg-soft));
    border: 2px solid var(--accent);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-brush);
    font-size: 1.6rem;
    color: var(--ink);
    box-shadow: 0 4px 12px rgba(123,74,45,.18);
    transition: transform .4s;
}
.die.rolling { animation: dice-roll .8s ease-in-out; }
@keyframes dice-roll {
    0%   { transform: rotate(0deg) scale(1); }
    25%  { transform: rotate(180deg) scale(.85); }
    50%  { transform: rotate(360deg) scale(1.05); }
    75%  { transform: rotate(540deg) scale(.95); }
    100% { transform: rotate(720deg) scale(1); }
}
.die-label { font-size: .75rem; color: var(--text-mid); margin-top: .3rem; }
.dice-result {
    background: linear-gradient(180deg, #fff8e7, transparent);
    border: 1px dashed var(--accent);
    border-radius: 12px;
    padding: 1.2rem 1.4rem;
    text-align: left;
    margin-top: 1rem;
    font-family: var(--font-serif);
    color: var(--ink);
    line-height: 1.8;
    min-height: 120px;
}
.dice-result-title { font-family: var(--font-brush); font-size: 1.3rem; color: var(--seal-red); margin-bottom: .6rem; }
.dice-result-meta {
    display: flex; gap: .8rem; flex-wrap: wrap;
    margin: .6rem 0 1rem;
    font-size: .82rem;
}
.dice-chip {
    background: var(--bg-soft);
    padding: 2px 10px;
    border-radius: 12px;
    color: var(--primary);
}
.dice-btn {
    background: var(--seal-red);
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 24px;
    font-family: var(--font-brush);
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(192,57,43,.3);
    transition: transform .15s;
}
.dice-btn:hover { transform: translateY(-2px); }
.dice-btn:disabled { opacity: .5; cursor: wait; }
.dice-btn-secondary {
    background: transparent; color: var(--primary);
    border: 1px solid var(--accent); margin-left: .8rem;
    padding: 8px 18px; font-size: .95rem;
}

/* ===== 本周精选 banner (B9) ===== */
.weekly-banner {
    margin: 1rem 0 1.4rem;
    background: linear-gradient(135deg, #fff8e7, #f9e9c8);
    border: 1.5px solid var(--gold);
    border-radius: 14px;
    padding: 1rem 1.2rem;
    font-family: var(--font-serif);
    position: relative;
    overflow: hidden;
}
.weekly-banner::before {
    content: '';
    position: absolute;
    top: 0; right: 14px;
    width: 80px; height: 80px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'><ellipse cx='32' cy='36' rx='20' ry='18' fill='%23c0392b' opacity='.25'/><rect x='20' y='14' width='24' height='6' rx='1' fill='%237b4a2d' opacity='.3'/><rect x='20' y='54' width='24' height='4' fill='%237b4a2d' opacity='.3'/></svg>") no-repeat center / contain;
    opacity: .5;
    pointer-events: none;
}
.weekly-banner-head {
    display: flex; align-items: baseline; gap: .6rem;
    margin-bottom: .6rem;
}
.weekly-banner-title {
    font-family: var(--font-brush);
    font-size: 1.3rem;
    color: var(--seal-red);
}
.weekly-banner-sub { color: var(--text-mid); font-size: .85rem; }
.weekly-banner-list {
    display: flex; gap: .8rem; overflow-x: auto;
    padding-bottom: .4rem;
}
.weekly-banner-item {
    flex: 0 0 180px;
    background: rgba(255,255,255,.55);
    border: 1px solid var(--accent-light);
    border-radius: 10px;
    padding: .6rem .7rem;
    font-size: .82rem;
    color: var(--ink);
    text-decoration: none;
    transition: transform .15s;
}
.weekly-banner-item:hover { transform: translateY(-3px); }
.weekly-banner-item-title { font-weight: 700; margin-bottom: .2rem; line-height: 1.4; }
.weekly-banner-item-meta { font-size: .72rem; color: var(--text-mid); }
.weekly-banner-item-score { color: var(--seal-red); font-weight: 700; }

/* ===== 阅读热力图 (C11) ===== */
.heatmap-card {
    background: var(--bg-card);
    border: 1px solid var(--accent-light);
    border-radius: 14px;
    padding: 1.2rem;
    margin: 1rem 0;
    font-family: var(--font-serif);
    overflow-x: auto;
}
.heatmap-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: .8rem;
}
.heatmap-head h3 { color: var(--primary); font-family: var(--font-brush); }
.heatmap-grid {
    display: grid;
    grid-template-rows: repeat(7, 14px);
    grid-auto-flow: column;
    grid-auto-columns: 14px;
    gap: 3px;
    min-width: 720px;
}
.heatmap-cell {
    width: 14px; height: 14px;
    border-radius: 3px;
    background: var(--bg-soft);
    cursor: default;
    transition: transform .15s;
}
.heatmap-cell:hover { transform: scale(1.4); outline: 1px solid var(--accent); }
.heatmap-cell.lv1 { background: #f5e6c8; }
.heatmap-cell.lv2 { background: #e8c895; }
.heatmap-cell.lv3 { background: #d9a368; }
.heatmap-cell.lv4 { background: var(--seal-red); }
.heatmap-legend {
    display: flex; align-items: center; gap: .4rem;
    margin-top: .8rem;
    font-size: .72rem;
    color: var(--text-mid);
    justify-content: flex-end;
}
.heatmap-legend-cell { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
.heatmap-totals { display: flex; gap: 1.4rem; margin-top: .6rem; flex-wrap: wrap; }
.heatmap-total-item { font-size: .85rem; color: var(--text-mid); }
.heatmap-total-item b { color: var(--ink); font-size: 1.05rem; }

/* ===== 字数预测完结日 (C12) ===== */
.finish-pred {
    background: linear-gradient(135deg, var(--bg-card), #fff8e7);
    border: 1px dashed var(--accent);
    border-radius: 10px;
    padding: .8rem 1rem;
    margin: 1rem 0;
    font-family: var(--font-serif);
    display: flex; align-items: center; gap: .8rem;
}
.finish-pred-icon {
    width: 44px; height: 44px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.finish-pred-body { flex: 1; min-width: 0; }
.finish-pred-title { font-weight: 700; color: var(--ink); }
.finish-pred-sub { font-size: .82rem; color: var(--text-mid); margin-top: .15rem; }

/* ===== AI 续写 (C10) ===== */
.ai-assist-bar {
    position: sticky;
    bottom: 0;
    background: var(--bg-card);
    border: 1px solid var(--accent-light);
    border-radius: 12px;
    padding: .8rem 1rem;
    margin: 1rem 0;
    box-shadow: 0 -2px 8px rgba(123,74,45,.08);
    display: flex; align-items: center; gap: .8rem;
    font-family: var(--font-serif);
    z-index: 50;
}
.ai-assist-bar input[type="text"] {
    flex: 1;
    border: 1px solid var(--bg-soft);
    background: var(--bg-input);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: .88rem;
    color: var(--ink);
}
.ai-assist-btn {
    background: linear-gradient(135deg, var(--primary), var(--seal-red));
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: .85rem;
    font-family: var(--font-serif);
}
.ai-assist-btn:disabled { opacity: .5; cursor: wait; }
.ai-assist-result {
    background: linear-gradient(180deg, #fff8e7, transparent);
    border: 1px dashed var(--accent);
    border-radius: 8px;
    padding: .8rem 1rem;
    margin-top: .6rem;
    font-family: var(--font-serif);
    line-height: 1.7;
    color: var(--ink);
    white-space: pre-wrap;
    position: relative;
}
.ai-assist-result-actions {
    margin-top: .6rem;
    display: flex; gap: .5rem; justify-content: flex-end;
}
.ai-assist-result-actions button {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: .78rem;
    cursor: pointer;
}
.ai-assist-result-actions button.primary {
    background: var(--seal-red);
    color: #fff;
    border-color: var(--seal-red);
}
.ai-loading-dots span {
    display: inline-block;
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
    margin: 0 2px;
    animation: ai-bounce 1.2s infinite;
}
.ai-loading-dots span:nth-child(2) { animation-delay: .2s; }
.ai-loading-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes ai-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: .3; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* ===== 通用：响应式 ===== */
@media (max-width: 640px) {
    .goal-ring-card { flex-direction: column; text-align: center; }
    .dice-row { gap: .6rem; }
    .die { width: 70px; height: 70px; font-size: 1.3rem; }
    .weekly-banner-list { gap: .5rem; }
    .weekly-banner-item { flex: 0 0 150px; }
}

/* ================================================================
   导航栏提示文本 & 图标-文字组合按钮
   ================================================================ */
.nav-text {
    margin-left: .35rem;
    font-size: .85rem;
    font-family: var(--font-serif, system-ui);
}
.nav-icon-btn {
    display: inline-flex;
    align-items: center;
    gap: .15rem;
    cursor: pointer;
    color: rgba(255,255,255,.75);
    background: transparent;
    border: none;
    padding: .35rem .55rem;
    border-radius: 8px;
    transition: var(--transition, .2s);
    text-decoration: none;
}
.nav-icon-btn:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-icon-btn .svg-icon { width: 1.1em; height: 1.1em; }

/* 公告按钮原本有 .announcement-badge 定位，需保留 */
.nav-announcement-btn.nav-icon-btn { position: relative; }

/* 用户名标签 */
.nav-user-name {
    color: var(--accent, #c4915c);
    font-size: .85rem;
    font-family: var(--font-serif, system-ui);
    margin-left: .4rem;
    max-width: 8em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 窄屏：隐藏导航文字，仅留图标，避免拥挤 */
@media (max-width: 768px) {
    .nav-text { display: none; }
    .nav-icon-btn { padding: .4rem .55rem; }
}
@media (max-width: 1024px) {
    /* 中等屏：导航多时隐藏次要链接文字，只留图标 */
    .nav-left .nav-link .nav-text { display: none; }
}

/* ===== 标签云 ===== */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    align-items: center;
    padding: 1rem 0;
}
.tag-cloud-item {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .35rem .8rem;
    border-radius: 20px;
    background: var(--bg-soft);
    color: var(--text-dark);
    text-decoration: none;
    font-size: .85rem;
    transition: all .2s;
    border: 1px solid transparent;
}
.tag-cloud-item:hover {
    background: var(--primary-light, #e8d5c4);
    border-color: var(--primary);
    transform: translateY(-2px);
}
.tag-cloud-item .tag-count {
    font-size: .72rem;
    color: var(--text-mid);
    background: rgba(0,0,0,.06);
    padding: 0 .4rem;
    border-radius: 8px;
}
.tag-cloud-item.lg { font-size: 1.1rem; font-weight: 600; color: var(--seal-red); }
.tag-cloud-item.md { font-size: .95rem; font-weight: 500; }
.tag-cloud-item.sm { font-size: .78rem; color: var(--text-mid); }

/* 标签页 */
.tags-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}
.tags-page-head {
    text-align: center;
    margin-bottom: 2rem;
}
.tags-page-head h2 {
    font-size: 1.8rem;
    color: var(--primary);
}
.tags-page-head p {
    color: var(--text-mid);
    margin-top: .5rem;
}

/* 全文搜索 */
.search-mode-tabs { display: flex; justify-content: center; gap: .5rem; }
.search-mode-tab {
    padding: .4rem 1.2rem;
    border-radius: 20px;
    border: 1.5px solid var(--border, #d9b48a);
    background: transparent;
    color: var(--text-dark);
    cursor: pointer;
    font-size: .9rem;
    transition: all .2s;
}
.search-mode-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.fts-results { display: flex; flex-direction: column; gap: .8rem; }
.fts-result-item {
    display: block;
    padding: 1rem;
    background: var(--bg-soft);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all .2s;
    border: 1px solid transparent;
}
.fts-result-item:hover { border-color: var(--primary); background: var(--primary-light, #e8d5c4); }
.fts-result-novel { font-weight: 600; font-size: 1rem; margin-bottom: .4rem; }
.fts-result-snippet { font-size: .85rem; color: var(--text-mid); line-height: 1.6; }
.fts-result-snippet mark { background: #fff3cd; color: #7b4a2d; padding: 0 2px; border-radius: 2px; }
.fts-result-author { font-size: .78rem; color: var(--text-mid); margin-top: .4rem; }

/* ===== 成就系统 ===== */
.achievements-page { max-width: 900px; margin: 0 auto; padding: 2rem 1rem; }
.achievements-head { text-align: center; margin-bottom: 2rem; }
.achievements-head h2 { font-size: 1.8rem; color: var(--primary); }
.achievements-head p { color: var(--text-mid); margin-top: .5rem; }
.achievement-overall {
    display: flex; align-items: center; justify-content: center; gap: 1rem;
    margin-top: 1rem; font-size: .9rem; color: var(--text-dark);
}
.achievement-bar {
    width: 200px; height: 10px; background: var(--bg-soft);
    border-radius: 5px; overflow: hidden;
}
.achievement-bar-fill {
    height: 100%; background: linear-gradient(90deg, var(--seal-red), var(--primary));
    transition: width .6s ease;
}
.achievement-category { margin-bottom: 2rem; }
.achievement-cat-title {
    font-size: 1.1rem; color: var(--primary);
    margin-bottom: .8rem; padding-bottom: .4rem;
    border-bottom: 1px solid var(--border, #d9b48a);
}
.achievement-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: .8rem;
}
.achievement-card {
    display: flex; align-items: center; gap: .8rem;
    padding: .8rem; border-radius: 10px;
    background: var(--bg-soft); border: 1px solid transparent;
    transition: all .2s; position: relative;
}
.achievement-card.unlocked {
    border-color: var(--seal-red);
    background: linear-gradient(135deg, var(--bg-card), #fff8ee);
}
.achievement-card.locked { opacity: .55; }
.achievement-icon {
    width: 40px; height: 40px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-dark); border-radius: 50%;
    color: var(--text-light);
}
.achievement-card.unlocked .achievement-icon {
    background: var(--seal-red); color: #fff;
    box-shadow: 0 2px 8px rgba(192,57,43,.3);
}
.achievement-info { flex: 1; min-width: 0; }
.achievement-name { font-weight: 600; font-size: .95rem; color: var(--text-dark); }
.achievement-desc { font-size: .78rem; color: var(--text-mid); margin-top: .2rem; }
.achievement-badge {
    position: absolute; top: .5rem; right: .5rem;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--seal-red); color: #fff;
    font-size: .72rem; display: flex; align-items: center; justify-content: center;
}
.achievement-stats { margin-top: 2rem; }
.achievement-stats-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}
.achievement-stats .stat-item {
    text-align: center; padding: 1rem;
    background: var(--bg-soft); border-radius: 10px;
}
.achievement-stats .stat-num { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.achievement-stats .stat-label { font-size: .78rem; color: var(--text-mid); margin-top: .2rem; }

/* ===== 墨阁电台 ===== */
.radio-bar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
    background: linear-gradient(135deg, #2c1810, #3d2317);
    color: #f5e6c8; padding: .6rem 1.2rem;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 -4px 20px rgba(0,0,0,.3);
    animation: slideUp .3s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.radio-info { display: flex; align-items: center; gap: .8rem; font-size: .85rem; }
.radio-progress { color: #c4915c; font-size: .78rem; }
.radio-controls { display: flex; align-items: center; gap: .5rem; }
.radio-btn {
    background: rgba(255,255,255,.1); border: none; color: #f5e6c8;
    width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s; font-size: .8rem;
}
.radio-btn:hover { background: rgba(255,255,255,.25); }
.radio-close { font-size: 1rem; width: 28px; height: 28px; }
.radio-speed { font-size: .78rem; min-width: 2.5rem; text-align: center; color: #c4915c; }

@media (max-width: 480px) {
    .radio-bar { padding: .5rem .8rem; }
    .radio-info { font-size: .75rem; }
    .radio-btn { width: 28px; height: 28px; }
}

/* ===== 每日一题 ===== */
.quiz-card {
    max-width: 600px; margin: 1.5rem auto; padding: 1.5rem;
    background: var(--bg-card); border: 1px solid var(--border, #d9b48a);
    border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.quiz-head {
    display: flex; align-items: center; gap: .5rem;
    margin-bottom: 1rem; font-size: 1rem; color: var(--primary); font-weight: 600;
}
.quiz-cat {
    margin-left: auto; font-size: .72rem; font-weight: 400;
    color: var(--text-mid); background: var(--bg-soft);
    padding: .15rem .5rem; border-radius: 10px;
}
.quiz-question { font-size: 1.1rem; line-height: 1.8; margin-bottom: 1rem; color: var(--text-dark); }
.quiz-options { display: flex; flex-direction: column; gap: .5rem; }
.quiz-opt {
    padding: .7rem 1rem; border: 1.5px solid var(--border, #d9b48a);
    border-radius: 8px; background: var(--bg-soft);
    color: var(--text-dark); font-size: .95rem; cursor: pointer;
    text-align: left; transition: all .2s;
}
.quiz-opt:hover { border-color: var(--primary); background: var(--primary-light, #e8d5c4); }
.quiz-opt.correct { border-color: #27ae60; background: #eafaf1; color: #27ae60; font-weight: 600; }
.quiz-opt.wrong { border-color: #c0392b; background: #fdecea; color: #c0392b; }
.quiz-opt:disabled { cursor: default; opacity: .8; }
.quiz-answered { padding: .5rem 0; font-weight: 600; font-size: .95rem; }
.quiz-answered.correct { color: #27ae60; }
.quiz-answered.wrong { color: #c0392b; }
.quiz-stats {
    display: flex; gap: 1.5rem; margin-top: 1rem;
    font-size: .82rem; color: var(--text-mid);
}

/* ===== 作者主页增强 ===== */
.author-page { max-width: 900px; margin: 0 auto; padding: 2rem 1rem; }
.author-hero { display: flex; align-items: flex-start; gap: 1.5rem; margin-bottom: 1.5rem; }
.author-avatar-lg {
    width: 80px; height: 80px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--seal-red));
    color: #fff; font-size: 1.5rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(123,74,45,.25);
}
.author-hero-info { flex: 1; }
.author-hero-name { font-size: 1.6rem; color: var(--text-dark); display: flex; align-items: center; gap: .5rem; }
.author-badge {
    display: inline-block; padding: .15rem .6rem; border-radius: 10px;
    font-size: .72rem; font-weight: 600; margin-top: .3rem;
}
.author-badge.lv-new { background: #e0e0e0; color: #666; }
.author-badge.lv-novice { background: #d4edda; color: #155724; }
.author-badge.lv-pro { background: #d1ecf1; color: #0c5460; }
.author-badge.lv-master { background: #fff3cd; color: #856404; }
.author-badge.lv-legend { background: linear-gradient(135deg, #ffeaa7, #dfe6e9); color: #6c5b2a; }
.author-hero-joined { font-size: .85rem; color: var(--text-mid); margin-top: .3rem; }
.btn-follow-author {
    padding: .6rem 1.5rem; border-radius: 24px; border: 1.5px solid var(--primary);
    background: var(--primary); color: #fff; cursor: pointer;
    font-size: .9rem; white-space: nowrap; transition: all .2s;
}
.btn-follow-author.following { background: transparent; color: var(--primary); }
.author-stats-bar {
    display: flex; gap: 0; background: var(--bg-card);
    border-radius: 12px; overflow: hidden; margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.author-stat {
    flex: 1; text-align: center; padding: 1rem .5rem;
    border-right: 1px solid var(--bg-soft);
}
.author-stat:last-child { border-right: none; }
.author-stat-num { display: block; font-size: 1.2rem; font-weight: 700; color: var(--primary); }
.author-stat-label { display: block; font-size: .72rem; color: var(--text-mid); margin-top: .2rem; }
.author-main { display: flex; gap: 2rem; }
.author-main-left { flex: 1; min-width: 0; }
.author-main-right { width: 280px; flex-shrink: 0; }
.author-novel-list { display: flex; flex-direction: column; gap: .5rem; }
.author-novel-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: .8rem 1rem; background: var(--bg-soft); border-radius: 8px;
    text-decoration: none; color: var(--text-dark);
    transition: all .2s; border: 1px solid transparent;
}
.author-novel-item:hover { border-color: var(--primary); background: var(--primary-light, #e8d5c4); }
.author-novel-title { font-weight: 600; font-size: .95rem; }
.author-novel-meta { font-size: .78rem; color: var(--text-mid); display: flex; align-items: center; gap: .3rem; white-space: nowrap; }
.novel-status-badge { font-size: .72rem; }
.novel-status-badge.completed { color: #27ae60; }
.author-timeline { display: flex; flex-direction: column; gap: .6rem; }
.author-timeline-item { display: flex; gap: .6rem; align-items: flex-start; }
.author-timeline-icon { color: var(--text-mid); flex-shrink: 0; margin-top: 2px; }
.author-timeline-body { flex: 1; min-width: 0; }
.author-timeline-text { font-size: .82rem; color: var(--text-dark); line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.author-timeline-time { font-size: .72rem; color: var(--text-light); }
@media (max-width: 768px) {
    .author-hero { flex-direction: column; align-items: center; text-align: center; }
    .author-main { flex-direction: column; }
    .author-main-right { width: 100%; }
    .author-stats-bar { flex-wrap: wrap; }
    .author-stat { flex: 1 1 33%; }
}

/* 选中文字摘录 popup */
.highlight-popup { z-index: 999; transform: translateX(-50%); }
.highlight-btn {
    background: var(--primary); color: #fff; border: none;
    padding: .4rem .8rem; border-radius: 16px; cursor: pointer;
    font-size: .8rem; box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
/* ===== 排行榜 ===== */
.leaderboard-page { max-width:600px; margin:0 auto; padding:2rem 1rem; }
.lb-list { display:flex; flex-direction:column; gap:.4rem; }
.lb-item { display:flex; align-items:center; gap:1rem; padding:.8rem 1rem; background:var(--bg-soft); border-radius:8px; }
.lb-item.top1 { background:linear-gradient(135deg,#fff9e6,#fff3cd); border:1px solid #d4a373; }
.lb-item.top2 { background:linear-gradient(135deg,#f8f9fa,#e9ecef); border:1px solid #adb5bd; }
.lb-item.top3 { background:linear-gradient(135deg,#fff5ee,#ffe4d0); border:1px solid #c4915c; }
.lb-rank { font-weight:700; font-size:1.1rem; min-width:3rem; color:var(--primary); }
.lb-name { flex:1; font-weight:600; }
.lb-time { color:var(--text-mid); font-size:.85rem; }
/* 书友圈 */
.forum-page { max-width:800px; margin:0 auto; padding:2rem 1rem; }
.forum-post-item { padding:1rem; background:var(--bg-soft); border-radius:8px; margin-bottom:.8rem; }
.forum-post-title { font-weight:600; font-size:1rem; color:var(--primary); }
.forum-post-content { margin-top:.4rem; font-size:.9rem; line-height:1.7; }
.forum-post-meta { font-size:.78rem; color:var(--text-mid); margin-top:.5rem; }
/* 写作工具 */
.wc-header { text-align:center; font-weight:600; margin-bottom:.5rem; color:var(--primary); }
.wc-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:3px; text-align:center; font-size:.78rem; }
.wc-day { padding:.35rem 0; border-radius:4px; cursor:default; }
.wc-day.lv0 { background:transparent; } .wc-day.lv1 { background:#d4edda; }
.wc-day.lv2 { background:#a3d9a5; } .wc-day.lv3 { background:#52b788; }
.wc-day.lv4 { background:#2d6a4f; color:#fff; } .wc-day.today { outline:2px solid var(--seal-red); }
.wc-legend { display:flex; align-items:center; gap:.3rem; justify-content:center; margin-top:.5rem; font-size:.7rem; }
.wc-legend-box { width:12px; height:12px; border-radius:2px; }
.char-cards-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:.8rem; }
.char-card { display:flex; align-items:center; gap:.8rem; padding:.6rem; background:var(--bg-soft); border-radius:8px; margin-bottom:.4rem; }
.char-avatar { width:32px;height:32px;border-radius:50%;background:var(--primary);color:#fff;display:flex;align-items:center;justify-content:center;font-size:.8rem;font-weight:600; }
.char-del-btn { margin-left:auto; background:none;border:none;color:var(--text-light);cursor:pointer;font-size:.9rem; }
.outline-head { display:flex; gap:.5rem; align-items:center; margin-bottom:.6rem; }
/* 摘录页 */
.highlights-page { max-width:700px; margin:0 auto; padding:2rem 1rem; }
.hl-item { padding:.8rem; background:var(--bg-soft); border-radius:8px; margin-bottom:.6rem; border-left:3px solid var(--primary); }
.hl-text { font-size:.95rem; line-height:1.7; color:var(--text-dark); }
.hl-meta { font-size:.78rem; color:var(--text-mid); margin-top:.4rem; }
.hl-novel { color:var(--primary); font-weight:500; }
/* 通知 */
.notif-item { display:flex; align-items:center; gap:.8rem; padding:.8rem; background:var(--bg-soft); border-radius:8px; margin-bottom:.4rem; text-decoration:none; color:var(--text-dark); }
.notif-item-body { flex:1; font-size:.9rem; }
.notif-item-time { font-size:.72rem; color:var(--text-mid); }
.notif-badge { position:absolute; top:-2px; right:-6px; background:var(--seal-red); color:#fff; border-radius:10px; padding:0 5px; font-size:.6rem; min-width:16px; text-align:center; }
/* 导出按钮 */
.export-section { text-align:center; margin-top:1rem; }
/* 主题色系 */
.theme-picker { display:flex; gap:.5rem; flex-wrap:wrap; }
.theme-swatch { width:28px; height:28px; border-radius:50%; cursor:pointer; border:2px solid transparent; transition:all .2s; }
.theme-swatch.active { border-color:var(--seal-red); box-shadow:0 0 0 2px rgba(192,57,43,.3); }
/* ===== 通知 ===== */
.notifications-page { max-width:600px; margin:0 auto; padding:2rem 1rem; }
.notifications-page h2 { color: var(--primary); font-size: 1.5rem; margin-bottom: 1rem; }

/* 每日一题弹窗 */
.quiz-overlay { position:fixed; top:0;left:0;right:0;bottom:0; background:rgba(0,0,0,.45); z-index:9999; display:flex; align-items:center; justify-content:center; opacity:0; transition:opacity .3s; }
.quiz-overlay.show { opacity:1; }
.quiz-modal { background:var(--bg-card); border-radius:16px; padding:2rem; max-width:440px; width:90%; position:relative; box-shadow:0 8px 40px rgba(0,0,0,.25); }
.quiz-modal .quiz-card { margin:0; border:none; box-shadow:none; max-width:none; }
.quiz-close-btn { position:absolute; top:.8rem; right:1rem; background:var(--bg-soft); border:none; border-radius:8px; padding:.3rem .8rem; cursor:pointer; font-size:.85rem; color:var(--text-mid); }

/* 回到顶部按钮 */
.back-to-top-btn {
    position:fixed; bottom:2rem; right:2rem; z-index:900;
    width:48px; height:48px; border-radius:50%;
    background:var(--primary); color:#fff; border:none; cursor:pointer;
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    box-shadow:0 4px 16px rgba(0,0,0,.2); transition:all .3s;
    font-size:.6rem; gap:1px; padding:0;
}
.back-to-top-btn:hover { transform:translateY(-3px); box-shadow:0 6px 20px rgba(0,0,0,.3); }
.back-to-top-pct { font-size:.6rem; opacity:.8; line-height:1; }
@media (max-width:480px) { .back-to-top-btn { bottom:1rem; right:1rem; width:40px; height:40px; } }

/* ===== 多主题色系 ===== */
[data-theme="bamboo"] { --primary:#2d6a4f; --seal-red:#40916c; --bg-dark:#1b4332; --primary-light:#d8f3dc; --bg-soft:#f0faf3; }
[data-theme="ink"] { --primary:#2c3e50; --seal-red:#34495e; --bg-dark:#1a1a2e; --primary-light:#dfe6e9; --bg-soft:#f5f6fa; }
[data-theme="peach"] { --primary:#e17055; --seal-red:#d63031; --bg-dark:#2d1810; --primary-light:#ffeaa7; --bg-soft:#fff5f0; }
[data-theme="ginkgo"] { --primary:#b8860b; --seal-red:#d4a373; --bg-dark:#3d2b0a; --primary-light:#fff3cd; --bg-soft:#fffdf5; }
/* ================================================================
   墨阁 · 增强功能样式 v3
   覆盖：评分系统、公告 Banner、草稿提示、字数目标
   ================================================================ */

/* ===== 评分系统 ===== */
.rating-section {
    margin: .5rem 0;
    padding: .5rem 0;
}
.rating-stars {
    display: flex;
    align-items: center;
    gap: .15rem;
}

/* ===== 公告 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;
    transition: var(--transition);
}
.announcement-banner:hover {
    box-shadow: 0 4px 18px rgba(123, 74, 45, .3);
    transform: translateY(-1px);
}

.announcement-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 90% 50%, rgba(255,255,255,.1) 0%, transparent 60%);
    pointer-events: none;
}

.announcement-banner::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
    background: linear-gradient(180deg, transparent, var(--accent-light), transparent);
}

.announcement-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    transition: transform .3s;
}
.announcement-banner:hover .announcement-icon {
    transform: rotate(-12deg) scale(1.1);
}

.announcement-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    min-height: 1.4em;
}

.announcement-item {
    font-size: .85rem;
    line-height: 1.5;
    transition: opacity .3s;
}

.announcement-item-hidden {
    display: none;
}

.announcement-sep {
    margin: 0 .3rem;
    opacity: .5;
}

.announcement-text {
    opacity: .9;
}

.announcement-time {
    font-size: .72rem;
    opacity: .6;
    margin-left: .5rem;
}

.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: all .2s;
}
.announcement-nav:hover {
    background: rgba(255,255,255,.25);
    transform: scale(1.1);
}

.announcement-close {
    background: none;
    border: none;
    color: rgba(255,255,255,.5);
    cursor: pointer;
    font-size: .85rem;
    flex-shrink: 0;
    transition: all .2s;
}
.announcement-close:hover {
    color: #fff;
    transform: rotate(90deg);
}

/* ===== 草稿提示 ===== */
.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;
    animation: draftSlideIn .4s ease;
}

@keyframes draftSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.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);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(123, 74, 45, .3);
}

.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);
    border-color: var(--accent);
}

/* ===== 写作字数目标 ===== */
.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);
    transition: var(--transition);
}
.write-goal-bar:hover {
    box-shadow: var(--shadow);
    border-color: var(--accent-light);
}

.write-goal-label {
    font-size: .82rem;
    color: var(--text-mid);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: .3rem;
}

.write-goal-progress {
    flex: 1;
    height: 8px;
    background: var(--bg-soft);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.write-goal-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    border-radius: 4px;
    transition: width .5s cubic-bezier(.4, 0, .2, 1);
    position: relative;
}
.write-goal-fill::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 30px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.3));
    animation: goalShimmer 2s ease-in-out infinite;
}

@keyframes goalShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.write-goal-text {
    font-size: .78rem;
    color: var(--text-light);
    white-space: nowrap;
}

.write-goal-text .achieved {
    color: #27ae60;
    font-weight: 600;
    animation: achievedPulse 1s ease;
}

@keyframes achievedPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* ===== 管理后台 — 公告管理 ===== */
.admin-ann-form {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}
.admin-ann-form:focus-within {
    border-color: var(--accent-light);
    box-shadow: 0 0 0 3px rgba(196,145,92,.1);
}

.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);
    transition: var(--transition);
}
.admin-ann-form input:focus,
.admin-ann-form textarea:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(196,145,92,.1);
}

.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);
    animation: annItemIn .3s ease backwards;
}

.admin-ann-item:nth-child(1) { animation-delay: .05s; }
.admin-ann-item:nth-child(2) { animation-delay: .1s; }
.admin-ann-item:nth-child(3) { animation-delay: .15s; }

@keyframes annItemIn {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}

.admin-ann-item:hover {
    border-color: var(--accent-light);
    transform: translateX(2px);
    box-shadow: var(--shadow-sm);
}

.admin-ann-item-title {
    font-weight: 600;
    font-size: .88rem;
}

.admin-ann-item-content {
    font-size: .8rem;
    color: var(--text-mid);
    flex: 1;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .announcement-banner {
        padding: .5rem .8rem;
        gap: .5rem;
    }
    .announcement-text {
        font-size: .78rem;
    }
    .write-goal-bar {
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .rating-stars .star {
        font-size: 1.1rem;
    }
    .announcement-icon {
        font-size: 1.1rem;
    }
}

/* ===== 减动效 ===== */
@media (prefers-reduced-motion: reduce) {
    .write-goal-fill::after,
    .draft-notice,
    .admin-ann-item,
    .announcement-icon,
    .announcement-close,
    .announcement-nav {
        animation: none !important;
        transition-duration: 0.01s !important;
    }
}

/* SPA 页面切换动画 */
#app { animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

/* 开始阅读大按钮 */
.start-reading-btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .6rem 1.8rem; font-size: 1rem; margin-top: .6rem;
    border-radius: 24px; font-weight: 600;
    animation: pulseGlow 2s ease-in-out infinite;
}
@keyframes pulseGlow {
    0%,100% { box-shadow: 0 2px 8px rgba(123,74,45,.2); }
    50% { box-shadow: 0 4px 20px rgba(123,74,45,.45); }
}

/* 沉浸模式 */
.immersive-hide { transform: translateY(-100%); opacity: 0; pointer-events: none; transition: all .35s ease; }
#navbar, .reader-toolbar { transition: all .35s ease; }

/* 下章预告卡片 */
.next-chapter-preview {
    margin: 2rem 0 1rem; padding: 1.2rem 1.5rem;
    background: linear-gradient(135deg, var(--bg-soft), var(--primary-light, #e8d5c4));
    border-radius: 12px; border-left: 3px solid var(--primary);
}
.next-chapter-label { font-size: .82rem; color: var(--primary); font-weight: 600; margin-bottom: .4rem; }
.next-chapter-title { font-weight: 700; font-size: 1rem; margin-bottom: .5rem; color: var(--text-dark); }
.next-chapter-snippet { font-size: .88rem; color: var(--text-mid); line-height: 1.7; }
.next-chapter-link { display: inline-block; margin-top: .8rem; color: var(--primary); font-weight: 600; font-size: .9rem; }
.next-chapter-link:hover { text-decoration: underline; }

/* 书架封面进度条 */
.cover-progress { position:absolute; bottom:0; left:0; right:0; height:24px; background:rgba(0,0,0,.5); display:flex; align-items:center; padding:0 .4rem; }
.cover-progress-fill { position:absolute; bottom:0; left:0; height:3px; background:var(--seal-red); transition:width .3s; }
.cover-progress-text { color:#fff; font-size:.6rem; z-index:1; }
.novel-cover { position:relative; overflow:hidden; }

/* 继续阅读卡片 */
.continue-reading-card {
    display:inline-flex; flex-direction:column; align-items:center; gap:.3rem;
    padding:.6rem 1.5rem; background:var(--primary); border-radius:12px;
    color:#fff; text-decoration:none; transition:all .2s; margin-bottom:.8rem;
}
.continue-reading-card:hover { opacity:.9; transform:translateY(-2px); }
.continue-label { font-size:.82rem; opacity:.85; display:flex; align-items:center; gap:.3rem; }
.continue-title { font-weight:700; font-size:1.1rem; }
.continue-meta { font-size:.72rem; opacity:.7; }
/* 章节折叠 */
.chapter-hidden { display:none; }
.chapter-expand { text-align:center; padding:1rem; }

/* 阅读器古风排版 */
.reader-content p {
    text-indent: 2em;
    margin-bottom: .8em;
    line-height: 1.9;
}
.reader-content p:first-of-type::first-letter {
    float: left;
    font-size: 2.2em;
    line-height: 1;
    padding-right: .1em;
    color: var(--primary);
    font-weight: 700;
    font-family: 'Noto Serif SC', 'Ma Shan Zheng', serif;
}
/* 段间留白 */
.reader-content p + p { margin-top: 0; }
.reader-content br + br { display: none; }

/* 阅读统计页 */
.reading-stats-page { max-width:800px; margin:0 auto; padding:2rem 1rem; }
.rs-summary { display:flex; gap:1rem; justify-content:center; margin-bottom:1.5rem; }
.rs-stat { text-align:center; padding:1rem 1.5rem; background:var(--bg-soft); border-radius:10px; min-width:100px; }
.rs-num { display:block; font-size:1.5rem; font-weight:700; color:var(--primary); }
.rs-label { display:block; font-size:.78rem; color:var(--text-mid); margin-top:.2rem; }
.rs-chart { display:flex; align-items:flex-end; gap:3px; height:140px; padding:.5rem 0; overflow-x:auto; }
.rs-bar-wrap { display:flex; flex-direction:column; align-items:center; flex:1; min-width:0; }
.rs-bar { width:100%; max-width:20px; background:var(--primary); border-radius:2px 2px 0 0; transition:height .3s; }
.rs-bar-label { font-size:.55rem; color:var(--text-mid); margin-top:2px; white-space:nowrap; }
/* 阅读计时器 */
.reading-timer { position:fixed; bottom:5rem; left:1.5rem; z-index:800; font-size:.72rem; color:var(--text-mid); background:var(--bg-soft); padding:.2rem .6rem; border-radius:8px; opacity:.7; pointer-events:none; }
/* 离线下载按钮 */
.offline-download-btn { display:inline-flex; align-items:center; gap:.3rem; }

/* 书单页 */
.booklists-page { max-width:800px; margin:0 auto; padding:2rem 1rem; }
.booklist-card { padding:1rem; background:var(--bg-soft); border-radius:10px; margin-bottom:.8rem; border-left:3px solid var(--primary); }
.booklist-title { font-weight:700; font-size:1rem; color:var(--primary); }
.booklist-author { font-size:.78rem; color:var(--text-mid); }
.booklist-desc { font-size:.88rem; margin-top:.4rem; color:var(--text-dark); }
.booklist-count {<|message|>font-size:.72rem; color:var(--text-mid); margin-top:.3rem; }
/* 故事接龙 */
.relay-page { max-width:700px; margin:0 auto; padding:2rem 1rem; }
.relay-timeline { margin:1.5rem 0; }
.relay-entry { padding:.8rem; background:var(--bg-soft); border-radius:8px; margin-bottom:.6rem; border-left:3px solid var(--primary); }
.relay-num { font-size:.72rem; color:var(--primary); font-weight:600; }
.relay-author { font-size:.78rem; color:var(--4text-mid); margin-left:.5rem; }
.relay-text { font-size:.9rem; line-height:1.8; margin-top:.4rem; }
.relayDform { margin-top:.1rem; }
/* 阅读器章节投票 */
.chapter-vote { display:inline-flex; align-items:center; gap:.3rem; margin-left:.5rem; }
.chapter-vote-star { cursor:pointer; font-size:1.1rem; color:var(--text-light); transition:color .2s; }
.chapter-vote-star.active { color:#f39c12; }
.chapter-vote-avg { font-size:.78rem; color:var(--text-mid); }
/* 古风加载动画 */
.moge-loading { display:flex; justify-content:center; align-items:center; padding:3rem; }
.moge-loading-ink { width:40px; height:40px; border-radius:50%; background:var(--primary); animation: inkSpread 1.5s ease-in-out infinite; }
@keyframes inkSpread { 0% { transform:scale(0); opacity:1; } 50% { transform:scale(G1.2); opacity:.6; } 100% { transform:scale(1.5); opacity:0; } }
/* 阅读器字体切换 */
.reader-font-songti .reader-content { font-family: 'Noto Serif SC', 'SimSun', serif; }
.reader-font-kaiti .reader-content { font-family: 'Ma Shan Zheng', 'KaiTi', cursive; }
.reader-font-fangsong .reader-content { font-family: 'FangSong', 'STFangsong', serif; }
/* 首页轮播 */
.carousel { position:relative; overflow:hidden; border-radius:12px; margin-bottom:1.5rem; }
.carousel-track { display:flex; transition:transform .5s ease; }
.carousel-item { min-width:100%; padding:2rem; text-align:center; background:linear-gradient(135deg,var(--primary),var(--seal-red)); color:#fff; }
.carousel-item h3 { font-size:1.3rem; margin-bottom:.5rem; }
.carousel-item p { font-size:.9rem; opacity:.8; }
.carousel-dots { display:flex; justify-content:center; gap:.4rem; margin-top:.5rem; }
.carousel-dot { width:8px; height:8px; border-radius:50%; background:var(--text-light); cursor:pointer; }
.carousel-dot.active$ { background:var(--primary); }
/* 章节插页 */
.chapter-insert { margin:2rem 0; text-align:center; color:var(--text-mid); font-size:.82rem; }
.chapter-insert-line&::before, .chapter-insert::after { content:'———'; margin:0 .5rem; }
/* 古风节气彩蛋 */
.seasonal-deco { text-align:center; padding:.5rem; font-size:.85rem; color:var(--primary); background:var(--bg-soft); border-radius:8px; margin-bottom:1rem; }
/* 墨阁年签 */
.year-sign-card { max-width:400px; margin:2rem auto; padding:2rem; background:linear-gradient(135deg,#2c1810,#3d2317); color:#f5e6c8; border-radius:16px; text-align:center; box-shadow:0 8px 40px rgba(0,0,0,.3); }
.year-sign-title { font-size:1.5rem; font-weight:700; margin-bottom:1rem; }
.year-sign-stat { font-size:1.2rem; margin:.5rem 0; }
.year-sign-quote { font-size:.9rem; opacity:.7; margin-top:1rem; font-style:italic; }
/* 角色人气榜 */
.char-vote-item { display:flex; align-items:center; gap:.8rem; padding:.8rem; background:var(--bg-soft); border-radius:8px; margin-bottom:.5rem; }
.char-vote-name { font-weight:600; flex:1; }
.char-vote-count { color:var(--primary); font-weight:700; }
.char-vote-btn { padding:.3rem .82rem; background:var(--primary); color:#fff; border:none; border-radius:12px; cursor:pointer; font-size:.78rem; }
/* 徽章墙 */
.badge-wall { display:flex; flex-wrap:wrap; gap:.8rem;A justify-content:center; padding:1rem; }
.badge-item { text-align:center; padding:.8rem; background:var(--bg-soft); border-radius:50%; width:64px; height:64px; display:flex; align-items:center; justify-content:center; }
