/* 基础样式 */
@font-face {
    font-family: "LXGW WenKai";
    src: url('woff/lxgw-wenkai-gb-regular-v0.965.1-full.woff2') format('woff2'); /* 这里替换为你的字体路径 */
    font-display: swap;
}
:root {
    /* 颜色变量 */
    --primary-color: {{ .Site.Params.primaryColor | default "#333" }};
    --secondary-color: {{ .Site.Params.secondaryColor | default "#666" }};
    --background-color: {{ .Site.Params.backgroundColor | default "#ffffff" }};
    --link-color: {{ .Site.Params.linkColor | default "#0066cc" }};
    --border-color: #eee;
    --text-color: #333;
    --content-bg: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --bg-secondary: #f5f5f5;
    --secondary-bg: #f8f9fa;

    /* 面包屑导航颜色 */
    --breadcrumb-bg-color: #0c81ef;
    --breadcrumb-text-color: #ffffff;
    --breadcrumb-hover-color: #005f99;
    --breadcrumb-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);

    /* 字体变量 */
    --font-family-base: "LXGW WenKai", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-family-mono: "JetBrains Mono", "Fira Code", Menlo, Monaco, Consolas, "Courier New", monospace;
    --font-size-base: 16px;
    --font-size-sm: 14px;
    --font-size-lg: 18px;
    --line-height-base: 1.75;
    --line-height-heading: 1.5;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--primary-color);
    background: var(--background-color);
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 布局 */
header, footer {
    max-width: 90%;
    margin: 0 auto;
    padding: 1rem;
}
main {
    max-width: 90%;
    margin: 0 auto;
    padding: 1rem;
}

.content-list {
    padding: 0 5rem;
}

.site-nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#Logo {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    color: var(--primary-color);
}

.tools {
    display: flex;
    align-items: center;
    gap: 15px;
}

.tools a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;  /* 增大导航栏字体 */
    padding: 4px 12px;  /* 增加水平内边距 */
    border-radius: 4px;
    font-weight: 500;  /* 稍微加粗 */
}

.tools a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.v2p-hover-btn {
    transition: all 0.2s ease;
}

#search-container {
    position: relative;
    margin: 0 20px;
}

#search {
    width: 250px;
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    background-color: var(--content-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

#search:focus {
    border-color: var(--link-color);
}

#search-result {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--content-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-top: 5px;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.main-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.site-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    background-color: var(--content-bg);
    box-shadow: 0 2px 8px var(--shadow-color);
    border-radius: 8px;
    padding: 1rem 2rem;
    margin-bottom: 2rem;
}

.site-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
    padding: 1rem 0;
}

.site-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.site-title a:hover {
    color: var(--link-color);
}

.menu-item {
    margin-left: 1rem;
    color: #2C3E50; /* 使用更深的蓝灰色，替代原来的 var(--secondary-color) */
    text-decoration: none; /* 移除默认下划线 */
    font-weight: 700; /* 字体加粗 */
    font-size: 1.1rem; /* 稍微增大字体 */
    transition: color 0.3s, transform 0.3s; /* 添加动态效果 */
}

.menu-item:hover {
    color: #3498DB; /* 鼠标悬浮时高亮显示浅蓝色 */
    transform: scale(1.05); /* 鼠标悬浮时稍微放大 */
    text-decoration: underline; /* 悬浮时加下划线 */
}


/* 文章列表 */
.post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-item {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.5rem;
    align-items: center;
    margin-bottom: 0.2rem;
    padding-bottom: 0.2rem;
    font-size: 1.2rem;
    white-space: nowrap;
}

.post-item time {
    color: var(--secondary-color);
    margin-right: 1.5rem;
    font-size: 1.2rem;
    min-width: 4rem;
}

