/* ================================================================
   Notanote Wiki 共享样式
   内容 = atom-ui-markdown-explore.css + litepress.css + wiki Apple 覆盖
   引用路径：//static.notanote.cn/static/css/wiki.css
   ================================================================ */

/* ===== Part 1: AtomUnite MarkDown CSS ===== */
/*
    AtomUnite MarkDown CSS v1
    For every Players, better services
*/

@font-face {
	font-family: WebFont;
	src: url("//static.notanote.cn/fonts/meow.woff2") format("woff2");
	font-display: swap;
}

*:not(mjx-container):not(mjx-container *) {
	font-family: WebFont, var(--vp-font-family);
}

.Atom-Markdown h1 {
	font-size: 300%;
	margin-bottom: 0px;
}

.Atom-Markdown h2 {
	font-size: 180%;
	margin-top: 0;
	/* padding-top: 0; */
	border-top: 0px;
}

.Atom-Markdown h3 {
	font-size: 150%;
}

.Atom-Markdown .SubTitle {
	margin-top: 5px;
	margin-bottom: 0;
	font-size: 20px;
	color: rgb(182, 182, 182);
}

@media screen and (min-width: 960px) {
	.Atom-Markdown .NoticeBoard {
		padding: 1px 20px 1px 20px;
		/* margin: 10px; */

		background-color: rgb(247, 247, 247);
		border-left: 7px solid #248aff;
		border-radius: 0px 5px 5px 0px;
		transition: 0.3s;
	}

	.Atom-Markdown .NoticeBoard:hover {
		background-color: rgb(239, 239, 239);
		transition: 0.3s;
	}

	.Atom-Markdown .RedLeftLine {
		border-left: 7px solid #fc2929 !important;
	}
}

@media screen and (max-width: 960px) {
	.Atom-Markdown .NoticeBoard {
		padding: 1px 20px 1px 20px;
		margin: 10px;

		background-color: rgb(236, 236, 236);
		border-left: 5px solid #248aff;
		border-radius: 5px;
		transition: 0.3s;
	}

	.Atom-Markdown .NoticeBoard:hover {
		background-color: rgb(228, 230, 233);
		transition: 0.3s;
	}

	.Atom-Markdown .RedLeftLine {
		border-left: 5px solid #fc2929 !important;
	}
}

.Atom-Markdown .NoticeBoard-Blue .h1,
.Atom-Markdown .NoticeBoard-Blue .h2,
.Atom-Markdown .NoticeBoard-Blue .h3,
.Atom-Markdown .NoticeBoard-Red .h1,
.Atom-Markdown .NoticeBoard-Red .h2,
.Atom-Markdown .NoticeBoard-Red .h3 {
	border-bottom: 0px !important;
}

.Atom-Markdown a {
	background-color: transparent;
	color: #3b96fd;
	text-decoration: none;
}

.Atom-Markdown a:hover {
	border-bottom: 2px solid #3b96fd;
	text-decoration: none;
}

.Atom-Markdown code {
	font-size: 101%;
}

.Atom-Markdown h1 code,
.Atom-Markdown h2 code,
.Atom-Markdown h3 code {
	font-size: 75%;
	border-bottom: 2px solid #3b96fd;
	text-decoration: none;
}

.Atom-Markdown .Important {
	color: rgb(253, 105, 105);
}

.Atom-Markdown .Underline-Blue {
	border-bottom: 2px solid #3b96fd;
	text-decoration: none;
}

.Atom-Markdown .Underline-Red {
	border-bottom: 2px solid #ff1919;
	text-decoration: none;
}

/* ===== Part 2: litepress.css ===== */
:root {
	--vp-c-bg: #fcfcfc;
	--vp-c-bg-alt: rgba(246, 246, 247, 0.6);

	--vp-c-text-1: #2c2c30;
	--vp-c-text-2: rgba(44, 44, 48, 0.7);

	--vp-c-brand: #3451b2;
	--vp-c-brand-light: #5773d6;
	--vp-c-border: rgba(0, 0, 0, 0.06);
	--vp-c-divider: rgba(0, 0, 0, 0.04);

	/* 提取颜色变量以支持暗夜模式 */
	--vp-c-bg-header: rgba(252, 252, 252, 0.7);
	--vp-c-bg-soft: #f6f8fa;
	--vp-c-bg-mute: rgba(130, 130, 130, 0.06);
	--vp-c-bg-hover: rgba(60, 60, 67, 0.04);
	--vp-c-bg-active: rgba(52, 81, 178, 0.08);
	--vp-c-text-code: #476582;
	--vp-c-logo-bg: #c87c7c;

	/* 新增阴影变量，提升层次感 */
	--vp-c-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
	--vp-c-shadow-2:
		0 3px 12px rgba(0, 0, 0, 0.07), 0 1px 4px rgba(0, 0, 0, 0.07);
	--vp-c-shadow-3:
		0 12px 32px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.08);

	--vp-font-family:
		"Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
		"Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	--header-main-height: 60px;
	--header-links-height: 44px;
	--header-height: var(--header-main-height);
	--sidebar-width: 280px;
	--content-width: 900px;
}

