/* --- 全局与布局 --- */
:root {
    --bg-color: #f7f6f2;
    --text-color: #3a3a3a;
    --meta-color: #8a8a8a;
    --accent-color: #c94a4a;
    --border-color: #e5e3de;
    --sidebar-width: 320px;
    --content-width: 800px;
    --font-stack-serif: 'Noto Serif SC', 'Songti SC', 'STSong', serif;
    --font-stack-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --mono-font-stack: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
}
@keyframes digital-ink-flow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes seal-glitch-grand { 0% { text-shadow: none; transform: scale(1); box-shadow: none; } 25% { text-shadow: 2px 2px 0px #6495ed60; transform: scale(1.02); } 50% { text-shadow: -2px -2px 0px #ff634760; box-shadow: 0 0 25px var(--accent-color); } 75% { text-shadow: 2px -2px 0px #3cb37160; transform: scale(1.02); } 100% { text-shadow: none; transform: scale(1); box-shadow: none; } }
@keyframes light-stream { to { background-position: -200% center; } }
@keyframes light-guide-flow { 0% { transform: translateY(-5%); } 50% { transform: translateY(5%); } 100% { transform: translateY(-5%); } }
body { font-family: var(--font-stack-sans); background-color: var(--bg-color); color: var(--text-color); margin: 0; padding: 0; line-height: 1.8; -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; min-height: 100vh; }
.site-container { display: flex; justify-content: center; width: 100%; flex: 1; }
.site-sidebar { width: var(--sidebar-width); flex-shrink: 0; padding: 5rem 2rem; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; position: fixed; left: 0; top: 0; height: 100vh; border-right: 1px solid var(--border-color); background: linear-gradient(125deg, #e1e0db, #f7f6f2, #e7e6e1, #f1f0eb); background-size: 400% 400%; animation: digital-ink-flow 20s ease infinite; }
.blog-seal { font-family: var(--font-stack-serif); font-weight: 700; font-size: 2rem; color: var(--accent-color); border: 3px solid var(--accent-color); padding: 2rem 1.5rem; writing-mode: vertical-rl; text-orientation: mixed; letter-spacing: 0.8rem; margin-bottom: 3rem; cursor: pointer; transition: transform 0.3s ease; }
.blog-seal:hover { animation: seal-glitch-grand 0.3s linear 2; }
.blog-description { font-size: 1rem; color: var(--meta-color); margin-bottom: 4rem; }
.main-nav { font-family: var(--font-stack-serif); display: flex; flex-direction: column; align-items: center; }
.main-nav a { color: var(--meta-color); text-decoration: none; font-size: 1.2rem; margin-bottom: 2rem; transition: color 0.3s, letter-spacing 0.3s; }
.main-nav a:hover, .main-nav a.active { color: var(--text-color); letter-spacing: 0.1em; }
.site-content { width: 100%; max-width: var(--content-width); padding: 6rem 4rem; margin-left: var(--sidebar-width); }
.post-list { list-style: none; padding: 0; margin: 0; }
.post-item { margin-bottom: 5rem; padding-bottom: 5rem; border-bottom: 1px solid var(--border-color); }
.post-item:last-child { border-bottom: none; }
.post-title { font-family: var(--font-stack-serif); font-size: 2.2rem; font-weight: 700; line-height: 1.4; margin: 0 0 1rem 0; }
.post-title a { color: var(--text-color); text-decoration: none; transition: color 0.3s; }
.post-title a:hover { color: transparent; background: linear-gradient(90deg, #ff6347, #c94a4a, #6495ed, #ff6347); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; animation: light-stream 2s linear infinite; }
.post-meta { font-family: var(--font-stack-sans); font-size: 0.9rem; color: var(--meta-color); margin-bottom: 1.5rem; }
.post-excerpt { font-size: 1.1rem; opacity: 0.9; line-height: 1.9; }
.post-header { margin-bottom: 4rem; text-align: center; }
.post-title { font-family: var(--font-stack-serif); font-size: 2.8rem; font-weight: 700; line-height: 1.3; margin: 0 0 1rem 0; color: var(--text-color); }
.post-content { font-size: 1.1rem; }
.post-content p { margin: 0 0 2rem 0; }
.code-block-wrapper { margin: 3rem 0; background: #33363b; border-radius: 6px; box-shadow: inset 0 2px 4px rgba(0,0,0,0.4), 0 1px 0 rgba(255,255,255,0.03); position: relative; padding: 25px 30px; }
.light-guide { position: absolute; left: 0; top: 0; width: 2px; height: 100%; background: linear-gradient(to bottom, transparent, var(--accent-color), transparent); animation: light-guide-flow 8s ease-in-out infinite; opacity: 0.4; filter: blur(3px); transition: opacity 0.4s ease, filter 0.4s ease; }
.code-block-wrapper:hover .light-guide { opacity: 1; filter: blur(1.5px); }
.code-block-copy-btn { position: absolute; top: 15px; right: 20px; font-family: var(--font-stack-serif); font-size: 1.2rem; width: 50px; text-align: center; color: rgba(239, 235, 233, 0.4); background: none; border: none; cursor: pointer; opacity: 0; transition: all 0.3s ease; }
.code-block-wrapper:hover .code-block-copy-btn { opacity: 1; }
.code-block-copy-btn:hover { color: rgba(239, 235, 233, 1); }
.code-block-copy-btn.copied { color: var(--accent-color); pointer-events: none; }
pre { margin: 0; padding: 0; overflow-x: auto; background: none; }
code { font-family: var(--mono-font-stack); font-size: 0.95rem; line-height: 1.7; }
/* --- 代码块高亮：墨分五色 --- */
code[class*="language-"] {
    color: #c8c8c8; /* 基础墨色 - 变量、属性等 */
    text-shadow: none;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #888888; /* 浅墨 - 注释 */
    font-style: italic;
}
.token.punctuation,
.token.operator {
    color: #a0a0a0; /* 中墨 - 标点、操作符 */
}
.token.namespace {
    opacity: .7;
}
.token.tag,
.token.string,
.token.char,
.token.number,
.token.inserted {
    color: #dcdcdc; /* 浓墨 - 标签、字符串、数字 */
}
.token.selector,
.token.attr-name,
.token.entity,
.token.url,
.token.builtin,
.token-atrule .token.rule {
    color: #dcdcdc; /* 浓墨 */
}
.token.keyword,
.token.function,
.token.class-name,
.token.constant,
.token.symbol,
.token.deleted {
    color: #f0f0f0; /* 焦墨 - 关键字、函数、类名、常量 */
}
.token.property,
.token.boolean {
    color: #f0f0f0; /* 焦墨 */
}
.token.regex,
.token.important,
.token.variable {
    color: #c8c8c8; /* 回归基础墨色 */
}
.token.important,
.token.bold {
    font-weight: bold;
}
.token.italic {
    font-style: italic;
}
.token.entity {
    cursor: help;
}
.page-title { font-family: var(--font-stack-serif); font-size: 2.8rem; font-weight: 700; line-height: 1.3; margin: 0 0 4rem 0; text-align: center; }
.archive-year { font-family: var(--font-stack-serif); font-size: 4rem; font-weight: 700; color: #cccccc; text-align: left; margin: 4rem 0 2rem 0; position: relative; }
.archive-list { list-style: none; padding: 0; }
.archive-item { display: flex; align-items: baseline; padding: 1rem 0; border-bottom: 1px solid var(--border-color); }
.archive-date { font-family: var(--font-stack-sans); font-size: 0.9rem; color: var(--meta-color); width: 120px; flex-shrink: 0; }
.archive-title-link { font-family: var(--font-stack-serif); font-size: 1.2rem; font-weight: 500; color: var(--text-color); text-decoration: none; transition: color 0.3s; }
.archive-title-link:hover { color: var(--accent-color); }
.pagination { font-family: var(--font-stack-serif); text-align: center; margin-top: 4rem; }
.pagination a, .pagination span { display: inline-block; padding: 0.5rem 1.2rem; margin: 0 0.5rem; color: var(--meta-color); text-decoration: none; border: 1px solid var(--border-color); border-radius: 4px; transition: all 0.3s ease; }
.pagination a:hover { color: var(--text-color); border-color: var(--text-color); }
.pagination .page-number.current { background-color: var(--accent-color); color: var(--bg-color); border-color: var(--accent-color); }
.pagination .space { border: none; }
@media (max-width: 1200px) {
    .site-sidebar { position: relative; width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--border-color); }
    .site-container { flex-direction: column; }
    .site-content { margin-left: 0; padding: 4rem 1.5rem; }
    .blog-seal { writing-mode: horizontal-tb; padding: 0.5rem 1.5rem; letter-spacing: 0.5rem; font-size: 1.8rem; margin-bottom: 1.5rem; }
    .main-nav { flex-direction: row; }
    .main-nav a { margin: 0 1rem; }
}

/* --- 页脚与备案号 --- */
.site-footer {
    text-align: center;
    font-size: 0.85rem;
    color: var(--meta-color);
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

.icp-license,
.psb-license {
    margin: 0.5rem 0;
}

.psb-license a {
    color: var(--meta-color);
    text-decoration: none;
    transition: color 0.3s;
}

.psb-license a:hover {
    color: var(--text-color);
}