.post-title-link {
    color: var(--text-color);
    text-decoration: none;
    flex: 1;
    margin-right: 1.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-pin {
    display: inline-block;
    margin-right: 0.4rem;
    padding: 0.05rem 0.35rem;
    color: var(--link-color);
    border: 1px solid rgba(0, 102, 204, 0.2);
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 600;
}

.post-title-link:hover {
    color: var(--primary-color);
}

.post-description {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-left: 1rem;
}

.post-tag {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

.post-tag:hover {
    color: var(--primary-color);
}

.post-preview {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.post-preview h2 {
    margin: 0;
}

.post-preview time {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* 面包屑导航 */
.breadcrumb {
 background-color: var(--breadcrumb-bg-color);
    border-radius: 8px;
    margin-bottom: 2rem;
    padding: 0.75rem 1.5rem; /* 增加上下左右内边距 */
    box-shadow: var(--breadcrumb-shadow);
    font-size: 1rem;
    color: var(--breadcrumb-text-color);
    display: flex; /* 可以用于灵活排列内部元素 */
    align-items: center; /* 内容居中对齐 */
    gap: 0.5rem; /* 元素间距 */
    transition: background-color 0.3s ease, box-shadow 0.3s ease; /* 平滑的交互效果 */
}


.breadcrumb-item {
    text-decoration: none;
    color: var(--secondary-color);
}

.breadcrumb-item:hover {
    color: var(--primary-color);
}

.breadcrumb-arrow {
    margin: 0 0.5rem;
    color: var(--border-color);
}

.breadcrumb-item.active {
    color: var(--primary-color);
    font-weight: bold;
}

.emoji {
    margin-right: 0.2rem;
    vertical-align: -0.1em;
}

/* 文章标题和元信息 */
.post-header {
    background-color: var(--content-bg);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.post-title {
	font-weight: 400;
	font-size: 1.8rem;
    line-height: 1.5;
    color: var(--primary-color);
	margin: 0 0 10px;
	--shadow-color: rgba(0,0,0,0.12);
	--shadow: 0 8px 20px var(--shadow-color);
    /* 移除下划线 */
}

.post-title a {
	text-decoration: none;
    color: inherit;
}

a {
    color: inherit;
}

.meta-divider {
    margin: 0 0.5rem;
    color: var(--border-color);
}

/* 文章顶部标签 */
.post-tags-header {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.post-tags-header .tag-item {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.8rem;
    background-color: var(--secondary-bg);
    border-radius: 4px;
    color: var(--breadcrumb-bg-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.post-tags-header .tag-item:hover {
    background-color: var(--breadcrumb-bg-color);
    color: white;
    text-decoration: none;
}

/* 文章目录 */
.post-toc {
    flex: 1;
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--content-bg);
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}


/* 响应式设计 */  
@media (max-width: 1200px) {
    .post-container {
        flex-direction: column;
    }
    
    .post-toc {
        display: none;
    }
    
    .post-content {
        width: 100%;
    }
}

/* 目录滚动条样式 */
.post-toc::-webkit-scrollbar {
    width: 6px;
}

.post-toc::-webkit-scrollbar-track {
    background: var(--content-bg); 
}

.post-toc::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 3px;
}

.post-toc::-webkit-scrollbar-thumb:hover {
    background-color: var(--secondary-color); 
}

.post-toc:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.post-toc::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
}

/* 目录标题 */
.toc-title {
    font-size: 1rem; 
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--text-color);
    padding-left: 0.5rem;
    padding-bottom: 0.5rem; 
    position: relative;
    z-index: 1;
}

/* 目录内容整体 */
.toc-content nav {
    margin-left: 0;
}

/* 目录列表样式 */
.toc-content ul {
    list-style: none; /* 移除默认的列表样式 */
    padding-left: 1.5rem; /* 增加列表缩进 */
    margin: 0;
    position: relative;
    z-index: 1;
}

.toc-content li {
    margin: 0.5rem 0;
    line-height: 1.2;
    position: relative;
    padding-left: 1.2rem;
}

.toc-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--text-color);
    font-weight: bold;
}

/* 链接样式 */
.toc-content a {
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
    position: relative;
    display: inline-block;
    color: var(--text-color);
}

/* 目录层级缩进 */
.toc-content nav > ul {
    padding-left: 0;
}

.toc-content ul ul {
    margin-top: 0.4rem; /* 增加上下层级之间的间距 */
    padding-left: 1.2rem; /* 缩进子级内容 */
    border-left: 2px solid #dee2e6; /* 添加实线左边框以区分层级 */
    font-size: 1.1rem; /* 提升链接字体大小 */
}

/* 子项内容 */
.toc-content ul ul li {
    margin: 0.3rem 0;
    font-size: 0.85rem;
}

.toc-content ul ul li::before {
    content: '-';
    color: var(--text-color);
}

/* 子级链接样式 */
.toc-content ul ul a {
    color: var(--text-color);
    font-size: 0.85rem;
}

/* 悬停和活动状态样式 */
.toc-content a:hover,
.toc-content a.active {
    color: var(--link-color); /* 悬停和活动状态颜色 */
    font-weight: bold; /* 悬停和活动状态加粗 */
}

/* 目录交互效果 */
.toc-content a::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--link-color);
    visibility: hidden;
    transform: scaleX(0);
    transition: all 0.3s ease-in-out;
}

.toc-content a:hover::before {
    visibility: visible;
    transform: scaleX(1);
}

.toc-content a:hover {
    transform: translateX(5px);
}

.toc-content li:hover::before {
    transform: rotate(90deg);
}

/* 文章内容 */
.post-content {
    flex: 3;
    width: 100%; /* 确保填满容器 */
    background-color: var(--content-bg);
    padding: 2.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.post-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0c81ef, #3498db, #5dade2);
    border-radius: 12px 12px 0 0;
}

