@charset "UTF-8";
/*!
 * Rizhi Plus 7.8 — 夜间模式
 * 仅在 html[data-theme="dark"] 时生效，与主样式共用同一套变量
 */

html[data-theme="dark"]{
    --surface:#1c2529;
    --surface-soft:#222c31;
    --border:#2b363c;
    --border-strong:#35434a;
    --text:#bcc8ce;
    --text-strong:#e6eef1;
    --text-muted:#7d8f99;
    --accent-soft:rgba(var(--accent-rgb),.14);
    --shadow-card:0 10px 30px rgba(0,0,0,.35);
    --body-bg:#121a1e;
}

html[data-theme="dark"],
html[data-theme="dark"] body{background-color:#121a1e;color:var(--text)}

html[data-theme="dark"] body,
html[data-theme="dark"] button,
html[data-theme="dark"] input,
html[data-theme="dark"] textarea{color:var(--text)}

html[data-theme="dark"] .container{background:var(--surface);box-shadow:none}

/* 顶部 */
html[data-theme="dark"] #header{
    background-color:#131c21;
    background-image:
        linear-gradient(135deg,rgba(var(--accent-rgb),.26) 0%,rgba(6,10,13,.72) 60%,rgba(4,7,9,.84) 100%),
        var(--header-image),
        var(--header-gradient);
}
html[data-theme="dark"] .site-title img{filter:brightness(88%)}

/* 菜单 */
html[data-theme="dark"] .menubar{background:var(--surface);border-bottom-color:var(--border)}
html[data-theme="dark"] .has-sub ul{background:var(--surface);border-color:var(--border);box-shadow:0 12px 26px rgba(0,0,0,.45)}
html[data-theme="dark"] .has-sub ul li a:hover{background:var(--accent-soft)}
html[data-theme="dark"] .rz-searchbar{background:var(--surface-soft);border-color:var(--border-strong)}
html[data-theme="dark"] .rz-searchbar input.text{color:var(--text)}
html[data-theme="dark"] .rz-searchbar:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px rgba(var(--accent-rgb),.16)}

