/*
Theme Name: Tech Book Theme
Author: Your Name
Description: A simple blog theme for technical book.
Version: 1.0
*/

/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    /* background-color: #f5f5f5; */
    background-color: #fff;
    font-size: 16px;
}
header {
    text-align: center;
    margin-top: 50px;
}
header p {
    padding: 0.8em 0;
    font-size: 1.2em;
    color: #383838;
    font-style: italic;
}
/* .logo svg.icon {
    width: 80px;
    height: auto;
    fill: #383838;
} */
.logo img {
    width: 80px;
    height: auto;
    color: #383838;
}
.container nav {
    border-bottom: 1px solid #ff5d23;
    /* margin-bottom: 1.5em; */
}
.container nav.single {
    border-bottom: 1px solid #eee;
}
nav ul.category-list {
    list-style: none;
    padding: 0;
    /* margin: 15px 0; */
    margin: 0.9em 0;
    text-align: left; /* 使分类靠左 */
}
nav ul.category-list li {
    display: inline-block;
    margin-right: 12px; 
}
nav ul.category-list li a {
    color: gray; /* 分类字体为灰色 */
    color: #707070;
    text-decoration: none; /* 去掉下划线 */
    font-size: 1em;
    position: relative;
}
nav ul.category-list li a:hover {
    color: #333;
}
nav ul.category-list li.current-cat a:before {
    content: "";
    width: 5px;
    height: 5px;
    /* background: #f44336; */
    background: #3F9EFF;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 5px;
    position: absolute;
    top: -0.5em;
    left: 1px;
}

main.container {
    max-width: 1024px; /* 最大宽度为1024px */
    width: 100%; /* 宽度自适应 */
    margin: 0 auto; /* 使 main 元素居中 */
    padding: 0 15px;
    box-sizing: border-box;
}
main ul.post-list {
    list-style: none;
    padding: 0;
}
main ul.post-list li.post-item {
    padding-top: 0.9em;
    padding-bottom: 0.9em;
    /* margin-bottom: 10px; */
    border-bottom: 1px dashed #ddd; /* 每个文章标题之间有细下划线分隔 */
    display: flex;
    align-items: center;
}
main ul.post-list li.post-item:last-child {
    border-bottom: none; /* 去掉最后一个文章标题的下划线 */
}
main ul.post-list li.post-item .post-date {
    text-align: left;
    /* margin-right: 20px; */
    width: 60px;
}
main ul.post-list li.post-item .post-year {
    display: block;
    font-size: 18px; /* 调大字号 */
    font-weight: bold; /* 加粗 */
    color: #7f7f7f;
}
main ul.post-list li.post-item .post-month-day {
    display: block;
    font-size: 18px;
    color: #888;
    color: #5f5f5f;
}
main ul.post-list li.post-item .post-title {
    flex-grow: 1;
    text-decoration: none; /* 去掉文章标题的下划线 */
    color: #333;
    color: #646464;
    font-size: 1.2em;
}
main ul.post-list li.post-item .post-title:hover {
    color: #333;
}

main ul.post-list li.post-item .post-views {
    width: 80px; /* 固定宽度 */
    text-align: right;
    color: #888;
}

.article {
    padding: 0 2em;
}

.entry-header {
    padding-top: 1.2em;
    padding-bottom: 1em;
}

/* 设置标题的字号 */
.entry-title {
    font-size: 2.5em; /* 设置你想要的字号 */
    /* margin-bottom: 1em; */
    margin: 1em;
    color: #444;
    font-weight: 800;
}

/* 设置文章元数据的样式 */
.entry-meta {
    margin-bottom: 20px;
    font-size: 0.9em;
    color: #666;
    font-size: .9em;
    display: flex;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: center;
    justify-content: space-around;
}

.entry-meta span {
    /* margin-right: 30px; */
}

/* 设置文章内容的样式 */
.entry-content {
    font-size: 1em;
    line-height: 1.6;
}

/* 设置文章页脚的样式 */
.entry-footer {
    margin-top: 20px;
    font-size: 0.9em;
    color: #666;
}




/* 设置页脚样式 */
.site-footer {
    /* background-color: #f5f5f5; */
    padding: 20px 0;
    text-align: center;
    position: absolute;
    bottom: 0;
    width: 100%;
}

.site-footer .container {
    max-width: 1024px;
    margin: 0 auto;
}

.site-footer p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.site-footer a {
    color: #333;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* 确保页面内容不足时，页脚仍然在页面底部 */
html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px; /* 页脚的高度 */
}

/* 代码块样式 */
pre {
    display: block;
    font-family: monospace;
    unicode-bidi: isolate;
    white-space: pre;
    margin: 1em 0px;
    margin-top: .5rem;
    border: 1px solid #d0d7de;
    border: 0.5px solid rgb(227, 227, 227);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 16px;
    overflow: auto;
    font-size: 85%;
    line-height: 1.45;
    color: #1f2328;
    background-color: #f6f8fa;
    background-color: #F9F9F9;
    border-radius: 6px;
    word-wrap: normal;
    /* margin-top: 0;
    margin-bottom: 0; */
    font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
}

code {
    padding: 2px 4px;
    border-radius: 3px;
    background-color: #f6f8fa;
    background-color: #F9F9F9;
    display: inline;
    max-width: auto;
    overflow: visible;
    line-height: inherit;
    word-wrap: normal;
    border: 0;
    color: #1f2328;
    margin: 0 3px;
}

pre code {
    background-color: transparent;
    padding: 0;
    margin: 0;
}

/* 高亮代码 */
.highlight {
    background-color: #50fa7b; /* 高亮背景色 */
    color: #282a36; /* 高亮文字颜色 */
}

/* 特定语言高亮样式示例（例如：JavaScript） */
pre.language-javascript {
    border-left: 4px solid #ffb86c; /* 左侧边框颜色 */
}

/* 特定语言高亮样式示例（例如：Python） */
pre.language-python {
    border-left: 4px solid #8be9fd; /* 左侧边框颜色 */
}

/* 代码块的行号样式 */
pre .line-numbers {
    counter-reset: line; /* 行号计数器 */
}

pre .line-numbers > div {
    counter-increment: line; /* 增加行号 */
}

pre .line-numbers > div::before {
    content: counter(line); /* 显示行号 */
    color: #6272a4; /* 行号颜色 */
    display: inline-block; /* 块级显示 */
    width: 30px; /* 行号宽度 */
    margin-right: 10px; /* 行号与代码之间的间隔 */
}