.post-content p {
    margin: 1.2em 0;  /* 增加段落间距 */
    font-size: 1.15rem;  /* 稍微调整字体大小 */
    line-height: 1.8;  /* 增加行高，提升可读性 */
    color: #2c3e50;  /* 深灰色文字 */
    text-align: left;  /* 左对齐，避免字符间距过大 */
    word-break: break-word;  /* 长单词换行 */
    letter-spacing: normal;  /* 正常字符间距 */
}

/* 加粗文本样式 - 黄色荧光笔效果 */
.post-content strong {
    font-weight: 600;
    color: #1a1a1a;  /* 更深的黑色 */
    background: linear-gradient(120deg, #ffeb3b 0%, #fff59d 100%);  /* 黄色荧光笔渐变 */
    padding: 0.1em 0.2em;  /* 适当的内边距 */
    border-radius: 2px;  /* 小圆角 */
    display: inline;
    margin: 0 0.05em;  /* 小间距 */
    white-space: normal;  /* 允许换行 */
    word-wrap: break-word;  /* 长单词换行 */
    box-shadow: 0 1px 2px rgba(255, 235, 59, 0.3);  /* 轻微阴影 */
}

/* 标题中的加粗文本 - 不使用黄色荧光笔效果 */
.post-content h1 strong,
.post-content h2 strong,
.post-content h3 strong,
.post-content h4 strong,
.post-content h5 strong,
.post-content h6 strong {
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    color: inherit !important;
    border-left: none !important;
}

/* 表格中的加粗文本 - 不使用黄色荧光笔效果 */
.post-content table strong {
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    color: inherit !important;
    border-left: none !important;
}

/* 引用块中的加粗文本 - 不使用黄色荧光笔效果 */
.post-content blockquote strong {
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    color: inherit !important;
    box-shadow: none !important;
}

/* 包含行内代码的加粗文本 - 移除黄色荧光笔效果 */
.post-content strong:has(code) {
    background: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
}

/* 加粗中的行内代码 - 保持代码样式 */
.post-content strong code {
    background: #e6e8eb !important;
    box-shadow: none !important;
    color: #24292e !important;
}

.post-content h1 {
    font-size: 2.4rem;  /* 增大标题字体 */
    margin: 2.5em 0 1.5em;
    font-weight: 700;
    color: #1a252f;
    position: relative;
    padding-left: 1rem;
    border-left: 4px solid #0c81ef;
    padding: 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
    background: none !important;  /* 强制移除背景 */
}
 
 .post-content > h1.post-title {
    margin-top: 2rem;
    padding-top: 0;
}
 
 .post-content h2 {
    font-size: 2rem;
    margin: 2em 0 1em;
    font-weight: 600;
    color: #2c3e50;
    position: relative;
    padding: 0.8rem 0;
    border-bottom: 2px solid #e8f4fd;
    padding-left: 1rem;
    border-radius: 0 6px 6px 0;
    background: none !important;  /* 强制移除背景 */
}

.post-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60%;
    height: 2px;
    background: linear-gradient(to right, var(--breadcrumb-bg-color) 30%, transparent);
    opacity: 0.8;
}

.post-content h3 {
    font-size: 1.7rem;
    margin: 1.8em 0 1em;
    font-weight: 600;
    position: relative;
    padding: 0.6rem 0;
    border-left: 3px solid #bdc3c7;
    padding-left: 1rem;
    border-radius: 0 4px 6px 0;
    background: none !important;  /* 强制移除背景 */
}

.post-content h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40%;
    height: 1px;
    background: linear-gradient(to right, #95a5a6 20%, transparent);
    opacity: 0.6;
}

.post-content h4 {
    font-size: 1.4rem;
}

.post-content h5 {
    font-size: 1.3rem;
}

.post-content h6 {
    font-size: 1.2rem;
}

.post-content ul,
.post-content ol {
    margin: 1em 0;
    padding-left: 1.2em;  /* 减小左侧缩进 */
    line-height: 1.6;
    font-size: 1rem;
}

.post-content ul {
    list-style: none;
}

.post-content ul li {
    position: relative;
    padding-left: 1em;  /* 减小项目符号和文本的间距 */
    margin: 0.3em 0;  /* 减小项目间距 */
}

.post-content ul li::before {
    content: "▶";
    color: var(--breadcrumb-bg-color);
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 0.8em;
    transform: scale(0.8);
    opacity: 0.8;
}

/* 有序列表：只对直接子项进行计数与编号 */
.post-content ol {
    list-style: none;
    counter-reset: item;
}