/* 正文 */
html[data-theme="dark"] .post{border-bottom-color:var(--border)}
html[data-theme="dark"] .post-content h1,
html[data-theme="dark"] .post-content h2,
html[data-theme="dark"] .post-content h3,
html[data-theme="dark"] .post-content h4,
html[data-theme="dark"] .post-content h5,
html[data-theme="dark"] .post-content h6{background:rgba(255,255,255,.035)}
html[data-theme="dark"] blockquote{background:var(--surface-soft);color:var(--text)}
html[data-theme="dark"] table thead tr,
html[data-theme="dark"] table thead th{background:#2b363c;color:var(--text-strong)}
html[data-theme="dark"] table tbody tr:nth-child(odd){background:rgba(255,255,255,.03)}
html[data-theme="dark"] code,
html[data-theme="dark"] pre{background:#141b20;color:#8ee6c0}
html[data-theme="dark"] .post-content img{filter:brightness(88%)}
html[data-theme="dark"] .post-thumb img[src^="data:image/svg"]{filter:brightness(.55) saturate(.8)}
html[data-theme="dark"] .post-thumb{box-shadow:0 0 0 1px rgba(255,255,255,.04)}
html[data-theme="dark"] .topitem{box-shadow:0 10px 26px rgba(0,0,0,.4)}
html[data-theme="dark"] .gonggao{color:#e0a55c;background:none;border:0}
html[data-theme="dark"] .gonggao a{color:#e0a55c}
html[data-theme="dark"] #tips-red{background:rgba(224,91,91,.10);border-color:rgba(224,91,91,.20)}
html[data-theme="dark"] #tips-green{background:rgba(74,168,124,.10);border-color:rgba(74,168,124,.20)}
html[data-theme="dark"] #tips-orange{background:rgba(232,163,61,.10);border-color:rgba(232,163,61,.20)}

/* 分页 / 链接 */
html[data-theme="dark"] .page-navigator li a,
html[data-theme="dark"] .page-navigator li span{border-color:var(--border);color:var(--text)}
html[data-theme="dark"] .page-navigator li a:hover{border-color:var(--accent);color:var(--accent)}
html[data-theme="dark"] .page-navigator li.current a,
html[data-theme="dark"] .page-navigator li.current span{background:var(--accent);border-color:var(--accent);color:#fff}
html[data-theme="dark"] .sticky,
html[data-theme="dark"] .place span,
html[data-theme="dark"] .post-content a,
html[data-theme="dark"] a:hover,
html[data-theme="dark"] a:active{color:var(--accent)}

/* 评论 */
html[data-theme="dark"] #comment-form .rz-field input.text,
html[data-theme="dark"] #comment-form .rz-field textarea.textarea{background:var(--surface-soft);border-color:var(--border-strong);color:var(--text)}
html[data-theme="dark"] .comment-head{border-top-color:var(--border)}
html[data-theme="dark"] .comment-waiting,
html[data-theme="dark"] .commentReview{background:rgba(224,165,92,.15);color:#e0a55c}
html[data-theme="dark"] .comment-reply a{border-color:var(--border-strong);color:var(--text-muted)}
html[data-theme="dark"] .comment-list .respond{border-top-color:var(--border)}

/* 页脚 */
html[data-theme="dark"] #footer{background:transparent;color:var(--text-muted);border-top-color:var(--border)}
html[data-theme="dark"] #footer a{color:var(--text)}

/* 组件 */
html[data-theme="dark"] .rz-faces-panel{background:var(--surface-soft);border-color:var(--border);box-shadow:0 16px 34px rgba(0,0,0,.55)}
html[data-theme="dark"] .rz-face-item{background:rgba(255,255,255,.06)}
html[data-theme="dark"] .rz-face-item:hover{background:rgba(var(--accent-rgb),.22)}
html[data-theme="dark"] .search-panel{background:var(--surface);border-color:var(--border);box-shadow:0 14px 30px rgba(0,0,0,.5)}
html[data-theme="dark"] :not(pre)>code[class*="language-"],
html[data-theme="dark"] pre[class*="language-"]{background:rgba(255,255,255,.03)!important}
html[data-theme="dark"] hr{background-image:linear-gradient(90deg,transparent,var(--border-strong) 50%,transparent)}

/* 移动端菜单 */
@media (max-width:868px){
    html[data-theme="dark"] .menubar.menu-open #menu,
    html[data-theme="dark"] .menubar.search-open .search-panel{background:var(--surface);border-color:var(--border);box-shadow:0 12px 24px rgba(0,0,0,.5)}
    html[data-theme="dark"] #menu li{border-bottom-color:var(--border)}
    html[data-theme="dark"] .has-sub ul{background:var(--surface-soft)}
    html[data-theme="dark"] #footer{background:transparent}
}

/* 数字验证码 */
html[data-theme="dark"] .rz-capcode{background:rgba(var(--accent-rgb),.18);border-color:rgba(var(--accent-rgb),.30);color:#9fe3bd}

/* 卡片样式：深色下把卡片提亮一档，靠边框分层 */
html[data-theme="dark"][data-card="soft"] .post,
html[data-theme="dark"][data-card="float"] .post{
    background:var(--surface-soft);
    border-color:var(--border-strong);
}
html[data-theme="dark"][data-card="soft"] .post{box-shadow:none}
html[data-theme="dark"][data-card="float"] .post{box-shadow:0 10px 24px rgba(0,0,0,.35)}
html[data-theme="dark"][data-card="float"] .post:hover{
    border-color:rgba(var(--accent-rgb),.42);
    box-shadow:0 16px 34px rgba(0,0,0,.45);
}
html[data-theme="dark"][data-card="soft"] .comment-body>div[id],
html[data-theme="dark"][data-card="float"] .comment-body>div[id],
html[data-theme="dark"][data-card="soft"] .respond,
html[data-theme="dark"][data-card="float"] .respond{background:rgba(255,255,255,.035);border-color:var(--border-strong)}
