/*
Theme Name: Fluent
Theme URI: https://ws.wnmax.com
Description: 极简、扁平、大气的微软 Fluent Design 风格 Typecho 主题
Author: Administrator
Author URI: https://ws.wnmax.com
Version: 1.0.0
License: MIT
*/

/* =========================================================
 * 1. 设计变量（Design Tokens）
 * ========================================================= */
:root {
    --color-bg: #FFFFFF;          /* 页面背景纯白 */
    --color-text: #1A1A1A;        /* 文字主色深黑 */
    --color-text-secondary: #666666; /* 次级文字中灰 */
    --color-border: #EAEAEA;      /* 容器细边框 */
    --color-border-hover: #BFBFBF;/* 悬停时边框变深 */
    --link-hover: #000000;        /* 全站链接/标题悬停统一色（深色底上的菜单除外） */

    --btn-primary-bg: #000000;    /* 主按钮背景纯黑 */
    --btn-primary-text: #FFFFFF;  /* 主按钮文字纯白 */
    --btn-secondary-bg: #F3F3F3;  /* 次级按钮背景浅灰 */
    --btn-secondary-text: #1A1A1A;/* 次级按钮文字深黑 */

    --radius: 0;                  /* 全站直角：不再使用圆角 */
    --btn-radius: 0;              /* 按钮同样直角 */
    --transition: 0.2s;           /* 平滑过渡 */

    /* 扁平纯色按钮（只用黑与灰，去除渐变） */
    --grad-primary: #1a1a1a;
    --grad-primary-hover: #2b2b2b;
    --grad-secondary: #ffffff;
    --grad-secondary-hover: #f2f2f2;
    --container: 1680px;          /* 宽屏容器最大宽度 */
    --header-h: 192px;            /* 顶部总高(展开态); 折叠态由 body.is-compact 覆盖 */
    --hd-util-h: 36px;            /* 1 楼工具条 */
    --hd-brand-h: 112px;          /* 2 楼品牌区 */
    --hd-nav-h: 44px;             /* 3 楼导航 */
    --code-bg: #F7F7F7;           /* 代码块浅灰背景 */

    --font: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
            "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* =========================================================
 * 2. 极简重置（Reset）
 * ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; border: 0; }

a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition), opacity var(--transition);
}
a:hover { color: #000; }

ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }

/* 可访问性:仅屏幕阅读器可见 */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* =========================================================
 * 3. 顶部导航（sticky）
 * ========================================================= */
/* 顶栏折叠会改变文档流高度, 关闭滚动锚定,
   否则浏览器会自动补偿滚动位置, 与折叠逻辑互相触发造成页面抖动 */
html { overflow-anchor: none; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

/* ---------- 1 楼：工具条 ---------- */
.hd-util {
    height: var(--hd-util-h);
    border-bottom: 1px solid var(--color-border);
}
.hd-util-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}
.hd-brand-mini {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text);
}
.hd-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: var(--color-text);
    border-radius: 3px;
}
.hd-site-name {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* ---------- 2 楼：品牌 logo（矢量，滚动后收起） ---------- */
.hd-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--hd-brand-h);
    overflow: hidden;
    transition: height var(--transition), opacity var(--transition);
}
.hd-logo-svg {
    display: block;
    width: 300px;
    height: 75px;
}
.hd-logo-main {
    font-family: var(--font);
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 6px;
    fill: var(--color-text);
}
.hd-logo-sub {
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 11px;
    fill: #9A9A9A;
}

/* 折叠态：收起品牌层，导航常驻（用变量驱动高度，避免选择器层叠互相覆盖） */
body.is-compact {
    --header-h: 80px;
    --hd-brand-h: 0px;
}
body.is-compact .hd-brand { opacity: 0; }