/* 原来匹配所有后代 li，会把嵌套 ul li 也纳入计数 */
.post-content ol > li {
    position: relative;
    padding-left: 1.8em;  /* 减少左边距，让序号和文字更近 */
    margin: 0.8em 0;      /* 增加项目间距 */
    counter-increment: item;
    line-height: 1.6;      /* 确保行高一致 */
}

/* 原来匹配所有后代 li 生成数字 */
.post-content ol > li::before {
    content: counter(item);
    color: white;
    background: var(--breadcrumb-bg-color);
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0.1em;           /* 微调垂直位置 */
    font-size: 0.75em;
    width: 1.5em;
    height: 1.5em;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 内层 ul li 恢复为 • 号（若仍有需要保留） */
.post-content ol > li > ul li::before {
    content: "•";
    color: var(--breadcrumb-bg-color);
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1.1em;
}

.post-content blockquote {
    font-size: 1.05rem;
    line-height: 1.7;
    border-left: 4px solid var(--breadcrumb-bg-color);
    margin: 1.5rem 0;
    padding: 1.2em 1.5em;
    color: #34495e;
    background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%);
    border-radius: 0 10px 10px 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(12, 129, 239, 0.1);
    font-style: normal;
}

.post-content blockquote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 3rem;
    color: var(--breadcrumb-bg-color);
    opacity: 0.3;
    font-family: serif;
}

.post-content blockquote p {
    margin: 0.5em 0;
    font-size: 1rem;
}

/* 普通代码块样式 */
.highlight {
    position: relative;
    background-color: #161616;  /* 调深背景色 */
    color: #d4d4d4;
    border-radius: 4px;
    border: none;
}

/* Mac 终端样式代码块 */
.post-content pre {
    position: relative;
    background-color: #1e1e1e!important;  /* 调深背景色 */
    color: #f8f8f2;
    padding: 30px 15px 15px;
    border-radius: 6px;
    margin: 1.5rem 0;
    font-family: var(--font-family-mono);
    font-size: var(--font-size-sm);
    line-height: 1.5;
    overflow-x: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 行内代码样式 */
code {
    font-family: var(--font-family-mono, 'Fira Code', monospace);
    padding: 0.3em 0.5em;
    border-radius: 3px;
    font-size: 0.9em;
    line-height: 1.6;
    margin: 0 0.2em;
    background: #e6e8eb;  /* 调深背景色 */
    color: #24292e;
    border: 1px solid #e1e4e8;
}

/* 代码块样式 */
.post-content pre {
    position: relative;
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 30px 15px 15px;
    border-radius: 6px;
    margin: 1.5rem 0;
    font-family: var(--font-family-mono);
    font-size: var(--font-size-sm);
    line-height: 1.5;
    overflow-x: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 模拟 Mac 终端顶部栏 */
.post-content pre::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    width: 12px;
    height: 12px;
    background-color: #ff5f56;
    border-radius: 50%;
    box-shadow: 20px 0 #ffbd2e, 40px 0 #27c93f;
}

/* 代码块中的代码样式 */
.post-content pre code {
    display: block;
    padding: 0;
    overflow-x: auto;
    border: none;
    box-shadow: none;
    margin: 0;
    background: transparent;
    color: inherit;
}

.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2em auto;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e8ed;
}

.post-content table th,
.post-content table td {
    padding: 1em 1.2em;
    border: 1px solid #e1e8ed;
    text-align: left;
}

.post-content table th {
    background: linear-gradient(135deg, #f8fbff 0%, #e8f4fd 100%);
    color: #2c3e50;
    font-weight: 600;
    border-bottom: 2px solid #0c81ef;
}

.post-content table td {
    background: #ffffff;
    color: #34495e;
}

.post-content table tr:hover td {
    background: #f8fbff;
}

/* 标题样式优化 */
.post-content h1,
.post-content h2,
.post-content h3 {
    position: relative;
}

.post-content h1::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 1px;
    width: 100%;
    background: linear-gradient(to right, var(--breadcrumb-bg-color) 20%, transparent);

}


.post-content h4,
.post-content h5,
.post-content h6 {
    margin: 2rem 0 1rem;
    font-weight: bold;
    line-height: 1.4;
    color: var(--primary-color);
}

.post-content h1:not(.post-title):not(.about-title)::before,
.post-content h2:not(.post-title):not(.about-title):not(.year-title)::before,
.post-content h3:not(.post-title):not(.about-title):not(.month-title)::before,
.post-content h4:not(.post-title):not(.about-title)::before {
    color: var(--breadcrumb-bg-color);
    margin-right: 0.5rem;
    font-weight: normal;
}

.post-content h1:not(.post-title):not(.about-title)::before {
    content: "#";
}

.post-content h2:not(.post-title):not(.about-title):not(.year-title)::before {
    content: "##";
}