@media (prefers-color-scheme: dark) {
	:root {
		--vp-c-bg: #1a1a1f;
		--vp-c-bg-alt: rgba(30, 30, 36, 0.55);

		--vp-c-text-1: #f0f0f5;
		--vp-c-text-2: rgba(230, 230, 240, 0.75);
		--vp-c-text-code: #bbc5ff;

		--vp-c-brand: #a2aaff;
		--vp-c-brand-light: #7b88ff;
		--vp-c-border: rgba(255, 255, 255, 0.08);
		/* 极细的玻璃边框 */
		--vp-c-divider: rgba(255, 255, 255, 0.05);

		--vp-c-bg-header: rgba(26, 26, 31, 0.65);
		--vp-c-bg-soft: rgba(38, 38, 46, 0.55);
		--vp-c-bg-mute: rgba(243, 243, 248, 0.05);
		--vp-c-bg-hover: rgba(243, 243, 248, 0.06);
		--vp-c-bg-active: rgba(162, 170, 255, 0.12);
		--vp-c-logo-bg: #d27070;

		--vp-c-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.6), 0 1px 2px rgba(0, 0, 0, 0.5);
		--vp-c-shadow-2:
			0 4px 16px rgba(0, 0, 0, 0.8), 0 1px 4px rgba(0, 0, 0, 0.6);
		--vp-c-shadow-3:
			0 12px 32px rgba(0, 0, 0, 0.9), 0 2px 6px rgba(0, 0, 0, 0.7);
	}

	.markdown-body img {
		opacity: 0.85;
	}

	.NoticeBoard {
		background-color: rgba(30, 30, 36, 0.5) !important;
		border-color: rgba(255, 255, 255, 0.1) !important;
	}

	.NoticeBoard:hover {
		background-color: rgba(40, 40, 48, 0.6) !important;
	}
}

* {
	box-sizing: border-box;

	user-select: none;
}

body {
	margin: 0;
	padding: 0;
	font-family: var(--vp-font-family);
	background-color: var(--vp-c-bg);
	/* 增加微弱的光晕背景，提升高级感 */
	background-image:
		radial-gradient(circle at 15% 50%,
			rgba(255, 255, 255, 0.04),
			transparent 30%),
		radial-gradient(circle at 85% 30%,
			rgba(255, 255, 255, 0.04),
			transparent 30%);
	color: var(--vp-c-text-1);
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: light) {
	body {
		background-image:
			radial-gradient(circle at 15% 50%, rgba(0, 0, 0, 0.02), transparent 30%),
			radial-gradient(circle at 85% 30%, rgba(0, 0, 0, 0.02), transparent 30%);
	}
}

a {
	text-decoration: none;
	color: var(--vp-c-brand);
	transition:
		color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
		text-decoration-color 0.3s;
}

a:hover {
	color: var(--vp-c-brand-light);
}

.Header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	/* 不再使用固定 height，改为 min-height + 自适应内容 */
	min-height: var(--header-main-height);
	height: auto;
	background-color: var(--vp-c-bg-header);
	backdrop-filter: saturate(200%) blur(24px);
	-webkit-backdrop-filter: saturate(200%) blur(24px);
	border-bottom: 1px solid var(--vp-c-border);
	box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
	/* 柔和阴影 */
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 12px;
	padding: 0 24px;
	z-index: 100;
	/* 高度变化时平滑过渡，避免闪烁 */
	transition: min-height 0.15s ease;
}

.Header>a {
	flex: 0 0 auto;
}

.Header .Right-Links {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	font-weight: 500;
	margin-left: auto;
	min-width: 0;
	flex-wrap: nowrap;
	flex: 1 1 auto;
}

.Header .Right-Links a {
	white-space: nowrap;
	flex: 0 0 auto;
	font-size: 18px;
	padding: 6px 14px;
	border-radius: 8px;
	/* 带有圆角的导航链接按钮 */
	transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
	color: var(--vp-c-text-2);
}

.Header .Right-Links a:hover {
	color: var(--vp-c-brand-light);
	background-color: var(--vp-c-bg-hover);
}

.TitlePNG {
	height: 32px;
	width: auto;
	background-color: var(--vp-c-logo-bg);
	padding: 4px 8px;
	border-radius: 6px;
	display: block;
	position: absolute;
	left: 50%;
	transform: translate(-50%, -50%);
}

.BigTitle {
	font-size: 115%;
	font-weight: 700;
	color: var(--vp-c-text-1);
	letter-spacing: -0.02em;
	margin-left: 4px;
}

.Logo {
	padding: 5px;
	border-radius: 8px;
	/* 更柔和的圆角 */
	background-color: var(--vp-c-logo-bg);
}

.Layout {
	padding-top: var(--header-height);
	display: flex;
	min-height: 100vh;
}