/* ---------- 3 楼：居中导航 ---------- */
.site-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    height: var(--hd-nav-h);
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 14px;
    font-size: 13.5px;
    letter-spacing: 0.2px;
    color: var(--color-text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--btn-radius);
    transition: color var(--transition), background var(--transition);
}
.nav-link:hover {
    color: var(--color-text);
    background: var(--btn-secondary-bg);
}
/* 当前栏目：黑底白字，与站内主按钮同一套视觉 */
.nav-link.is-active {
    color: var(--btn-primary-text);
    background: var(--btn-primary-bg);
}
.nav-link.is-active:hover { background: #333; color: #fff; }

/* 一级分类后面的英文缩略名：弱化的灰色小字 */
.nav-slug {
    margin-left: 5px;
    font-style: normal;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: .06em;
    color: #9A9A9A;
}
.nav-link.is-active .nav-slug { color: rgba(255, 255, 255, .55); }

/* 二级菜单项后面的英文缩略名：深色下拉里再弱一档 */
.nav-sub-slug {
    margin-left: 6px;
    font-style: normal;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: .06em;
    color: rgba(255, 255, 255, .35);
}
.nav-sub li a:hover .nav-sub-slug,
.nav-sub li a.is-active .nav-sub-slug { color: rgba(255, 255, 255, .6); }

/* 一级分类 + 子分类下拉(鼠标经过触发) */
.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-item > .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.nav-sub {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 60;
    min-width: 160px;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    /* 黑色半透明下拉：叠在页面上不抢视线 */
    background: rgba(17, 17, 17, .92);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

.nav-item:hover > .nav-sub,
.nav-item:focus-within > .nav-sub {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-sub li { list-style: none; }

.nav-sub li a {
    display: block;
    padding: 8px 16px;
    font-size: 14px;
    color: rgba(255, 255, 255, .78);
    white-space: nowrap;
    transition: background var(--transition), color var(--transition);
}

/* hover 用不透明深灰，叠在半透明菜单上更稳，避免半透明白在部分显卡上发白 */
.nav-sub li a:hover,
.nav-sub li a.is-active {
    background: #2E2E2E;
    color: #fff;
}



.caret { font-size: 11px; opacity: .5; }

/* 分类较多时收紧间距,避免导航溢出 */
@media (max-width: 1180px) {
    .nav-link { padding: 0 10px; font-size: 13px; }
}

/* 右侧操作区：始终贴右 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

/* 已登录用户菜单 */
.user-menu { position: relative; }

.user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 6px;
    color: var(--color-text);
    background: transparent;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: background var(--transition);
}
.user-trigger:hover,
.user-trigger:focus-visible { background: var(--btn-secondary-bg); }

.user-avatar {
    display: block;
    width: 26px;
    height: 26px;
    object-fit: cover;
    border-radius: 50%;
}

.user-name {
    max-width: 120px;
    overflow: hidden;
    font-size: 14px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 70;
    min-width: 148px;
    padding: 6px 0;
    /* 与导航二级菜单同一套黑色半透明 */
    background: rgba(17, 17, 17, .92);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

.user-menu:hover > .user-dropdown,
.user-menu:focus-within > .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: block;
    padding: 8px 16px;
    font-size: 14px;
    color: rgba(255, 255, 255, .78);
    white-space: nowrap;
    transition: background var(--transition), color var(--transition);
}
.user-dropdown a:hover {
    background: #2E2E2E;
    color: #fff;
}

/* =========================================================
 * 4. 按钮（黑灰风格）
 * ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--btn-radius);
    border: 1px solid transparent;
    transition: background var(--transition), color var(--transition),
                border-color var(--transition), opacity var(--transition);
}

/* 主按钮:纯黑底白字 */
.btn-primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border-color: var(--btn-primary-bg);
}
.btn-primary:hover {
    background: #333;
    border-color: #333;
    color: #fff;
}

/* 次级按钮:浅灰底深黑字 */
.btn-secondary {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
    border-color: var(--btn-secondary-bg);
}
.btn-secondary:hover {
    background: #E9E9E9;
    border-color: #E9E9E9;
    color: var(--color-text);
}

/* 导航栏登录按钮（主按钮样式，小号，带图标） */
.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    font-size: 13px;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: 1px solid var(--btn-primary-bg);
    border-radius: var(--btn-radius);
}
.btn-icon { display: block; flex: none; }
.btn-login:hover { background: #333; border-color: #333; color: #fff; }

/* 导航栏注册链接（次要操作，文字样式） */
.link-register {
    padding: 4px 6px;
    font-size: 13px;
    line-height: 1.2;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color var(--transition);
}
.link-register:hover { color: var(--color-text); }

/* 顶栏搜索：图标常驻，鼠标经过时输入框从右侧向左滑出
   输入框绝对定位，展开不推挤登录按钮，也不影响 .header-actions 的间距 */
.hd-search {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
}

.hd-search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    color: var(--color-text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--btn-radius);
    cursor: pointer;
    transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.hd-search:hover .hd-search-toggle,
.hd-search:focus-within .hd-search-toggle {
    color: var(--color-text);
    background: var(--btn-secondary-bg);
    border-color: var(--color-border);
}

.hd-search-input {
    position: absolute;
    top: 50%;
    right: calc(100% + 6px);
    width: 0;
    padding: 0;
    transform: translateY(-50%);
    font-size: 13px;
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid transparent;
    border-radius: var(--btn-radius);
    opacity: 0;
    visibility: hidden;
    transition: width .28s ease, padding .28s ease,
                opacity .18s ease, visibility .28s, border-color var(--transition);
}

.hd-search:hover .hd-search-input,
.hd-search:focus-within .hd-search-input {
    width: 200px;
    padding: 5px 10px;
    border-color: var(--color-border);
    opacity: 1;
    visibility: visible;
}

.hd-search-input:focus {
    outline: none;
    border-color: var(--color-text);
}

.hd-search-input::placeholder { color: #B0B0B0; }

.btn-block { width: 100%; }

/* 汉堡按钮（移动端显示） */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    width: 32px;
    height: 32px;
    padding: 0 7px;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--btn-radius);
}
.burger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--color-text);
    transition: transform var(--transition), opacity var(--transition);
}
.burger.is-active span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.burger.is-active span:nth-child(2) { opacity: 0; }
.burger.is-active span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* =========================================================
 * 5. 登录弹窗（Modal + 毛玻璃遮罩）
 * ========================================================= */