.post-content h3:not(.post-title):not(.about-title):not(.month-title)::before {
    content: "###";
}

.post-content h4:not(.post-title):not(.about-title)::before {
    content: "####";
}

/* 代码样式 */
pre {
    background: #f6f8fa;  /* GitHub 风格的浅灰背景 */
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-family: var(--font-family-mono);
    font-size: var(--font-size-sm);
    line-height: 1.5;
    position: relative;
    color: #24292e;  /* GitHub 风格的深色文本 */
    border: 1px solid #e1e4e8;  /* 添加浅色边框 */
}

code {
    font-family: var(--font-family-mono, 'Fira Code', monospace);
    padding: 0.3em 0.5em;
    border-radius: 3px;
    font-size: 0.9em;
    line-height: 1.6;
    margin: 0 0.2em;
    background: #f6f8fa;
    color: #24292e;
}

pre code {
    display: block;
    padding: 1em;
    overflow-x: auto;
    border: none;
    box-shadow: none;
    margin: 1em 0;
    color: #24292e;
}

.copy-button-container {
    position: absolute;
	top: 0.5rem;
    right: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s;
}

pre:hover .copy-button-container {
    opacity: 1;
}

.copy-button {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.copy-button:hover {
    background: var(--border-color);
    color: var(--primary-color);
}

.copy-button.copied {
    background: var(--breadcrumb-bg-color);
    border-color: var(--breadcrumb-bg-color);
    color: white;
}

.copy-button svg {
    width: 16px;
    height: 16px;
}

/* RSS 图标样式 */
.feather-rss {
    vertical-align: middle;
    margin-top: -2px;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    gap: 1rem;
}

.pagination .prev,
.pagination .next {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination .prev:hover,
.pagination .next:hover {
    background: var(--border-color);
    color: var(--primary-color);
}

.pagination .page-numbers {
    display: flex;
    gap: 0.5rem;
}

.pagination .page-numbers a,
.pagination .page-numbers .current {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination .page-numbers a:hover {
    background: var(--border-color);
    color: var(--primary-color);
}

.pagination .page-numbers .current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 评论区样式 */
#tcomment {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* 不蒜子统计样式 */
.busuanzi-footer {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.busuanzi-footer .separator {
    margin: 0 0.5rem;
    color: var(--border-color);
}

#busuanzi_container_value_page_pv,
#busuanzi_container_value_site_pv,
#busuanzi_container_value_site_uv {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

#busuanzi_value_page_pv,
#busuanzi_value_site_pv,
#busuanzi_value_site_uv {
    font-weight: bold;
    color: var(--primary-color);
}

/* 页脚 */
.footer-content {
    text-align: center;
    color: var(--secondary-color);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

/* 响应式设计 */
@media (max-width: 600px) {
    header, main, footer {
        padding: 1rem;
    }
    
    .site-nav {
        flex-direction: column;
        text-align: center;
    }
    
    .menu {
        margin-top: 1rem;
    }
    
    .menu-item {
        display: block;
        margin: 0.5rem 0;
    }
}

/* 标签云样式 */
.tags-cloud {
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-cloud-item {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    background-color: var(--bg-secondary);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.tag-cloud-item:hover {
    color: var(--primary-color);
    background-color: var(--border-color);
}

.tag-cloud-item sup {
    margin-left: 0.2rem;
    color: var(--secondary-color);
    font-size: 0.8em;
}



.post-tag {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

.post-tag:hover {
    color: var(--primary-color);
}



/* 代码行号 */
.highlight .lnt {
    color: #6c6c6c;
    padding-right: 0.5em;
}

.highlight-copy-btn {
    position: absolute;
    top: 5px;
    right: 8px;
    color: #abb2bf;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 3px;
    padding: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.highlight-copy-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* 文章列表按年份分组样式 */
.posts-by-year {
    margin-top: 2rem;
}

.year-group {
    margin-bottom: 2rem;
}

.year-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.year-title .post-count {
    font-size: 1rem;
    color: var(--secondary-color);
    margin-left: 0.5rem;
}

.month-group {
    margin-bottom: 1rem;
}

.month-title {
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--text-color);
    margin: 0.5rem 0;
}

.post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}



.post-item time {
    color: var(--secondary-color);
    font-size: 1.2rem;
    min-width: 100px;
    margin-right: 1rem;
}

.post-item a {
    color: var(--primary-color);
    text-decoration: none;
    flex: 1;
}

.post-item a:hover {
    color: var(--link-color);
}

.post-description {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-left: 1rem;
}

.post-meta {
    color: #888;  /* 更亮的灰色 */
    font-size: 0.9rem;
    margin: 1rem 0;
}

.post-meta span {
    color: #888;  /* 确保数字也是更亮的灰色 */
}

.post-meta {
    font-size: 14px; /* Adjust font size */
    color: #333; /* Text color */
    padding: 10px; /* Add padding */
    border-radius: 5px; /* Rounded corners */
    display: flex; /* Flexbox for layout */
    align-items: center; /* Center items vertically */
}

.post-meta .post-date,
.post-meta .meta-divider,
.post-meta .post-reading {
    margin-right: 10px; /* Space between elements */
    font-size: 1.1rem;
	margin-bottom: 10px
}

.post-meta .meta-divider {
    color: #999; /* Divider color */
}



/* 设置友链容器样式 */
/* 单个友链容器：图片和文字一行排列 */
/* 设置友链容器样式 */
.friend-div {
    display: flex;
    align-items: center; /* 垂直居中图片和文字 */
    padding: 8px 12px; /* 缩小容器内边距 */
    background: var(--background-color, #fff); /* 背景色 */
    border-radius: 6px; /* 圆角 */
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); /* 轻柔阴影 */
    cursor: pointer;
}

.friend-div:hover {
    transform: translateY(-2px); /* 鼠标悬停轻微浮动效果 */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* 增强悬停阴影 */
}

/* 友链图片样式 */
.friend-div img {
    width: 50px; /* 更小的头像 */
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 20px; /* 缩小图片和文字间距 */
    border: 2px solid var(--border-color, #ddd); /* 边框 */
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.friend-div:hover img {
    transform: scale(1.05); /* 鼠标悬停时轻微放大图片 */
    border-color: var(--primary-color, #00bcd4); /* 改变边框颜色 */
}

/* 内容容器 */
.friend-content {
    display: flex;
    flex-direction: column; /* 调整文字为竖向布局 */
    flex: 1;
    min-width: 0;
}

/* 将名字和描述放在一行 */
.friend-name-info {
    display: flex;
    align-items: center; /* 垂直居中 */
    gap: 8px; /* 名字和描述之间的间距 */
    white-space: nowrap; /* 禁止换行 */
    overflow: hidden;
    text-overflow: ellipsis; /* 超出部分省略 */
}

/* 友链名称样式 */
.friend-name {
    font-size: 1rem; /* 更小的字体 */
    font-weight: 600; /* 保持醒目 */
    color: var(--primary-color, #333); /* 主色 */
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-name:hover {
    color: var(--link-color, #007acc); /* 鼠标悬停颜色 */
}

/* 友链描述样式 */
.friend-info {
    font-size: 0.9rem;
    color: var(--secondary-color, #666); /* 次要颜色 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* 省略多余文字 */
    margin-left: 20px; /* 添加左侧的间距 */
}

/* 响应式适配 */
@media (max-width: 600px) {
    .friend-div {
        flex-direction: column; /* 小屏幕垂直排列 */
        align-items: flex-start;
    }

    .friend-div img {
        margin-right: 0;
        margin-bottom: 8px;
    }

    .friend-name-info {
        flex-direction: column; /* 垂直排列名字和描述 */
        align-items: flex-start;
        gap: 4px;
    }
}


/* 归档链接样式 */
.view-archives {
    margin-top: 2rem;
    text-align: center;
}

.archive-link {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.archive-link:hover {
    color: var(--primary-color);
    background-color: var(--border-color);
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}



/* 回到顶部按钮样式 */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  text-align: center;
  line-height: 50px;
  cursor: pointer;
  z-index: 100;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.back-to-top.show {
  display: block;
}

.back-to-top:hover {
  background-color: var(--link-color);
  transform: translateY(-3px);
  box-shadow: 0 4px 8px;
}

.back-to-top::before {
  content: '👆';
  font-size: 30px;
  color: #f0f0f0;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* 响应式设计 */  
@media (max-width: 768px) {
  /* 调整字号 */
  body {
    font-size: 14px;
  }
  
  /* 调整布局  */
  header, main, footer {
    padding: 10px;
  }

  .post-content {
    padding: 15px;
  }

  /* 移动端取消文章右侧 margin */
  .post {
    margin-right: 0;
  }

  /* 移动端目录样式调整 */
  .post-toc {
    margin: 1.5rem 0;
    padding: 1rem;
  }

  .toc-title {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
  }

  .toc-content ul {
    padding-left: 1rem;
  }

  .toc-content li {
    margin: 0.6rem 0;
  }

  .toc-content a {
    font-size: 1rem;
  }

  .toc-content ul ul {
    padding-left: 1rem;
    font-size: 1rem;
  }

  .toc-content ul ul li {
    margin: 0.3rem 0;
    font-size: 1rem;
  }

  .toc-content ul ul a {
    font-size: 0.9rem;
  }
}

/* 分类列表样式 */
.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-item {
  margin-bottom: 0.5rem;
}

.category-item a {
  color: var(--text-color);
  text-decoration: none;
}

.category-item a:hover {
  color: var(--primary-color);
}

.category-count {
  color: var(--secondary-color);
  font-size: 0.9em;
  margin-left: 0.5rem;
}


/* 自定义滚动条样式 */
code {
    overflow-x: auto;
  }
  
  code::-webkit-scrollbar {
    height: 8px; /* 滚动条的高度 */
  }
  
  code::-webkit-scrollbar-thumb {
    background: #888; /* 滚动条滑块颜色 */
    border-radius: 4px; /* 滑块圆角 */
  }
  
  code::-webkit-scrollbar-thumb:hover {
    background: #555; /* 滑块悬停时颜色 */
  }

  
/* 文章布局容器 */
.post-container {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 1.1fr);
    gap: 2rem;
    max-width: 95%;
    margin: 0 auto;
    padding: 1rem;
}

/* 留言板和关于我页面 - 占满宽度 */
.post-container:has(.post-content:only-child),
.post-container .post-content:only-child {
    grid-column: 1 / -1;
    max-width: 100%;
}

/* 文章内容 */
.post-content {
    min-width: 0;
    background-color: var(--content-bg);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

/* 文章目录 */
.post-toc {
    position: sticky;
    top: 20px;
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 2rem;
    background: var(--content-bg);
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-width: 320px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .post-container {
        grid-template-columns: 1fr;
    }
    
    .post-toc {
        display: none;
    }
}

/* 覆盖 Waline 点赞区域的 overflow 设置 */
.wl-reaction {
    overflow: visible !important;
    margin-bottom: 1.75em;
    text-align: center;
}

/* ============================================
   About 页面 Hero 区域样式
   ============================================ */

/* Hero 区域整体 */
.about-hero {
    position: relative;
    padding-top: 4rem;
    padding-bottom: 10rem;
    overflow: hidden;
}

/* 背景渐变 */
.about-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, #e0f2fe, #f0f9ff, #ffffff);
    z-index: 0;
}

/* 装饰性云朵效果 */
.about-cloud {
    position: absolute;
    border-radius: 9999px;
    z-index: 0;
}

.about-cloud-1 {
    top: 80px;
    left: -50px;
    width: 288px;
    height: 288px;
    background: #ffffff;
    filter: blur(48px);
    opacity: 0.6;
}

.about-cloud-2 {
    top: 160px;
    right: -100px;
    width: 384px;
    height: 384px;
    background: #bfdbfe;
    filter: blur(100px);
    opacity: 0.3;
}

/* Hero 内容容器 */
.about-hero-content {
    position: relative;
    z-index: 10;
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

/* 左侧介绍区域 */
.about-intro {
    order: 2;
}

@media (min-width: 1024px) {
    .about-intro {
        order: 1;
    }
}

/* 标题样式 */
.about-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

@media (min-width: 640px) {
    .about-title {
        font-size: 3rem;
    }
}

/* 标题高亮文字 */
.about-title-highlight {
    font-family: "LXGW WenKai", "KaiTi", serif;
    font-weight: bold;
    color: #2563eb; /* 纯净的蓝色 */
    position: relative;
    display: inline-block;
    padding: 0 0.2em;
    -webkit-text-fill-color: initial;
    background: none;
}

/* 手绘风格下划线装饰 */
.about-title-highlight::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0.1em;
    width: 100%;
    height: 0.3em;
    background-color: rgba(147, 197, 253, 0.5); /* 浅蓝色高亮笔触 */
    z-index: -1;
    border-radius: 1em;
    transform: rotate(-1deg);
}

/* 副标题 */
.about-subtitle {
    font-size: 1.125rem;
    color: #475569;
    margin-bottom: 2rem;
    max-width: 28rem;
    line-height: 1.75;
}

/* 右侧头像区域 */
.about-avatar-section {
    position: relative;
    order: 1;
    display: flex;
    justify-content: center;
    height: 350px;
    align-items: center;
}

@media (min-width: 640px) {
    .about-avatar-section {
        height: 450px;
    }
}

@media (min-width: 1024px) {
    .about-avatar-section {
        order: 2;
        justify-content: flex-end;
    }
}

/* Canvas 容器 */
.canvas-container {
    position: absolute;
    top: -50px;
    right: -20px;
    width: 450px;
    height: 380px;
    z-index: 0;
    pointer-events: auto;
    transform: rotate(-12deg);
    opacity: 0.9;
}

@media (min-width: 640px) {
    .canvas-container {
        width: 600px;
        height: 500px;
    }
}

.canvas-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* 头像包装器 */
.about-avatar-wrapper {
    position: relative;
    z-index: 20;
    pointer-events: none;
    animation: about-float 6s ease-in-out infinite;
}

/* 头像光晕 */
.about-avatar-glow {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.5);
    filter: blur(32px);
    border-radius: 9999px;
    transform: scale(0.9);
}

/* 头像图片 */
.about-avatar {
    width: 224px;
    height: 224px;
    object-fit: cover;
    border-radius: 9999px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 6px solid #ffffff;
    transition: all 0.5s ease;
    position: relative;
    z-index: 10;
}

@media (min-width: 640px) {
    .about-avatar {
        width: 288px;
        height: 288px;
    }
}

.about-avatar:hover {
    transform: scale(1.05) rotate(2deg);
}

/* 头像底部阴影 */
.about-avatar-shadow {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 32px;
    background: rgba(30, 27, 75, 0.1);
    border-radius: 100%;
    filter: blur(12px);
}

/* 波浪分隔线 */
.about-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    line-height: 0;
    z-index: 10;
    color: #ffffff;
    pointer-events: none;
}

.about-wave-svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

@media (min-width: 640px) {
    .about-wave-svg {
        height: 120px;
    }
}

/* 浮动动画 */
@keyframes about-float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 响应式设计 - About页面 */
@media (max-width: 1023px) {
    .about-hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .about-intro {
        order: 2;
    }
    
    .about-avatar-section {
        order: 1;
        justify-content: center;
    }
    
    .about-subtitle {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .canvas-container {
        right: auto;
        left: 50%;
        transform: translateX(-50%) rotate(-12deg);
    }
}

@media (max-width: 640px) {
    .about-title {
        font-size: 2rem;
    }
    
    .about-avatar-section {
        height: 300px;
    }
    
    .canvas-container {
        width: 350px;
        height: 300px;
    }
    
    .about-avatar {
        width: 180px;
        height: 180px;
    }
}

/* About 页面内嵌 Hero 样式 */
.about-page-content {
    overflow: visible !important;
}

.about-page-content .breadcrumb {
    position: relative;
    z-index: 100;
    margin-bottom: 2rem;
}

.about-hero-inline {
    position: relative;
    padding: 3rem 2rem 4rem;
    overflow: hidden; /* 修复 Canvas 溢出问题 */
    border-radius: 16px;
    /* 让 Hero 卡片与上方导航之间多一点呼吸空间，并与内容保持左右对齐 */
    margin: 2rem 0 2.5rem 0;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.about-hero-inline .about-hero-bg {
    border-radius: 16px;
    z-index: 0; /* 调整回 0，因为父容器现在 hidden 了 */
    /* 顶部从接近白色渐变到浅蓝，减弱和导航之间的生硬对比 */
    background: linear-gradient(to bottom, #f9fbff 0%, #e0f2fe 40%, #f0f9ff 100%);
}

.about-hero-inline .about-avatar-section {
    height: 320px;
}

.about-hero-inline .canvas-container {
    top: -30px;
    right: -10px;
    width: 400px;
    height: 350px;
}

@media (min-width: 640px) {
    .about-hero-inline .canvas-container {
        width: 500px;
        height: 420px;
    }
    
    .about-hero-inline .about-avatar-section {
        height: 380px;
    }
}

.about-hero-inline .about-avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background-color: #fff;
}

@media (min-width: 640px) {
    .about-hero-inline .about-avatar {
        width: 220px;
        height: 220px;
    }
}

.about-main-content-inline {
    position: relative;
    z-index: 10;
    padding: 2rem 1.5rem 0;
    max-width: 72rem;  /* 与 about-hero-content 相同 */
    margin: 0 auto;    /* 居中对齐 */
}

/* 移除 about-main-content-inline 内所有标题的默认装饰 */
.about-main-content-inline h1,
.about-main-content-inline h2,
.about-main-content-inline h3,
.about-main-content-inline h4 {
    border: none !important;
    background: none !important;
    padding: 0 !important;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    color: #1e293b; /* 深蓝灰色，配合背景 */
}

.about-main-content-inline h1::before,
.about-main-content-inline h1::after,
.about-main-content-inline h2::before,
.about-main-content-inline h2::after,
.about-main-content-inline h3::before,
.about-main-content-inline h3::after {
    content: none !important;
    display: none !important;
}

.about-main-content-inline p,
.about-main-content-inline li {
    color: #334155; /* 稍微深一点的灰色 */
}

/* 列表样式微调 */
.about-main-content-inline ul li::before {
    color: #4f46e5; /* 列表点颜色改为靛蓝色 */
}

/* 移除 about-hero-inline 内标题的默认样式 */
.about-hero-inline .about-title::before {
    content: none;
}

.about-hero-inline .about-title::after {
    display: none;
}

.about-hero-inline .about-title {
    border: none;
    padding-left: 0;
    background: none;
    margin: 0 0 1.5rem 0;
}