.Sidebar {
	position: fixed;
	top: var(--header-height);
	bottom: 0;
	left: 0;
	width: var(--sidebar-width);
	background-color: var(--vp-c-bg-alt);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border-right: 1px solid var(--vp-c-border);
	overflow-y: auto;
	padding: 24px;
	display: block;
	transition:
		background-color 0.3s,
		border-color 0.3s;
}

.Sidebar::-webkit-scrollbar {
	width: 6px;
	/* 稍宽一点以便点击，同时增加圆角 */
}

.Sidebar::-webkit-scrollbar-thumb {
	background-color: var(--vp-c-border);
	border-radius: 6px;
}

.Sidebar-Nav-Group {
	margin-bottom: 24px;
}

.Sidebar-Title {
	font-weight: 700;
	font-size: 15px;
	/* 提升字号以便阅读 */
	color: var(--vp-c-text-1);
	margin-bottom: 8px;
	padding-left: 8px;
	display: block;
	margin-top: 16px;
	letter-spacing: 0.02em;
	/* 稍微增加字间距 */
}

.Sidebar-Link {
	display: block;
	font-size: 15px;
	/* 从 14px 调大至 15px，更舒适 */
	color: var(--vp-c-text-2);
	margin-left: 0px;
	border-left: none;
	border-radius: 8px;
	/* 增加圆角，更符合圆润风格 */
	padding: 8px 12px;
	/* 增加内边距 */
	margin-bottom: 4px;
	/* 拉开间距 */
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.Sidebar-Link.sub-link {
	margin-left: 12px;
	padding-left: 12px;
	font-size: 14.5px;
	/* 按比例调大子菜单 */
	border-radius: 6px;
}

.Sidebar-Link:hover,
.Sidebar-Link.active {
	color: var(--vp-c-brand);
	background-color: var(--vp-c-bg-hover);
	transform: translateX(4px);
	/* 悬浮时轻微右移 */
}

.Sidebar-Link.active {
	font-weight: 500;
	background-color: var(--vp-c-bg-active);
	color: var(--vp-c-brand-light);
	box-shadow: inset 2px 0 0 0 var(--vp-c-brand);
	/* 激活时左侧玻璃发光线 */
}

.Content-Wrapper {
	margin-left: var(--sidebar-width);
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.ContentIntro {
	width: 100%;
	max-width: var(--content-width);
	padding: 48px 32px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	scroll-margin-top: calc(var(--header-height) + 24px);
}

h1 {
	font-size: 32px;
	font-weight: 800;
	margin-bottom: 32px;
	letter-spacing: -0.01em;
	line-height: 1.3;
	color: var(--vp-c-text-1);
	display: inline-block;
}

h1 p,
h1 span {
	font-size: inherit;
	/* 让放置在 h1 中的 p 标签随 h1 大小，解决特定页面的覆盖问题 */
	font-weight: inherit;
	color: inherit;
	line-height: inherit;
	margin: 0;
	display: inline;
}

h2 {
	font-size: 24px;
	font-weight: 700;
	margin-top: 40px;
	margin-bottom: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--vp-c-border);
	line-height: 1.35;
	letter-spacing: 0;
	color: var(--vp-c-text-1);
}

h3 {
	font-size: 19px;
	font-weight: 600;
	margin-top: 28px;
	margin-bottom: 12px;
	line-height: 1.45;
}

h4 {
	font-size: 16px;
	font-weight: 600;
	margin-top: 24px;
}

p {
	margin-bottom: 16px;
	font-size: 16px;
	color: var(--vp-c-text-2);
	line-height: 1.85;
	letter-spacing: 0.01em;
}

.NoticeBoard {
	border-radius: 16px;
	padding: 24px 32px;
	margin: 24px 0;
	background: var(--vp-c-bg-soft);
	border: 1px solid var(--vp-c-border);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.02);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	transition:
		transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
		box-shadow 0.4s ease;
}

.NoticeBoard:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.05);
	/* 悬浮时有稍微升起的感觉 */
}

.NoticeBoard h2 {
	margin-top: 0;
	padding-top: 0;
	border-top: none;
	font-size: 20px;
	color: var(--vp-c-brand);
}

.Footer {
	width: 100%;
	max-width: 100%;
	padding: 40px 48px;
	border-top: 1px solid var(--vp-c-border);
	margin-top: auto;
	color: var(--vp-c-text-2);
	font-size: 14px;
}

.Footer .footer-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	margin-top: 24px;
}

.Footer .Left,
.Footer .Right {
	margin-top: 24px;
}

.Footer .Right b {
	color: var(--vp-c-text-1);
	font-size: 15px;
}

.Footer .Right a {
	margin-right: 12px;
}

.Footer .beian {
	margin-top: 12px;
	font-size: 12px;
	color: var(--vp-c-text-2);
	opacity: 0.6;
}

.Footer .beian a {
	color: inherit;
	text-decoration: none;
}

.Footer .beian a:hover {
	opacity: 1;
}