/* 遮罩层:半透明 + 毛玻璃 */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 26, 0.35);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
    z-index: 200;
}
.modal-overlay.is-open { opacity: 1; visibility: visible; }

/* 弹窗主体:居中 + 淡入缩放 */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 360px;
    max-width: calc(100% - 32px);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 28px;
    z-index: 201;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -50%) scale(0.96);
    transition: opacity var(--transition), transform var(--transition),
                visibility var(--transition);
}
.modal.is-open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal-title {
    margin: 0 0 20px;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    font-size: 20px;
    line-height: 1;
    color: var(--color-text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--btn-radius);
    transition: background var(--transition), color var(--transition);
}
.modal-close:hover { background: var(--btn-secondary-bg); color: var(--color-text); }

.login-form .field { display: block; margin-bottom: 16px; }
.field-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    transition: border-color var(--transition);
    outline: none;
}
/* 聚焦时边框变黑 */
.login-form input:focus {
    border-color: var(--color-text);
}

/* 弹窗底部：注册引导 */
.modal-foot {
    margin: 20px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
    font-size: 13px;
    color: var(--color-text-secondary);
    text-align: center;
}
.modal-foot a {
    margin-left: 4px;
    color: var(--color-text);
    font-weight: 500;
    text-decoration: none;
}
.modal-foot a:hover { text-decoration: underline; }

/* =========================================================
 * 6. 主体容器
 * ========================================================= */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.main { padding: 40px 0 64px; }

/* 区块标题统一：归档标题、文章标题与侧栏标题同字号、同行高、同下划线位置。
   .main 与 .cc-side 顶部内边距都是 40px，所以三条下划线自然对齐。 */
.archive-title,
.post-title,
.cc-side-title {
    margin: 0 0 20px;
    padding: 0 0 12px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
}

/* 内容区标题居中，与下面居中的日期 / 作者同一视觉中轴 */
.post-title {
    text-align: center;
}

/* 中文标题后的英文后缀（侧栏区块标题 / 归档标题通用），
   与导航 .nav-slug 同一套弱化灰字，保持全站语言一致 */
.cc-title-en {
    margin-left: 8px;
    font-style: normal;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #9A9A9A;
}

/* =========================================================
 * 6.1 面包屑导航（全站，由 breadcrumb.php 输出）
 * 左右边距与 .cc-layout / .container 保持一致
 * ========================================================= */
.cc-crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    max-width: var(--container);
    margin: 0 auto;
    padding: 22px 24px 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

.cc-crumb-link {
    color: var(--color-text-secondary);
    transition: color var(--transition);
}
.cc-crumb-link:hover { color: var(--color-text); }

