/* 基础样式 */
@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;
    /* --font-family-base: bree serif,sans-serif; */
    --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;
    /* background: url('/images/bg.webp'); */
    filter: blur(0.1px);
}

/* 布局 */
header, footer {
    max-width: 80%;
    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-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;
}

/* 定义颜色变量 */
:root {
    --breadcrumb-bg-color: #0c81ef;
    --breadcrumb-text-color: #ffffff;
    --breadcrumb-hover-color: #005f99;
    --breadcrumb-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 面包屑导航 */
.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:rgb(247, 245, 245)
}

.breadcrumb-item:hover {
    color:rgb(119, 117, 117)
}

.breadcrumb-arrow {
    margin: 0 0.5rem;
    color: rgb(252, 251, 251)
}

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

.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;
    background-color: var(--content-bg);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.post-content p {
    margin: 0.8em 0;  /* 减小段落间距 */
    font-size: 1.2rem;  /* 保持段落字体大小 */
    line-height: 1.6;  /* 适当减小行高 */
}

.post-content h1 {
    font-size: 2.2rem;  /* 增大标题字体 */
    margin-top: 1.5em;
}


.post-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;  /* h2的横线稍细一点 */
    background: linear-gradient(to right, var(--breadcrumb-bg-color) 20%, transparent);
    opacity: 0.6;

}

.post-content h3 {
    font-size: 1.6rem;
}

.post-content h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50%;  /* h3的横线宽度减半 */
    height: 1px;
    background: linear-gradient(to right, var(--primary-color) 10%, transparent);
    opacity: 0.4;
}

.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: 1.1em;
}

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

/* 原来匹配所有后代 li，会把嵌套 ul li 也纳入计数 */
.post-content ol > li {
    position: relative;
    padding-left: 1.2em;  /* 减小数字和文本的间距 */
    margin: 0.3em 0;       /* 减小项目间距 */
    counter-increment: item;
}

/* 原来匹配所有后代 li 生成数字 */
.post-content ol > li::before {
    content: counter(item) ".";
    color: var(--breadcrumb-bg-color);
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1em;
}

/* 内层 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: 1rem;  /* 与列表字体大小保持一致 */
    line-height: 1.6;
    border-left: 4px solid var(--breadcrumb-bg-color);
    margin: 1rem 0;
    padding: 0.6em 1em;
    color: #2c3e50;
    background-color: #f0f7ff;
    border-radius: 0 8px 8px 0;
}

.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: flex;
    margin: 1.5em auto;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

.post-content table th,
.post-content table td {
    padding: 0.5em;
    border: 1px solid var(--border-color);
}

.post-content table th {
    background: #f8f9fa;
}

/* 标题样式优化 */
.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::before,
.post-content h2::before,
.post-content h3::before,
.post-content h4::before {
    color: var(--breadcrumb-bg-color);
    margin-right: 0.5rem;
    font-weight: normal;
}

.post-content h1::before {
    content: "#";
}

.post-content h2::before {
    content: "##";
}

.post-content h3::before {
    content: "###";
}

.post-content h4::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: 80%;
    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, 1fr);
    gap: 2rem;
    max-width: 95%;
    margin: 0 auto;
    padding: 1rem;
}

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

/* 文章目录 */
.post-toc {
    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);
    padding: 0 0 0 3rem;
}

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

