/* 基础重置 - 兼容旧浏览器 */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

/* 颜色变量定义 */
:root {
	/* 主品牌色 */
	--primary-color: #3498db;
	--primary-dark: #2980b9;
	--primary-light: #5dade2;
	
	/* 辅助色 */
	--secondary-color: #2ecc71;
	--accent-color: #e74c3c;
	
	/* 浅色模式 */
	--text-color: #2c3e50;
	--bg-color: #ffffff;
	--card-bg: #ffffff;
	--border-color: #e0e0e0;
	--shadow: 0 0.125rem 0.9375rem rgba(0, 0, 0, 0.08);
	
	/* 字体 */
	--font-family: "Helvetica Neue", "Microsoft YaHei", Arial, sans-serif;
	--line-height: 1.5;
}

/* 深色模式 */
@media (prefers-color-scheme: dark) {
	:root {
		--text-color: #ecf0f1;
		--bg-color: #121212;
		--card-bg: #1e1e1e;
		--border-color: #333333;
		--shadow: 0 0.125rem 0.9375rem rgba(0, 0, 0, 0.3);
	}
}

/* 手动切换深色模式的类 */
.dark-mode {
	--text-color: #ecf0f1;
	--bg-color: #121212;
	--card-bg: #1e1e1e;
	--border-color: #333333;
	--shadow: 0 0.125rem 0.9375rem rgba(0, 0, 0, 0.3);
}

/* 基础样式 - 使用rem单位 */
html {
	font-size: 14px; /* 1rem = 16px */
}

body {
	font-family: var(--font-family);
	line-height: var(--line-height);
	color: var(--text-color);
	background-color: var(--bg-color);
	font-size: 1rem;
	text-align: justify;
    padding-top: constant(safe-area-inset-top); /* iOS 11.0-11.2 */
    padding-top: env(safe-area-inset-top); /* iOS 11.2+ */
}

.container {
	max-width: 60rem; /* 960px */
	margin: 0 auto;
	padding: 0 1rem; 
}

/* 浏览器不支持提示 */
.browser-warning {
	background-color: #ffcc00;
	color: #333;
	padding: 0.625rem; /* 10px */
	text-align: center;
	font-size: 0.875rem; /* 14px */
	display: none;
}

/* 头部样式 */
header {
	background-color: var(--card-bg);
	box-shadow: var(--shadow);
	position: relative;
	padding: 0.5rem 0; /* 8px */
}

.header-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.controls {
	display: flex;
	gap: 1rem; 
	align-items: center;
}

.language-selector {
	background: var(--card-bg);
	border: 0.0625rem solid var(--border-color); /* 1px */
	color: var(--text-color);
	padding: 0.5rem 0.75rem; /* 8px 12px */
	border-radius: 0.25rem; /* 4px */
	cursor: pointer;
	font-size: 0.875rem; /* 14px */
}

.theme-toggle {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 1.2rem;
	color: var(--text-color);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem; /* 40px */
	height: 2.5rem; /* 40px */
	border-radius: 50%;
}

/* 主要内容区域 */
.content {
	border-radius: 0.5rem; 
	padding: 1rem; 
	margin: 1rem 0; 
}

.content h1 {
	margin-bottom: 1.5rem; 
	color: var(--text-color);
	text-align: center;
	font-size: 1.5rem; 
}

.content h2{
	margin: 1.5rem 0 0.5rem;
	color: var(--text-color);
	font-size: 1.25rem; 
	display: flex;
}

.content p{
	margin-bottom: 0.5rem; 
	color: var(--text-color);
	font-size: 1rem;
}

.content ul ul{
	color: var(--text-color);
	font-size: 1rem;
}

/* 一级列表 */
ul {
counter-reset: section;
list-style: none;
margin-left: 0rem;
}

ul li {
counter-increment: section;
margin-left: -1rem;
padding-left: 0rem; /* 给左边留出编号的位置 */
text-indent: 0rem; /* 首行缩进负值，让文字挂出来 */
}

ul li h2::before {
	content: counter(section) ". ";
	font-weight: bold;
	display: inline-block;
	width: 2rem; /* 固定编号的宽度 */
	text-indent: 0;
	text-align: right;
	padding-right: 0.5rem;
}

/* 二级列表 */
ul ul {
counter-reset: subsection;
margin-left: 2.5rem;
}

ul ul li {
counter-increment: subsection;
margin-left: 0.5rem;
padding-left: 1.5rem; /* 给左边留出编号的位置 */
text-indent: -2.5rem; /* 首行缩进负值，让文字挂出来 */
}

ul ul li::before {
content: counter(section) "." counter(subsection) " ";
font-weight: normal;
display: inline-block;
width: 2rem; /* 固定编号的宽度 */
text-indent: 0;
text-align: right;
padding-right: 0.5rem;
}

/* 三级列表 */
ul ul ul {
counter-reset: subsubsection;
margin-left: 0rem;
}

ul ul ul li {
counter-increment: subsubsection;
text-indent: -2.5rem; /* 首行缩进负值，让文字挂出来 */
padding-left: 0.5rem;
}

ul ul ul li::before {
content: counter(subsubsection) ")";
font-weight: normal;
display: inline-block;
width: 2rem; /* 固定编号的宽度 */
padding-right: 0.5em;
}
 /* 四级列表 a)b)c)*/
ul ul ul ul li::before {
content: counter(subsubsection, lower-alpha) ")";
}

/* 链接样式 */
.content a {
	color: var(--primary-color);
	text-decoration: none;
	border-bottom: 0.0625rem dotted var(--primary-color); /* 1px */
}

.content a:hover {
	border-bottom-style: solid;
}

/* 页脚样式 */
footer {
	text-align: center;
	padding: 1.25rem 0; /* 20px */
	margin-top: 1.875rem; /* 30px */
	border-top: 0.0625rem solid var(--border-color); /* 1px */
	color: var(--text-color);
	font-size: 0.875rem; /* 14px */
}

/* 防复制样式 */
.no-select {
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.copy-warning {
	position: fixed;
	bottom: 1.25rem; /* 20px */
	right: 1.25rem; /* 20px */
	background-color: var(--accent-color);
	color: white;
	padding: 0.625rem 0.9375rem; /* 10px 15px */
	border-radius: 0.25rem; /* 4px */
	box-shadow: 0 0.125rem 0.625rem rgba(0, 0, 0, 0.2); /* 2px 10px */
	z-index: 1000;
	display: none;
}

.copy-warning.show {
	display: block;
}

/* 响应式设计 */

@media (max-width: 30rem) { /* 480px */
	
	.container {
		padding: 0 1rem; 
	}
	
	.content {
		padding: 0.5rem; 
	}
}

/* IE特定样式 */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
	.container {
		width: 60rem; /* 强制宽度用于IE */
	}
	
	.theme-toggle {
		background-color: #f0f0f0;
	}
}




.x{/* 改动、标记的内容，上线前把该class去掉 */
	color: var(--accent-color)!important;
}