.cc-crumb-sep { color: #C9C9C9; }

/* 当前页：纯文本，不可点，过长省略 */
.cc-crumb-cur {
    max-width: 60%;
    overflow: hidden;
    color: var(--color-text);
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* =========================================================
 * 7. 文章网格卡片
 * ========================================================= */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 24px;
    transition: border-color var(--transition);
}
.card:hover { border-color: var(--color-border-hover); }

.card-title {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.2px;
    color: var(--color-text);
}
.card-title:hover { color: #000; }

.card-meta {
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.card-excerpt {
    font-size: 15px;
    color: var(--color-text-secondary);
    line-height: 1.65;
}

.empty {
    padding: 60px 0;
    text-align: center;
    color: var(--color-text-secondary);
}

/* =========================================================
 * 8. 文章详情页排版
 * ========================================================= */
/* 正文宽度跟着中栏走，与分类列表的内容宽度一致（不再限宽 820px） */
.post-single { max-width: none; margin: 0; }

/* .post-title 的字号 / 下划线见 §6「区块标题统一」，与侧栏标题保持一致 */

.post-meta {
    margin-bottom: 32px;
    font-size: 14px;
    color: var(--color-text-secondary);
    /* 日期 / 分类 / 作者整行居中 */
    text-align: center;
}
.post-meta a { color: var(--color-text-secondary); }
.post-meta a:hover { color: var(--color-text); }

/* 封面图(支持多张竖排) */
.post-cover {
    margin: 0 0 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.post-cover img {
    display: block;
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.post-content { font-size: 16px; line-height: 1.8; }

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    margin: 1.6em 0 0.6em;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.3px;
}
.post-content h1 { font-size: 28px; }
.post-content h2 { font-size: 24px; }
.post-content h3 { font-size: 20px; }
.post-content h4 { font-size: 17px; }

.post-content p { margin: 0 0 1.1em; }

.post-content a {
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border-hover);
}
.post-content a:hover { border-bottom-color: var(--color-text); }

.post-content ul,
.post-content ol { margin: 0 0 1.1em; padding-left: 1.6em; }
.post-content ul li { list-style: disc; }
.post-content ol li { list-style: decimal; }
.post-content li { margin: 0.35em 0; }

.post-content img {
    display: block;
    margin: 1.4em auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.post-content blockquote {
    margin: 1.4em 0;
    padding: 4px 0 4px 18px;
    border-left: 3px solid var(--color-border-hover);
    color: var(--color-text-secondary);
}
.post-content blockquote p { margin: 0.4em 0; }

/* 行内代码 */
.post-content code {
    padding: 2px 6px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9em;
    background: var(--code-bg);
    border-radius: var(--radius);
}

/* 代码块 */
.post-content pre {
    margin: 1.4em 0;
    padding: 16px;
    overflow: auto;
    background: var(--code-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    line-height: 1.6;
}
.post-content pre code {
    padding: 0;
    background: transparent;
    font-size: 14px;
}

.post-content table {
    width: 100%;
    margin: 1.4em 0;
    border-collapse: collapse;
    font-size: 15px;
}
.post-content th,
.post-content td {
    padding: 9px 12px;
    border: 1px solid var(--color-border);
    text-align: left;
}
.post-content th { background: var(--code-bg); font-weight: 600; }

.post-content hr {
    margin: 2em 0;
    border: none;
    border-top: 1px solid var(--color-border);
}

/* 下载按钮(支持多个横排) */
.post-down {
    margin: 28px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.post-down-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    max-width: 100%;
    padding: 11px 18px;
    font-size: 15px;
    font-weight: 500;
    color: var(--btn-primary-text);
    background: var(--btn-primary-bg);
    border-radius: var(--btn-radius);
    transition: background var(--transition), opacity var(--transition);
}
.post-down-btn:hover { background: #333; color: #fff; }
.post-down-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    text-align: left;
}
/* 文件大小: 夹在文件名和格式块之间, 次要信息用半透明白 */
.post-down-size {
    flex: 0 0 auto;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.62);
}
.post-down-ext {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .3px;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    padding: 2px 7px;
}

/* 音乐播放器(APlayer) */
.post-music {
    margin: 28px 0 0;
}
.post-music .aplayer {
    margin: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: none;
}
.post-music .aplayer .aplayer-info .aplayer-music .aplayer-title {
    font-weight: 500;
}

/* 文章标签 / 上下篇 */
.post-tags {
    margin-top: 36px;
    font-size: 14px;
    color: var(--color-text-secondary);
}
.post-tags a {
    display: inline-block;
    margin: 0 6px 6px 0;
    padding: 3px 10px;
    font-size: 13px;
    color: var(--color-text-secondary);
    background: var(--btn-secondary-bg);
    border-radius: var(--btn-radius);
    transition: background var(--transition), color var(--transition);
}
.post-tags a:hover { background: #E9E9E9; color: var(--color-text); }


/* =========================================================
 * 9. 分页（圆形灰块，参考 wnmax.com 线上样式）
 * ========================================================= */
.page-navigator {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 40px 0 0;
    padding: 0;
    list-style: none;
}
.page-navigator li { display: inline-flex; }

.page-navigator a,
.page-navigator span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    font-size: 13px;
    line-height: 1;
    color: #fff;
    background: #7d7d7d;
    border: 0;
    border-radius: 50%;
    transition: background var(--transition), color var(--transition);
}
.page-navigator a:hover { background: #5f5f5f; }

/* 当前页：更深的灰 */
.page-navigator .current a,
.page-navigator .current span {
    background: #3d3d3d;
    color: #fff;
    font-weight: 500;
}

/* 省略号：不带底色，只留文字 */
.page-navigator li:not([class]) > span {
    width: auto;
    min-width: 12px;
    background: transparent;
    color: #999;
}

/* =========================================================
 * 10. 评论
 * ========================================================= */
/* 评论区和正文同宽，不再单独收窄居中 */
.comments {
    margin: 56px auto 0;
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
}

.comments-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 24px;
    font-size: 20px;
    font-weight: 600;
}
.comments-count {
    padding: 1px 8px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
    color: var(--color-text-secondary);
    background: var(--btn-secondary-bg);
    border-radius: 10px;
}

.comment-list { margin-bottom: 32px; }
.comment {
    padding: 18px 0;
    border-bottom: 1px solid var(--color-border);
}
.comment:last-child { border-bottom: none; }

/* 头像 + 正文两栏（头像圆形是全局圆角例外之一） */
.comment-inner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.comment-avatar {
    flex: none;
    width: 36px;
    height: 36px;
    margin-top: 1px;
    object-fit: cover;
    background: #1A1A1A;
    border-radius: 50%;
}

.comment-main {
    flex: 1;
    min-width: 0;
}

.comment-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}
.comment-author {
    font-weight: 600;
    font-size: 15px;
}
.comment-date {
    margin: 0;
    font-size: 13px;
    color: var(--color-text-secondary);
}
.comment-awaiting {
    font-size: 12px;
    font-style: normal;
    color: #4A4A4A;
}
.comment-content { font-size: 15px; line-height: 1.7; }

/* 回复按钮 */
.comment-actions { margin-top: 8px; }
.comment-reply-link {
    padding: 0;
    font-size: 13px;
    color: var(--color-text-secondary);
    background: none;
    border: 0;
    cursor: pointer;
    transition: color var(--transition);
}
.comment-reply-link:hover { color: var(--color-text); }

/* 楼中楼嵌套 */
.comment-children {
    margin: 10px 0 0 4px;
    padding-left: 16px;
    border-left: 2px solid var(--color-border);
}
.comment-children .comment-list { margin-bottom: 0; }
.comment-children .comment { padding: 14px 0; }
.comment-children .comment:first-child { padding-top: 0; }

.comments-empty,
.comments-closed {
    margin: 0 0 32px;
    font-size: 15px;
    color: var(--color-text-secondary);
}

/* 评论表单 */
.respond { margin-top: 8px; }
.respond-title {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 600;
}
.comment-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.comment-form-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    transition: border-color var(--transition);
    outline: none;
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--color-text); }
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form-foot {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.comment-form-error {
    font-size: 13px;
    font-weight: 500;
    color: #1A1A1A;
}
.comment-form-error:empty { display: none; }
.comment-form-identity {
    margin: 0;
    font-size: 14px;
    color: var(--color-text-secondary);
}
.comment-form-identity strong {
    font-weight: 600;
    color: var(--color-text);
}
.comment-form-identity a {
    color: var(--color-text);
    text-decoration: underline;
}

/* 正在回复某条评论的提示条 */
.comment-reply-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--color-text-secondary);
    background: var(--btn-secondary-bg);
    border-radius: var(--radius);
}
.comment-reply-tip[hidden] { display: none; }
.comment-reply-tip strong {
    font-weight: 600;
    color: var(--color-text);
}
.comment-reply-cancel {
    margin-left: auto;
    padding: 0;
    font-size: 13px;
    color: var(--color-text);
    background: none;
    border: 0;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 640px) {
    .comment-form-row { grid-template-columns: 1fr; }
    .comment-children {
        margin-left: 0;
        padding-left: 12px;
    }
}

