/* 基础样式 */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	line-height: 1.8;
	color: #2c3e50;    
	background-image: url('/assets/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
	background-color: #f8f9fa;
	margin: 0;
	padding: 0;
}

/* 容器样式 */
.container {
	max-width: 900px;
	margin: 0 auto;
	padding: 2rem;
	/* background-color: white; */
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
	min-height: 100vh;
    background-color: rgba(255, 255, 255, 0.9); /* 增加透明度让背景透出 */
    backdrop-filter: blur(5px); /* 可选：背景模糊效果 */
    border-radius: 12px; /* 可选：圆角效果 */
}

/* 页首标题样式 */
.header {
	margin-bottom: 2.5rem;
	padding-bottom: 1rem;
	border-bottom: 2px solid #e8e8e8;
}

.site-title {
	font-size: 2.8rem;
	font-weight: 700;
	color: #2c3e50;
	margin: 0 0 1rem 0;
	text-align: left;
	font-family: 'Georgia', 'Times New Roman', serif;
}

/* 导航链接样式 */
.nav-links {
	display: flex;
	gap: 2rem;
	margin: 0;
	padding: 0;
	list-style: none;
	flex-wrap: wrap;
}

.nav-links li {
	margin: 0;
}

.nav-link {
	font-size: 1.1rem;
	font-weight: 500;
	color: #3498db;
	text-decoration: none;
	padding: 0.5rem 0;
	position: relative;
	transition: color 0.3s ease;
}

.nav-link:hover {
	color: #2980b9;
}

.nav-link::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 2px;
	background-color: #3498db;
	transition: width 0.3s ease;
}

.nav-link:hover::after {
	width: 100%;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
	color: #2c3e50;
	margin-top: 2rem;
	margin-bottom: 1rem;
	font-weight: 600;
	line-height: 1.3;
}

h1 {
	font-size: 2.5rem;
	border-bottom: 3px solid #3498db;
	padding-bottom: 0.5rem;
	margin-top: 0;
}

h2 {
	font-size: 2rem;
	border-bottom: 2px solid #e8e8e8;
	padding-bottom: 0.3rem;
}

h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; color: #6c757d; }

/* 段落和文本 */
p {
	margin: 1.5rem 0;
	text-align: justify;
}

/* 链接样式 */
a {
	color: #3498db;
	text-decoration: none;
	transition: color 0.3s ease;
}

a:hover {
	color: #2980b9;
	text-decoration: underline;
}

/* 代码样式 */
code {
	background-color: #f8f9fa;
	padding: 0.2em 0.4em;
	border-radius: 3px;
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
	font-size: 0.9em;
	color: #e83e8c;
}

pre {
	background-color: #f8f9fa;
	padding: 1.5rem;
	border-radius: 8px;
	overflow-x: auto;
	margin: 1.5rem 0;
	border-left: 4px solid #3498db;
}

pre code {
	background: none;
	padding: 0;
	color: inherit;
	font-size: 0.95em;
}

/* 引用块样式 */
blockquote {
	border-left: 4px solid #3498db;
	margin: 1.5rem 0;
	padding-left: 1.5rem;
	color: #6c757d;
	background-color: #f8f9fa;
	padding: 1.5rem;
	border-radius: 0 8px 8px 0;
}

/* 列表样式 */
ul, ol {
	margin: 1.5rem 0;
	padding-left: 2rem;
}

li {
	margin: 0.5rem 0;
}

/* 表格样式 */
table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.5rem 0;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
	border-radius: 8px;
	overflow: hidden;
}

th, td {
	padding: 0.75rem;
	text-align: left;
	border-bottom: 1px solid #dee2e6;
}

th {
	background-color: #3498db;
	color: white;
	font-weight: 600;
}

tr:nth-child(even) {
	background-color: #f8f9fa;
}

tr:hover {
	background-color: #e3f2fd;
}

/* 图片样式 */
img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 1.5rem auto;
	border-radius: 8px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 水平线 */
hr {
	border: none;
	height: 2px;
	background: linear-gradient(90deg, transparent, #3498db, transparent);
	margin: 2rem 0;
}

/* 数学公式样式 */
.math-display {
	overflow-x: auto;
	margin: 1.5rem 0;
}

/* 页脚样式 */
footer {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid #e8e8e8;
	text-align: center;
	color: #6c757d;
	font-size: 0.9rem;
}

.footer-content {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.5rem;
}

.copyright {
	font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
	.container {
		padding: 1rem;
		margin: 0;
		box-shadow: none;
	}
	
	.site-title {
		font-size: 2.2rem;
	}
	
	.nav-links {
		gap: 1.5rem;
	}
	
	.nav-link {
		font-size: 1rem;
	}
	
	h1 {
		font-size: 2rem;
	}
	
	h2 {
		font-size: 1.5rem;
	}
	
	pre {
		padding: 1rem;
		border-radius: 0;
		border-left: none;
	}
}

@media (max-width: 480px) {
	.nav-links {
		gap: 1rem;
		justify-content: flex-start;
	}
	
	.site-title {
		font-size: 1.8rem;
	}
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
	body {
		background-color: #1a1a1a;
		color: #e8e8e8;
	}
	
	.container {
		background-color: #2d2d2d;
		box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
	}
	
	.header {
		border-bottom-color: #444;
	}
	
	.site-title {
		color: #ffffff;
	}
	
	.nav-link {
		color: #4fc3f7;
	}
	
	.nav-link:hover {
		color: #29b6f6;
	}
	
	.nav-link::after {
		background-color: #4fc3f7;
	}
	
	h1, h2, h3, h4, h5, h6 {
		color: #ffffff;
	}
	
	code {
		background-color: #3d3d3d;
		color: #ff79c6;
	}
	
	pre {
		background-color: #3d3d3d;
		border-left-color: #3498db;
	}
	
	blockquote {
		background-color: #3d3d3d;
		color: #b8b8b8;
	}
	
	th {
		background-color: #3498db;
	}
	
	tr:nth-child(even) {
		background-color: #3d3d3d;
	}
	
	tr:hover {
		background-color: #4d4d4d;
	}
	
	footer {
		border-top-color: #444;
	}
}
