/* ================= 标题系统 ================= */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.35;
    margin: 1.4em 0 0.6em 0;
}

h1 { font-size: 1.6em; margin-top: 1.6em; }
h2 { font-size: 1.4em; margin-top: 1.5em; }
h3 { font-size: 1.2em; margin-top: 1.3em; }
h4 { font-size: 1.1em; }
h5, h6 { font-size: 1em; }

/* ================= 正文段落 ================= */

#single_content p {
    margin: 1.1em 0 0.6em 0;
    text-indent: 0.5em;
    line-height: 1.85em;
    letter-spacing: 0.02em;
}

/* ================= 链接 ================= */

#single_content a {
    text-decoration: none;
    transition: color 0.2s ease;
}

#single_content a:hover {
    color: orangered;
}

/* ================= 对齐 ================= */

.has-text-align-left   { text-align: left; }
.has-text-align-center { text-align: center; }
.has-text-align-right  { text-align: right; }

/* ================= 图片 ================= */

.wp-block-image {
    width: 100%;
    max-width: 100%;
    margin: 1.2em 0;
}

.wp-block-image img {
    width: 100%;
    height: auto;
    border-radius: 0.5em;
}

/* ================= 视频 ================= */

.wp-block-video {
    width: 100%;
    max-width: 100%;
    margin: 1.4em 0;
}

.wp-block-video video {
    width: 100%;
    height: auto;
    border-radius: 0.5em;
}

/* ================= 音频 ================= */

.wp-block-audio {
    width: 100%;
    margin: 1.2em 0;
}

.wp-block-audio audio {
    width: 100%;
}

/* ================= 代码块 ================= */

.wp-block-code {
    overflow-x: auto;
    margin: 1.4em 1em;
    background: #f5f5f5;
    border-radius: 1em;
    width: 100%;
    padding: 1em 1.2em;
    line-height: 1.5em;
}

code, pre {
    font-family: "Courier New", Courier, monospace;
    font-size: 0.95em;
}

/* 行内代码微优化 */
p code {
    padding: 0.15em 0.35em;
    border-radius: 0.3em;
}

/* ================= 引用块 ================= */

.wp-block-quote {
    display: block;
    width: 100%;
    margin: 1.4em 0;
    padding: 1.4em 1.2em 1.4em 1.8em;
    border-left: 3px solid black;
    font-style: italic;
    font-size: 0.95em;
    line-height: 1.7em;
    background-color: rgb(117 117 117 / 10%);
    border-radius: 0 1em 1em 0;
}

#single_content blockquote p {
    font-weight: bold;
    margin: 0;
}

/* ================= 分割线 ================= */

.wp-block-separator {
    margin: 3em 0;
    border-style: dashed;
    border-bottom-color: grey;
}

/* ================= 表格 ================= */

.wp-block-table {
    width: 100%;
    margin: 1.5em 0;
}

.wp-block-table table {
    width: 100%;
    border: 0.15em solid grey;
    border-collapse: collapse;
}

.wp-block-table tr {
    border-bottom: 0.1em solid grey;
}

.wp-block-table tr:hover {
    background-color: rgb(200 200 200 / 20%);
}

.wp-block-table th,
.wp-block-table td {
    border-right: 0.1em solid grey;
    padding: 0.5em 0.7em;
    line-height: 1.6em;
}

/* ================= 图注 / 引用信息 ================= */

#single_content figure {
    margin: 0;
    padding: 0.6em 0 0.2em 0;
    text-align: center;
}

#single_content figcaption {
    font-size: 0.625em;
    color: gray;
    text-align: center;
    margin-top: 0.4em;
}

#single_content cite {
    font-size: 0.8em;
    color: rgb(50, 50, 50);
    display: block;
    margin-top: 0.6em;
}

/* ================= 列表 ================= */

#single_content ul,
#single_content ol {
    margin: 0.8em 0;
    padding-left: 1.6em;
}

#single_content li {
    padding: 0.35em 0;
    line-height: 1.7em;
}

/* 暗色 CSS */

@media (prefers-color-scheme: dark) {
	
    /* ================= 暗色模式基础环境 ================= */

	body,
	#single_content {
		background-color: rgb(25, 25, 25);
		color: rgb(220, 220, 220);
	}

	/* ================= 标题系统 ================= */

	h1, h2, h3, h4, h5, h6 {
		color: rgb(235, 235, 235);
	}

	/* ================= 正文段落 ================= */

	#single_content p {
		color: rgb(220, 220, 220);
	}

	/* ================= 链接 ================= */

	#single_content a {
		color: rgb(180, 200, 255);
		text-decoration: none;
	}

	#single_content a:hover {
		color: orangered; /* 保留原强调色 */
	}

	/* ================= 图片 / 视频 ================= */

	.wp-block-image img,
	.wp-block-video video {
		background-color: rgb(40, 40, 40);
	}

	/* ================= 代码块 ================= */

	.wp-block-code {
		background: rgb(35, 35, 35);
		color: rgb(220, 220, 220);
	}

	code, pre {
		color: rgb(230, 230, 230);
	}

	/* 行内代码 */
	p code {
		background-color: rgb(45, 45, 45);
		color: rgb(240, 240, 240);
	}

	/* ================= 引用块 ================= */

	.wp-block-quote {
		background-color: rgb(50 50 50 / 40%);
		border-left-color: rgb(180, 180, 180);
		color: rgb(215, 215, 215);
	}

	#single_content blockquote p {
		color: rgb(230, 230, 230);
	}

	/* ================= 分割线 ================= */

	.wp-block-separator {
		border-bottom-color: rgb(120, 120, 120);
	}

	/* ================= 表格 ================= */

	.wp-block-table table {
		border-color: rgb(130, 130, 130);
	}

	.wp-block-table tr {
		border-bottom-color: rgb(110, 110, 110);
	}

	.wp-block-table tr:hover {
		background-color: rgb(255 255 255 / 6%);
	}

	.wp-block-table th,
	.wp-block-table td {
		border-right-color: rgb(110, 110, 110);
		color: rgb(220, 220, 220);
	}

	/* ================= 图注 / 引用信息 ================= */

	#single_content figcaption {
		color: rgb(160, 160, 160);
	}

	#single_content cite {
		color: rgb(170, 170, 170);
	}

	/* ================= 列表 ================= */

	#single_content ul,
	#single_content ol,
	#single_content li {
		color: rgb(220, 220, 220);
	}

}