/* =========================================================
 * 11. 页脚
 * ========================================================= */
.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 32px 0;
    text-align: center;
    font-size: 13px;
    color: var(--color-text-secondary);
}
.site-footer a { color: var(--color-text-secondary); }
.site-footer a:hover { color: var(--color-text); }

/* =========================================================
 * 12. 响应式（<768px 汉堡菜单）
 * ========================================================= */
@media (max-width: 992px) {
    .post-grid { grid-template-columns: repeat(2, 1fr); }
    /* 小屏不显示品牌层，只保留工具条 + 导航 */
    .hd-brand { display: none; }
    :root { --header-h: 80px; }
    body.is-compact { --header-h: 80px; }
}

@media (max-width: 768px) {
    /* 汉堡按钮显示 */
    .burger { display: inline-flex; }

    /* 小屏没有 hover：点图标靠 :focus-within 展开，宽度收窄避免盖住登录按钮 */
    .hd-search:hover .hd-search-input,
    .hd-search:focus-within .hd-search-input { width: 140px; }


    /* 导航变为下拉面板 */
    .site-nav {
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        height: auto;
        max-width: none;
        margin: 0;
        padding: 8px 16px 16px;
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        display: none;
    }
    .site-nav.is-open { display: flex; }

    .nav-link {
        display: block;
        width: 100%;
        height: auto;
        text-align: left;
        padding: 10px 12px;
    }

    /* 一级分类单独成行，子分类缩进平铺（移动端没有 hover） */
    .nav-item {
        display: block;
        width: 100%;
        height: auto;
    }

    .nav-item > .nav-link {
        display: flex;
        justify-content: space-between;
        width: 100%;
    }

    .nav-sub {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        min-width: 0;
        width: 100%;
        padding: 0 0 4px 12px;
        border: none;
        box-shadow: none;
        background: transparent;
    }

    /* 移动端菜单是白色面板，二级项要回到深色，不能沿用桌面端的白字 */
    .nav-sub li a {
        padding: 8px 8px 8px 16px;
        font-size: 14px;
        color: var(--color-text-secondary);
        background: transparent;
    }

    .nav-sub li a.is-active {
        color: var(--color-text);
        background: transparent;
    }

    /* 白色浮层面板里缩略名要换成浅灰，否则看不见 */
    .nav-sub-slug,
    .nav-sub li a:hover .nav-sub-slug,
    .nav-sub li a.is-active .nav-sub-slug {
        color: #B5B5B5;
    }

    .nav-item .caret { display: none; }

    .post-grid { grid-template-columns: 1fr; }
    .main { padding: 28px 0 48px; }

    /* 手机端顶部只剩工具条，导航是浮层不占高度 */
    :root { --header-h: 36px; }
    body.is-compact { --header-h: 36px; }
}

/* =========================================================
 * 13. 三栏布局（左栏 + 内容 + 右栏）
 * 由 CategoryCustomizer 决定当前分类是否加载侧栏:
 *   sidebar-left-{slug}.php  → 左栏
 *   sidebar-right-{slug}.php → 右栏
 * 无侧栏时自动退化为单栏,与普通页面完全一致
 * ========================================================= */