.Footer h2 {
	border-top: none;
	margin-top: 0;
	font-size: 16px;
	margin-bottom: 12px;
}

.Logo {
	height: 40px;
	margin-bottom: 6px;
}

.SidebarMenuButton {
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 35px;
	margin-right: 8px;
	border: 1px solid var(--vp-c-border);
	border-radius: 8px;
	background: var(--vp-c-bg-header);
	backdrop-filter: blur(4px);
	transition:
		background-color 0.2s,
		transform 0.1s;
	color: var(--vp-c-text-1);
	cursor: pointer;
}

.SidebarMenuButton:active {
	transform: translateY(1px);
}

.SidebarMenuIcon {
	position: relative;
	width: 18px;
	height: 12px;
}

.SidebarMenuIcon::before,
.SidebarMenuIcon::after,
.SidebarMenuIcon span {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
}

.SidebarMenuIcon::before {
	top: 0;
}

.SidebarMenuIcon span {
	top: 5px;
}

.SidebarMenuIcon::after {
	bottom: 0;
}

.SidebarBackdrop {
	display: none;
	position: fixed;
	top: var(--header-height);
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.35);
	z-index: 90;
}

@media (max-width: 960px) {
	.Sidebar {
		display: none;
	}

	.Content-Wrapper {
		margin-left: 0;
	}

	.Header {
		padding: 0 16px;
		padding-top: 20px;
		padding-bottom: 20px;
		flex-wrap: wrap;
		align-content: flex-start;
	}

	.TitlePNG {
		height: 28px;
		max-width: 150px;
		position: static;
		transform: none;
	}

	.Header .Right-Links {
		flex: 0 0 100%;
		height: var(--header-links-height);
		margin-left: 0;
		justify-content: flex-start;
		gap: 12px;
		padding: 0;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		touch-action: pan-x;
	}

	.Header .Right-Links::-webkit-scrollbar {
		display: none;
	}

	.BigTitle {
		display: none;
	}

	.ContentIntro {
		padding: 32px 20px;
	}

	.SidebarMenuButton {
		display: inline-flex;
		margin-left: auto;
	}

	.Footer {
		background-color: var(--vp-c-bg-alt);
	}

	html.SidebarOpen,
	html.SidebarOpen body {
		overflow: hidden;
	}

	html.SidebarOpen .SidebarBackdrop {
		display: block;
	}

	html.SidebarOpen .Sidebar {
		display: block;
		z-index: 95;
		width: min(86vw, var(--sidebar-width));
		box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
	}
}

.markdown-body {
	word-wrap: break-word;
	color: var(--vp-c-text-1);
	font-size: 16px;
	line-height: 1.85;
	letter-spacing: 0.01em;
}

.markdown-body ul,
.markdown-body ol {
	padding-left: 1.5em;
	margin-bottom: 16px;
	margin-top: 8px;
}

.markdown-body li {
	margin-bottom: 6px;
	line-height: 1.8;
}

.markdown-body blockquote {
	margin: 24px 0;
	padding: 16px 20px;
	color: var(--vp-c-text-2);
	border-left: 4px solid var(--vp-c-brand);
	/* 使用品牌色 */
	background: var(--vp-c-bg-alt);
	/* 添加背景色 */
	border-radius: 0 4px 4px 0;
}

/* 行内代码 */
.markdown-body code {
	font-family:
		"SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
	font-size: 0.9em;
	padding: 3px 6px;
	border-radius: 6px;
	background-color: var(--vp-c-bg-mute);
	/* 稍微加深背景 */
	color: var(--vp-c-text-code);
	/* 使用特定的代码颜色提升辨识度 */
	font-weight: 500;
}