.cc-layout {
    display: flex;
    align-items: flex-start;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.cc-layout > .main {
    flex: 1;
    min-width: 0;
    max-width: none;
    padding: 40px 0 64px;
}

/* 侧栏基础样式：固定 300px，跟随页面滚动，不再出现内部滚动条 */
.cc-side {
    flex: 0 0 300px;
    width: 300px;
    align-self: flex-start;
    position: sticky;
    top: calc(var(--header-h) + 20px);
    /* 侧栏可能高于视口: 限制高度并允许内部滚动, 置顶时下半截(标签云等)也能滚到 */
    max-height: calc(100vh - var(--header-h) - 40px);
    overflow-y: auto;
    /* 隐藏滚动条: 仍可用滚轮/触摸滚动, 但不绘制滚动条, 保持版面干净 */
    scrollbar-width: none;      /* Firefox */
    -ms-overflow-style: none;   /* 旧 Edge / IE */
    padding: 40px 0 64px;
    box-sizing: border-box;
}
/* Chrome / Safari: 隐藏侧栏内部滚动条(滚动能力保留) */
.cc-side::-webkit-scrollbar { width: 0; height: 0; display: none; }
.cc-side-left  { padding-right: 32px; }
.cc-side-right { padding-left: 32px; }

.cc-side-block { margin-bottom: 32px; }
.cc-side-block:last-child { margin-bottom: 0; }

/* .cc-side-title 的尺寸/下划线见 §6「区块标题统一」 */

.cc-side-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cc-side-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: var(--color-text);
}
.cc-side-item:hover .cc-side-item-title { color: #000; }

.cc-side-thumb {
    flex: 0 0 96px;
    width: 96px;
    height: 72px;
    overflow: hidden;
    border-radius: 2px;
    background: var(--color-border);
}
.cc-side-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.cc-side-item:hover .cc-side-thumb img { transform: scale(1.05); }

.cc-side-item-body { flex: 1; min-width: 0; }

/* 标题前的首字母圆形图标（仅 $ccSideAvatar 为 true 的右栏输出）
   序号奇偶换底色：1、3、5… 黑底白字；2、4、6… 浅底黑字 */
.cc-side-item-head {
    display: flex;
    /* 标题可能折成两行，图标相对整块标题垂直居中 */
    align-items: center;
    gap: 8px;
}

.cc-side-item-head .cc-side-item-title {
    flex: 1;
    min-width: 0;
}

.cc-side-avatar {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    text-transform: uppercase;
}

.cc-side-avatar.is-odd {
    color: #fff;
    background: #1A1A1A;
}

.cc-side-avatar.is-even {
    color: #1A1A1A;
    background: #EDEDED;
}

.cc-side-item-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition);
}

.cc-side-item-desc {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--color-text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================================================
 * 右栏文章列表：全站统一定义
 *
 * 曾经每个皮肤(product/blog/music/Tools/Tutorials)各抄一份, 高度还分成 44 / 56px;
 * 现在只在这里定义一次, 皮肤css 不再覆盖, 改样式直接改这段。
 * 文字色与左栏标签云(.cc-tag)一致, 分隔线用同一套 --color-border。
 * ========================================================= */
.cc-side-right .cc-side-list {
    gap: 0;
}

.cc-side-right .cc-side-item {
    display: flex;
    align-items: center;
    height: 44px;
    min-width: 0;
    padding: 0;
    border-bottom: 1px solid var(--color-border);
}

.cc-side-right .cc-side-item:last-child {
    border-bottom: 0;
}

/* 单行 + 行尾省略: 配合固定 44px 高度, 左栏/右栏任意长度标题都不会撑高列表 */
.cc-side-right .cc-side-item-title {
    display: block;
    width: 100%;
    min-width: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 特异性(0,4,0) 高于全局 `.cc-side-item:hover .cc-side-item-title`(0,3,0), 悬停才压得深 */
.cc-side-right .cc-side-item:hover .cc-side-item-title {
    color: var(--color-text);
}

/* 侧栏：二级分类列表（色块列表：默认浅底，悬停加深） */
.cc-cat-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cc-cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    font-size: 14px;
    color: var(--color-text-secondary);
    background: var(--btn-secondary-bg);
    border-radius: var(--btn-radius);
    transition: background var(--transition), color var(--transition);
}
.cc-cat-item:hover {
    color: var(--color-text);
    background: #E9E9E9;
}

/* 当前分类: 加深底色 + 左侧竖条 + 加粗, 与 hover 区分开 */
.cc-cat-item.is-active {
    color: var(--color-text);
    font-weight: 600;
    background: #E9E9E9;
    /* 扁平化后不用 inset 阴影，改成左侧实心竖条 */
    border-left: 3px solid var(--color-text);
    padding-left: 9px;
}
.cc-cat-item.is-active .cc-cat-slug { color: #6f6f6f; }
.cc-cat-item.is-active .cc-cat-count { color: var(--color-text); }

/* 名称 + 缩略名 靠左成一列, 计数靠右 */
.cc-cat-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}

.cc-cat-name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.cc-cat-slug {
    flex: 0 0 auto;
    font-size: 11px;
    color: #b0b0b0;
    letter-spacing: 0.02em;
}

.cc-cat-item:hover .cc-cat-slug {
    color: #8a8a8a;
}

.cc-cat-count {
    flex: 0 0 auto;
    min-width: 20px;
    font-size: 12px;
    color: #999;
    text-align: right;
}

/* 侧栏：标签云 */
.cc-tag-cloud {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.cc-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: 100%;
    min-width: 0;
    padding: 5px 11px;
    font-size: 13px;
    line-height: 1.3;
    color: var(--color-text-secondary);
    background: var(--btn-secondary-bg);
    border-radius: var(--btn-radius);
    transition: color var(--transition), background var(--transition);
}
.cc-tag:hover {
    color: var(--color-text);
    background: #E9E9E9;
}

.cc-tag em {
    font-style: normal;
    font-size: 11px;
    color: #999;
}

/* 卡片主体（供皮肤改成「左图右文」时使用） */
.card-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

/* 宽度自适应：侧栏固定 300px，放不下时优先隐藏 */
@media (max-width: 1360px) {
    .cc-side-left  { padding-right: 24px; }
    .cc-side-right { padding-left: 24px; }
}

/* 平板：先隐藏右栏 */
@media (max-width: 1200px) {
    .cc-layout > .cc-side-right { display: none; }
}

/* 小屏：两侧栏都隐藏，内容占满 */
@media (max-width: 992px) {
    .cc-layout > .cc-side { display: none; }
    .cc-layout { padding: 0 20px; }
    .cc-crumb { padding-left: 20px; padding-right: 20px; }
}

@media (max-width: 768px) {
    .cc-layout { padding: 0 15px; }
    .cc-layout > .main { padding: 24px 0 40px; }
    .cc-crumb { padding-left: 15px; padding-right: 15px; font-size: 12px; }
}

/* =========================================================
 * 14. 注册页 / 个人中心
 * ========================================================= */
/* ---- 注册 ---- */
.auth-wrap { max-width: 460px; margin: 0 auto; }

.auth-card {
    padding: 32px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.auth-title {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.4px;
}

.auth-desc {
    margin: 0 0 24px;
    font-size: 14px;
    color: var(--color-text-secondary);
}

.auth-error {
    margin-bottom: 12px;
    padding: 10px 12px;
    font-size: 13px;
    color: #1A1A1A;
    background: #F2F2F2;
    border: 1px solid #D0D0D0;
    border-left: 3px solid #1A1A1A;
    border-radius: var(--radius);
}

.auth-form .field { display: block; margin-bottom: 16px; }

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    outline: none;
    transition: border-color var(--transition);
}

.auth-form input:focus { border-color: var(--color-text); }

.auth-foot {
    margin: 18px 0 0;
    font-size: 13px;
    color: var(--color-text-secondary);
    text-align: center;
}
.auth-foot a { color: var(--color-text); font-weight: 500; }
.auth-foot a:hover { text-decoration: underline; }

/* 注册页头像选择 */
.avatar-picker {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.avatar-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    overflow: hidden;
    font-size: 26px;
    font-weight: 600;
    color: #fff;
    background: var(--grad-primary);
    border-radius: 50%;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-picker-side { min-width: 0; }

.avatar-picker-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.avatar-picker-actions .btn {
    padding: 6px 14px;
    font-size: 13px;
}

.avatar-picker-hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

/* ---- 个人中心 ---- */
.profile-wrap { max-width: 760px; margin: 0 auto; }

.profile-title {
    margin: 0 0 28px;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 28px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.profile-avatar {
    flex: 0 0 88px;
    width: 88px;
    height: 88px;
    object-fit: cover;
    border: 1px solid var(--color-border);
    border-radius: 50%;
}

.profile-card-main { min-width: 0; }

.profile-name {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 600;
}

.profile-meta {
    margin: 0;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.profile-actions .btn { padding: 8px 16px; font-size: 14px; }

.profile-tip {
    margin: 10px 0 0;
    font-size: 13px;
    color: var(--color-text-secondary);
}
.profile-tip.is-error { color: #1A1A1A; }

.profile-section {
    margin-top: 24px;
    padding: 28px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.profile-h2 {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 600;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
}

.profile-placeholder {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 18px;
    font-size: 14px;
    color: var(--color-text-secondary);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius);
}
.profile-placeholder span { font-size: 12px; opacity: 0.7; }

@media (max-width: 600px) {
    .auth-card { padding: 24px; }
    .profile-card { flex-direction: column; align-items: flex-start; }
    .profile-section { padding: 20px; }
}

/* =========================================================
 * 15. Toast 轻提示 / 登录错误
 * ========================================================= */
.toast-stack {
    position: fixed;
    top: calc(var(--header-h) + 12px);
    left: 50%;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: max-content;
    max-width: calc(100% - 32px);
    transform: translateX(-50%);
    pointer-events: none;
}

.toast {
    padding: 10px 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #fff;
    background: rgba(17, 17, 17, .9);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: auto;
    cursor: pointer;
    word-break: break-word;
}

.toast.is-in { opacity: 1; transform: translateY(0); }
.toast-success { background: rgba(26, 26, 26, .9); }
.toast-error { background: rgba(0, 0, 0, .9); }

/* 登录弹窗内的错误提示 */
.login-form .ua-login-error {
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.6;
    color: #1A1A1A;
}

/* =========================================================
 * 20. 扁平化总纲：全站直角、无投影、黑灰双色
 * ========================================================= */
/* 放在文件最末尾统一收口：皮肤 css、插件 css、第三方播放器都不再出现圆角与阴影 */
*,
*::before,
*::after {
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* 扁平化后按钮不靠阴影区分层级，改由 1px 实边 + 渐变做质感 */
.btn,
.btn-primary,
.btn-secondary,
.btn-login {
    border-width: 1px;
    border-style: solid;
}

/* =========================================================
 * 21. 按钮渐变：主按钮深灰→纯黑，次级按钮白→浅灰
 * ========================================================= */
.btn-primary,
.btn-login,
.nav-link.is-active {
    background-image: var(--grad-primary);
}

.btn-primary:hover,
.btn-login:hover,
.nav-link.is-active:hover {
    background-image: var(--grad-primary-hover);
}

.btn-secondary {
    background-image: var(--grad-secondary);
    border-color: #D8D8D8;
}

.btn-secondary:hover {
    background-image: var(--grad-secondary-hover);
    border-color: #C4C4C4;
}

/* =========================================================
 * 22. 代码块：只统一深色底与直角边框，token 彩色高亮交给 CodeHighlighter
 * ========================================================= */
.post-content pre[class*="language-"],
.post-content pre {
    background: #1A1A1A !important;
    border: 1px solid #2E2E2E;
    border-left: 2px solid #000000;
}

/* 正文代码的底色与边框由主题统一，具体 token 配色交给 CodeHighlighter 的 Prism 主题，
   这里只兜底一个基础字色（不带 !important，插件主题可覆盖），否则插件停用时黑底上看不清字 */
.post-content pre code,
.post-content pre[class*="language-"] code {
    color: #EDEDED;
    text-shadow: none;
}

/* =========================================================
 * 23. 圆角例外：头像与分页保留圆形
 * ========================================================= */
/* 用户头像、评论头像、侧栏首字母图标与注册页头像预览 */
.user-avatar,
.profile-avatar,
.avatar-preview,
.comment-avatar,
.cc-side-avatar,
/* 分页圆钮 */
.page-navigator a,
.page-navigator span {
    border-radius: 50% !important;
}

/* =========================================================
 * 24. 链接悬停统一色
 * 浅色底上的标题 / 列表 / 标签 / 正文链接，悬停统一用 --link-hover；
 * 黑色半透明的导航与用户下拉保持白字，不在此列。
 * ========================================================= */
.card-title:hover,
.cc-side-item:hover .cc-side-item-title,
.cc-cat-item:hover,
.cc-cat-item:hover .cc-cat-name,
.cc-tag:hover,
.post-meta a:hover,
.post-content a:hover,
.cc-crumb a:hover {
    color: var(--link-hover);
}

/* =========================================================
 * 25. 全局加载进度条（顶部 3px 黑条）
 *
 * 节点由 assets/app.js 动态创建，JS 未执行时页面上不会有残留。
 * 只写 right:100% + width:100%（不写 left），元素整体被推到视口左边界之外，
 * 再靠 translate3d 从 0% 推到 100% 完成「黑线从左扫到右」。
 * 同时写 left 会形成过约束，right 被忽略，黑条开局就铺满可见。
 * ========================================================= */
.cc-pace {
    position: fixed;
    top: 0;
    right: 100%;
    z-index: 400;               /* 高于 header(100) 与 toast(300) */
    width: 100%;
    height: 3px;
    background: #000000;
    opacity: 1;
    pointer-events: none;
    transform: translate3d(0, 0, 0);
    transition: transform 0.6s linear, opacity 0.3s linear;
}

/* 走完 100% 后淡出，随后由 JS 移除节点 */
.cc-pace.is-done {
    opacity: 0;
}

/* 系统开启「减少动效」时不滑行，直接跳到目标位置 */
@media (prefers-reduced-motion: reduce) {
    .cc-pace {
        transition: opacity 0.2s linear;
    }
}

/* =========================================================
 * 26. 侧栏分类列表：三级分类（music 左栏）
 *
 * 视觉与左栏「标签云」完全一致：模板里直接复用 .cc-tag-cloud + .cc-tag，
 * 一行两个胶囊（名字 + 篇数），所以这里只需要补上间距与当前项高亮。
 * 不再做「缩进 + 左侧细线」的树形样式：三级分类项少，胶囊更紧凑。
 * ========================================================= */
.cc-cat-sub {
    margin: 6px 0 2px;
}

/* 正在浏览的三级分类所属的二级项：只加深文字，不加底色，避免和 is-active 抢视线 */
.cc-cat-item.is-parent {
    color: var(--color-text);
}

/* 当前正在浏览的三级分类：与二级 is-active 同一套「加深底 + 加粗」 */
.cc-cat-sub .cc-tag.is-active {
    color: var(--color-text);
    font-weight: 600;
    background: #E9E9E9;
}