.markdown-body pre {
	padding: 24px;
	border-radius: 12px;
	/* 更大的圆角 */
	margin: 24px 0;
	overflow-x: auto;
	background-color: var(--vp-c-bg-soft);
	/* 类似 GitHub 的代码块背景 */
	border: 1px solid var(--vp-c-border);
	/* 细边框 */
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.markdown-body pre code {
	padding: 0;
	background-color: transparent;
	color: inherit;
	font-size: 14px;
}

.markdown-body table {
	width: fit-content;
	margin: 24px 0;
	border-collapse: separate;
	/* 为了圆角效果 */
	border-spacing: 0;
	display: block;
	overflow-x: auto;
	border-radius: 8px;
	/* 表格圆角 */
	border: 1px solid var(--vp-c-border);
	max-width: 100%;
}

.markdown-body table th,
.markdown-body table td {
	padding: 12px 16px;
	border: 1px solid var(--vp-c-border);
	border-left: none;
	border-top: none;
}

.markdown-body table th:first-child,
.markdown-body table td:first-child {
	border-left: none;
}

/* 修复边框重叠问题，保持简洁 */
.markdown-body table th,
.markdown-body table td {
	border-width: 0 0 1px 1px;
}

.markdown-body table tr:last-child td {
	border-bottom: none;
}

.markdown-body table th {
	font-weight: 600;
	background-color: var(--vp-c-bg-soft);
	/* 表头背景 */
	color: var(--vp-c-text-1);
}

.markdown-body table tr:nth-child(2n) {
	background-color: var(--vp-c-bg);
	/* 移除原来的条纹，保持干净 */
}

.markdown-body table tr:hover {
	background-color: var(--vp-c-bg-soft);
	/* 悬停高亮 */
}

.markdown-body img {
	max-width: 100%;
	border-radius: 12px;
	/* 图片圆角 */
	margin: 24px auto;
	display: block;
	box-shadow: var(--vp-c-shadow-2);
	/* 图片阴影 */
	transition: transform 0.3s ease;
}

.markdown-body img:hover {
	transform: scale(1.01);
	/* 图片轻微放大互动 */
}

.markdown-body hr {
	border: none;
	border-top: 1px solid var(--vp-c-border);
	margin: 24px 0;
}

.markdown-body a {
	color: var(--vp-c-brand);
	font-weight: 500;
	text-decoration: none;
	/* 默认无下划线 */
	border-bottom: 1px solid transparent;
	/* 使用边框模拟下划线动画 */
	text-decoration-color: transparent;
	transition: all 0.2s;
}

.markdown-body a:hover {
	color: var(--vp-c-brand-light);
	border-bottom-color: var(--vp-c-brand-light);
}

/* ===== Part 3: Wiki Apple 风格覆盖 ===== */

:root {
	--vp-c-bg: #ffffff;
	/* Apple 文档页纯白背景 */
	--vp-c-bg-alt: rgba(246, 246, 247, 0.85);
	--vp-c-text-1: #1d1d1f;
	/* Apple 近黑正文 */
	--vp-c-text-2: #6e6e73;
	/* Apple 次级灰 */
	--vp-c-brand: #0071e3;
	/* Apple 蓝 */
	--vp-c-brand-light: #0077ed;
	--vp-c-border: rgba(0, 0, 0, 0.08);
	--vp-c-divider: rgba(0, 0, 0, 0.06);
	--vp-c-bg-header: rgba(251, 251, 253, 0.78);
	--vp-c-bg-soft: #ffffff;
	/* 内容卡片 */
	--vp-c-bg-mute: rgba(0, 0, 0, 0.04);
	--vp-c-bg-hover: rgba(0, 0, 0, 0.05);
	--vp-c-bg-active: rgba(0, 113, 227, 0.1);
	--vp-c-text-code: #c0392b;
	--vp-c-logo-bg: transparent;
	--vp-c-shadow-1: 0 1px 3px rgba(0, 0, 0, 0.06);
	--vp-c-shadow-2: 0 6px 20px rgba(0, 0, 0, 0.06);
	--vp-c-shadow-3: 0 20px 60px rgba(0, 0, 0, 0.12);
	--vp-font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
		"SF Pro Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB",
		"Microsoft YaHei", "Segoe UI", sans-serif;
	/* 正文阅读色：比次级灰更深的可读灰 */
	--apple-body: #424245;
	/* 页脚背景：独立浅灰块，与白色内容区分界 */
	--vp-c-footer-bg: #f5f5f7;
}

@media (prefers-color-scheme: dark) {
	:root {
		--vp-c-bg: #000000;
		--vp-c-bg-alt: rgba(28, 28, 30, 0.75);
		--vp-c-text-1: #f5f5f7;
		--vp-c-text-2: #86868b;
		--vp-c-brand: #2997ff;
		--vp-c-brand-light: #0071e3;
		--vp-c-border: rgba(255, 255, 255, 0.14);
		--vp-c-divider: rgba(255, 255, 255, 0.08);
		--vp-c-bg-header: rgba(22, 22, 23, 0.72);
		--vp-c-bg-soft: #1d1d1f;
		--vp-c-bg-mute: rgba(255, 255, 255, 0.06);
		--vp-c-bg-hover: rgba(255, 255, 255, 0.08);
		--vp-c-bg-active: rgba(41, 151, 255, 0.18);
		--vp-c-text-code: #ff9f0a;
		--vp-c-logo-bg: transparent;
		--apple-body: #d2d2d7;
		--vp-c-footer-bg: #161617;
	}
}

/* ---------- 基础排版 ---------- */
body {
	font-family: var(--vp-font-family);
	background-color: var(--vp-c-bg);
	background-image: none;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

a:focus-visible,
button:focus-visible {
	outline: 2px solid var(--vp-c-brand);
	outline-offset: 2px;
}

.markdown-body h1 {
	display: block !important;
	font-size: 44px;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.15;
	margin-top: 8px;
	margin-bottom: 40px;
}

/* 仅 wiki 页面标题居中；Main 文档页（服务条款、隐私政策等）保持左对齐 */
.wiki-page .markdown-body h1 {
	text-align: center;
	width: 100%;
}

/* 文档页页头：标题与「最后更新时间」统一为整体 */
.ContentIntro h1:has(+ .DocMeta) {
	margin-bottom: 14px;
}

.ContentIntro .DocMeta {
	font-size: 14px;
	line-height: 1.6;
	color: var(--vp-c-text-2);
	margin: 4px 0 36px;
}

.ContentIntro .DocMeta b,
.ContentIntro .DocMeta strong {
	font-weight: 500;
	color: var(--vp-c-text-2);
}

/* 顶栏右侧链接仅在本站 wiki 页面隐藏（Main 文档页仍需保留顶部导航）；
   必须与 litepress 的选择器同级并加 !important */
.wiki-page .Header .Right-Links {
	display: none !important;
}

/* 移动端：顶栏导航链接移入侧边栏后的样式 */
.Sidebar-HeaderLinks {
	display: block;
	padding: 4px 4px 16px;
	margin-bottom: 8px;
	border-bottom: 1px solid var(--vp-c-divider);
}

.Sidebar-HeaderLinks .HeaderLinkItem {
	display: block;
	font-size: 15px;
	color: var(--vp-c-text-1);
	padding: 8px 12px;
	border-radius: 10px;
	margin-bottom: 2px;
	transition: color 0.2s, background-color 0.2s;
}

.Sidebar-HeaderLinks .HeaderLinkItem:hover {
	color: var(--vp-c-brand);
	background-color: var(--vp-c-bg-hover);
}

/* 桌面端隐藏侧边栏的页面（侧边栏仅作移动端抽屉使用） */
@media (min-width: 961px) {
	.no-desktop-sidebar .Sidebar {
		display: none !important;
	}
}

/* ---------- MathJax 公式全局重置，隔离页面 CSS 干扰 ---------- */
mjx-container,
mjx-container * {
	box-sizing: content-box !important;
	line-height: normal !important;
	letter-spacing: normal !important;
	user-select: text !important;
	font-style: normal !important;
	font-weight: normal !important;
	text-transform: none !important;
	word-spacing: normal !important;
	text-indent: 0 !important;
	white-space: normal !important;
}

/* 修复 MathJax 中文 mtext 渲染：使用页面字体 */
mjx-utext {
	font-family: var(--vp-font-family) !important;
	font-size: 100% !important;
	padding: 0 !important;
}

/* ---------- 顶部导航（Apple 毛玻璃导航栏） ---------- */
.Header {
	height: 70px;
	min-height: 70px;
	background-color: var(--vp-c-bg-header);
	backdrop-filter: saturate(180%) blur(20px);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	border-bottom: 1px solid var(--vp-c-border);
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

.TitlePNG {
	height: 30px;
	padding: 0;
	background: transparent;
	border-radius: 6px;
	position: absolute;
	left: 50%;
	transform: translate(-50%, -50%);
	opacity: 0.92;
	transition: opacity 0.3s;
}

.TitlePNG:hover {
	opacity: 1;
}

.BigTitle {
	font-size: 15px;
	font-weight: 500;
	color: var(--vp-c-text-2);
	letter-spacing: -0.01em;
	margin-left: 4px;
}

/* ---------- 布局：内容主体 = Apple 文档式纯净阅读区（无卡片） ---------- */
.Layout {
	padding-top: 70px !important;
}

.Sidebar {
	top: 70px;
	background-color: var(--vp-c-bg-alt);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border-right: 1px solid var(--vp-c-border);
	padding: 28px 18px;
}

.SidebarBackdrop {
	top: 70px;
}

.Sidebar-Title {
	font-size: 13px;
	font-weight: 600;
	color: var(--vp-c-text-2);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding-left: 12px;
	margin-top: 20px;
}

.Sidebar-Link {
	font-size: 15px;
	color: var(--vp-c-text-1);
	border-radius: 10px;
	padding: 8px 12px;
	margin-bottom: 2px;
	transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.Sidebar-Link:hover {
	color: var(--vp-c-brand);
	background-color: var(--vp-c-bg-hover);
	transform: none;
}

.Sidebar-Link.active {
	color: var(--vp-c-brand);
	background-color: var(--vp-c-bg-active);
	box-shadow: none;
	font-weight: 500;
}

.ContentIntro {
	/* 无背景、无边框、无阴影，内容直接铺在纯白背景上，如 Apple 文档页 */
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	padding: 56px 48px 32px;
	margin: 0 auto 48px;
}

/* ---------- 正文排版（Apple 阅读体验） ---------- */
.markdown-body {
	font-size: 16.5px;
	line-height: 1.8;
	color: var(--vp-c-text-1);
}

.markdown-body p {
	font-size: 17px;
	line-height: 1.8;
	color: var(--apple-body);
	margin-bottom: 20px;
}

.markdown-body li {
	color: var(--apple-body);
}

.markdown-body h2 {
	font-size: 28px;
	font-weight: 700;
	letter-spacing: -0.012em;
	line-height: 1.25;
	border-top: none;
	padding-top: 0;
	margin-top: 48px;
	margin-bottom: 18px;
	color: var(--vp-c-text-1);
}

.markdown-body h3 {
	font-size: 21px;
	font-weight: 600;
	letter-spacing: -0.008em;
	margin-top: 32px;
	margin-bottom: 12px;
	color: var(--vp-c-text-1);
}

.markdown-body h4 {
	font-size: 17px;
	font-weight: 600;
	color: var(--vp-c-text-1);
}

.markdown-body a {
	color: var(--vp-c-brand);
	font-weight: 500;
	border-bottom: none;
}

.markdown-body a:hover {
	color: var(--vp-c-brand-light);
	border-bottom: none;
}

.markdown-body blockquote {
	margin: 28px 0;
	padding: 18px 24px;
	color: var(--apple-body);
	border-left: 3px solid var(--vp-c-brand);
	background: var(--vp-c-bg-mute);
	border-radius: 12px;
}

.markdown-body code {
	font-family: "SFMono-Regular", ui-monospace, SFMono-Regular, Menlo,
		Consolas, "Liberation Mono", monospace;
	font-size: 0.88em;
	padding: 3px 7px;
	border-radius: 6px;
	background-color: var(--vp-c-bg-mute);
	color: var(--vp-c-text-code);
	font-weight: 500;
}

.markdown-body pre {
	padding: 24px;
	border-radius: 14px;
	margin: 24px 0;
	background-color: var(--vp-c-bg-mute);
	border: 1px solid var(--vp-c-border);
	box-shadow: none;
}

.markdown-body pre code {
	padding: 0;
	background: transparent;
	color: var(--vp-c-text-1);
	font-size: 14px;
	font-weight: 400;
}

.markdown-body table {
	border-radius: 12px;
	border: 1px solid var(--vp-c-border);
	box-shadow: var(--vp-c-shadow-1);
}

.markdown-body table th {
	background-color: var(--vp-c-bg-mute);
	color: var(--vp-c-text-1);
}

.markdown-body img {
	border-radius: 14px;
	box-shadow: var(--vp-c-shadow-2);
}

.markdown-body img:hover {
	transform: none;
}

/* ============ 阅读进度条 ============ */
.ReadingProgress {
	position: fixed;
	top: 0;
	left: 0;
	height: 3px;
	background: linear-gradient(90deg,
			var(--vp-c-brand),
			var(--vp-c-brand-light));
	z-index: 200;
	width: 0%;
	transition: width 0.15s linear;
	border-radius: 0 2px 2px 0;
}

/* ============ 加载动画 ============ */
.LoadingSpinner {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 80px 20px;
	color: var(--vp-c-text-2);
	gap: 16px;
}

.LoadingSpinner .spinner {
	width: 36px;
	height: 36px;
	border: 3px solid var(--vp-c-border);
	border-top-color: var(--vp-c-brand);
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.LoadingSpinner .spinner-text {
	font-size: 14px;
	letter-spacing: 0.02em;
}

/* ============ 错误状态 ============ */
.ErrorState {
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 80px 20px;
	text-align: center;
	color: var(--vp-c-text-2);
	gap: 12px;
}

.ErrorState .error-icon {
	font-size: 48px;
	line-height: 1;
	margin-bottom: 8px;
}

.ErrorState .error-title {
	font-size: 20px;
	font-weight: 700;
	color: var(--vp-c-text-1);
}

.ErrorState .error-detail {
	font-size: 14px;
	max-width: 480px;
	line-height: 1.6;
}

.ErrorState .error-retry {
	margin-top: 12px;
	padding: 8px 28px;
	border: none;
	border-radius: 980px;
	background: var(--vp-c-brand);
	color: #fff;
	cursor: pointer;
	font-size: 14px;
	font-family: inherit;
	transition: background 0.2s;
}

.ErrorState .error-retry:hover {
	background: var(--vp-c-brand-light);
}

/* ============ 回到顶部（Apple 圆形毛玻璃按钮） ============ */
.BackToTop {
	position: fixed;
	bottom: 32px;
	right: 32px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid var(--vp-c-border);
	background: var(--vp-c-bg-header);
	backdrop-filter: blur(12px) saturate(180%);
	-webkit-backdrop-filter: blur(12px) saturate(180%);
	color: var(--vp-c-text-2);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 50;
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition:
		opacity 0.3s,
		visibility 0.3s,
		transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
		background 0.2s;
	box-shadow: var(--vp-c-shadow-2);
}

.BackToTop.visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.BackToTop:hover {
	background: var(--vp-c-bg-hover);
	color: var(--vp-c-brand);
	transform: translateY(-2px);
}

.BackToTop .arrow {
	width: 10px;
	height: 10px;
	border-left: 2px solid currentColor;
	border-top: 2px solid currentColor;
	transform: rotate(45deg) translate(2px, 2px);
}

/* ============ 代码块复制按钮（Apple 胶囊按钮） ============ */
.CodeBlockWrapper {
	position: relative;
}

.CodeBlockWrapper .copy-btn {
	position: absolute;
	top: 10px;
	right: 10px;
	padding: 4px 14px;
	font-size: 12px;
	font-family: inherit;
	border: 1px solid var(--vp-c-border);
	border-radius: 980px;
	background: var(--vp-c-bg-header);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: var(--vp-c-text-2);
	cursor: pointer;
	opacity: 0;
	transition:
		opacity 0.2s,
		background 0.2s,
		color 0.2s;
	z-index: 1;
}

.CodeBlockWrapper:hover .copy-btn {
	opacity: 1;
}

.CodeBlockWrapper .copy-btn:hover {
	background: var(--vp-c-bg-hover);
	color: var(--vp-c-text-1);
}

.CodeBlockWrapper .copy-btn.copied {
	color: #34c759;
	border-color: rgba(52, 199, 89, 0.4);
}

.CodeBlockWrapper pre {
	margin: 0;
}

/* 触屏设备上复制按钮常显 */
@media (hover: none) {
	.CodeBlockWrapper .copy-btn {
		opacity: 1;
	}
}

/* ============ Badge 链接（B站、GitHub 等外部链接标签） ============ */
.BadgeLink {
	font-weight: 500;
}

.BadgeLink .badge-icon,
.markdown-body .BadgeLink .badge-icon {
	display: inline;
	width: 1em;
	height: 1em;
	margin: 0 3px 0 0 !important;
	vertical-align: -1px;
	border-radius: 0 !important;
	box-shadow: none !important;
	cursor: pointer;
}

/* 段落中与文字混排的行内图片去掉大图样式；独占行的图片不受影响 */
.markdown-body p>img:not(.badge-icon):not(:only-child) {
	display: inline;
	margin: 0 4px;
	border-radius: 3px;
	box-shadow: none;
	vertical-align: middle;
	max-height: 1.2em;
}

.markdown-body p>img:not(.badge-icon):not(:only-child):hover {
	transform: none;
}

/* ============ 图片容器 ============ */
.markdown-body img {
	cursor: zoom-in;
}

/* ============ 页脚（Apple 极简页脚） ============ */
.Footer {
	width: 100%;
	max-width: 100%;
	padding: 40px 48px;
	background: var(--vp-c-footer-bg);
	border-top: 1px solid var(--vp-c-border);
	margin-top: auto;
	color: var(--vp-c-text-2);
	font-size: 13px;
	text-align: center;
}

.Footer .Left,
.Footer .Right {
	text-align: left;
}

/* 页脚链接区（Apple 居中链接组） */
.Footer .Footer-Links {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 32px 48px;
	margin: 28px 0 32px;
	text-align: left;
}

.Footer .Footer-LinkGroup {
	min-width: 160px;
}

.Footer .Footer-LinkTitle {
	color: var(--vp-c-text-1);
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 12px;
}

.Footer .Footer-LinkGroup a {
	display: block;
	color: var(--vp-c-text-2);
	margin-bottom: 8px;
	transition: color 0.2s;
}

.Footer .Footer-LinkGroup a:hover {
	color: var(--vp-c-brand);
}

/* 页脚底部法律信息条 */
.Footer .Footer-Legal {
	margin-top: 8px;
	padding-top: 24px;
	border-top: 1px solid var(--vp-c-divider);
	font-size: 12px;
	line-height: 1.7;
	color: var(--vp-c-text-2);
}

.Footer .Footer-Legal a {
	color: var(--vp-c-text-2);
	text-decoration: none;
}

.Footer .Footer-Legal a:hover {
	color: var(--vp-c-brand);
}

.Footer .Footer-Legal p {
	margin: 6px 0 0;
	font-size: 12px;
}

/* ============ 移动端调整 ============ */
@media (max-width: 960px) {
	.Header {
		padding: 0 16px;
		padding-top: 20px;
		padding-bottom: 20px;
	}

	.TitlePNG {
		height: 28px;
		max-width: 150px;
		position: static;
		transform: none;
	}

	.ContentIntro {
		padding: 32px 20px 24px;
		margin: 0 auto 40px;
	}

	.markdown-body h1 {
		font-size: 32px;
	}

	.Footer .Footer-Links {
		flex-direction: column;
		align-items: center;
		gap: 32px;
	}

	.Footer .Footer-LinkGroup {
		text-align: center;
	}

	.BackToTop {
		bottom: 20px;
		right: 16px;
		width: 40px;
		height: 40px;
	}

	.ReadingProgress {
		height: 2px;
	}

	/* 移动端侧边栏抽屉：滑入动画 + 遮罩淡入 */
	.Sidebar {
		display: block !important;
		transform: translateX(-100%);
		box-shadow: none;
		transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
			background-color 0.3s,
			border-color 0.3s;
		will-change: transform;
	}

	html.SidebarOpen .Sidebar {
		transform: translateX(0);
		box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
	}

	.SidebarBackdrop {
		display: block !important;
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.35s ease;
	}

	html.SidebarOpen .SidebarBackdrop {
		opacity: 1;
		pointer-events: auto;
	}
}