/*
Theme Name: HeiSeJiDi
Theme URI: https://hei.hosts.run
Author: HeiSeJiDi
Author URI: https://hei.hosts.run
Description: 黑色主色调、大气现代的 WordPress 博客主题。默认日间白色主题，支持日/夜双模式切换（本地记忆）。内置首页 TDK 独立设置、全套 SEO 输出、后台主菜单管理、全站移动端自适应。零第三方库、零 CDN 依赖。
Version: 2.5.5
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: heisejidi
Tags: blog, two-columns, custom-logo, custom-menu, dark, responsive-layout
*/

/* =========================================================
   1. 设计令牌 —— 夜间（黑）主题变量基准
   ========================================================= */
:root {
	color-scheme: dark;

	/* 基础表面 */
	--bg: #08080b;
	--bg-elev: #0c0c11;
	--card: #0e0e14;
	--card-2: #13131a;
	--card-hover: #14141c;

	/* 描边 */
	--border: rgba(255, 255, 255, 0.07);
	--border-strong: rgba(255, 255, 255, 0.13);

	/* 文字 */
	--text: #f2f3f6;
	--text-dim: #a3a5b4;
	--text-faint: #676973;

	/* 品牌色 */
	--accent: #8b7bff;
	--accent-2: #4cc2ff;
	--accent-soft: rgba(139, 123, 255, 0.12);
	--grad: linear-gradient(120deg, #8b7bff 0%, #5a8dff 55%, #4cc2ff 100%);
	--grad-text: linear-gradient(120deg, #a99bff 0%, #6fa0ff 50%, #5fd4ff 100%);

	/* 阴影 */
	--shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
	--shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
	--shadow-glow: 0 10px 34px rgba(122, 108, 255, 0.16);

	/* 几何 */
	--radius: 18px;
	--radius-sm: 12px;
	--radius-xs: 8px;
	--container: 1200px;
	--header-h: 68px;

	/* 头部玻璃 */
	--glass: rgba(8, 8, 11, 0.72);
	--glass-strong: rgba(8, 8, 11, 0.92);

	/* 精致度补充令牌 */
	--sheen: rgba(255, 255, 255, 0.045);
	--zebra: rgba(255, 255, 255, 0.028);
	--shadow-header: 0 12px 32px rgba(0, 0, 0, 0.38);
}

/* 日间主题覆盖 */
[data-theme="light"] {
	color-scheme: light;

	--bg: #f6f7fa;
	--bg-elev: #eef0f5;
	--card: #ffffff;
	--card-2: #f4f5f9;
	--card-hover: #ffffff;

	--border: rgba(15, 23, 42, 0.08);
	--border-strong: rgba(15, 23, 42, 0.16);

	--text: #101426;
	--text-dim: #565e75;
	--text-faint: #8b93a8;

	--accent: #6a5cf0;
	--accent-2: #0d9de0;
	--accent-soft: rgba(106, 92, 240, 0.09);
	--grad: linear-gradient(120deg, #6a5cf0 0%, #4076f0 55%, #0d9de0 100%);
	--grad-text: linear-gradient(120deg, #6a5cf0 0%, #4076f0 50%, #0d9de0 100%);

	--shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.06);
	--shadow: 0 18px 44px rgba(15, 23, 42, 0.1);
	--shadow-glow: 0 10px 30px rgba(106, 92, 240, 0.14);

	--glass: rgba(255, 255, 255, 0.78);
	--glass-strong: rgba(255, 255, 255, 0.94);

	/* 精致度补充令牌 */
	--sheen: rgba(255, 255, 255, 0.65);
	--zebra: rgba(15, 23, 42, 0.03);
	--shadow-header: 0 12px 28px rgba(15, 23, 42, 0.08);
}

/* =========================================================
   2. 基础重置
   ========================================================= */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
	font-size: 16px;
	line-height: 1.72;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
	transition: background-color 0.3s ease, color 0.3s ease;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
	color: var(--accent);
}

ul, ol {
	margin: 0;
	padding: 0;
}

li {
	list-style: none;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 0.5em;
	line-height: 1.28;
	font-weight: 800;
	letter-spacing: -0.015em;
	color: var(--text);
}

p {
	margin: 0 0 1.1em;
}

button {
	font-family: inherit;
}

::selection {
	background: rgba(122, 108, 255, 0.35);
	color: #fff;
}

/* 滚动条随主题 */
::-webkit-scrollbar {
	width: 10px;
	height: 10px;
}
::-webkit-scrollbar-track {
	background: transparent;
}
::-webkit-scrollbar-thumb {
	background: var(--border-strong);
	border-radius: 8px;
	border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
	background: var(--text-faint);
}

/* 无障碍 */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	word-wrap: normal !important;
}

.skip-link {
	position: absolute;
	left: -9999px;
	z-index: 999;
}
.skip-link:focus {
	left: 16px;
	top: 12px;
	background: var(--card-2);
	color: var(--text);
	padding: 10px 18px;
	border-radius: var(--radius-xs);
	border: 1px solid var(--border-strong);
	clip: auto;
	clip-path: none;
	width: auto;
	height: auto;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
	border-radius: 4px;
}

/* =========================================================
   3. 布局容器
   ========================================================= */
.container {
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: 24px;
}

.container-narrow {
	max-width: 768px;
	margin-inline: auto;
	padding-inline: 24px;
}

.layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 312px;
	gap: 40px;
	align-items: start;
	padding-block: 18px 80px;
}

/* =========================================================
   4. 阅读进度条（仅文章页）
   ========================================================= */
.progress-bar {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	z-index: 200;
	background: var(--grad);
	transform-origin: 0 50%;
	transform: scaleX(0);
	pointer-events: none;
}

body.single .progress-bar {
	display: block;
}

/* =========================================================
   5. 头部导航
   ========================================================= */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--glass);
	backdrop-filter: blur(18px) saturate(1.4);
	-webkit-backdrop-filter: blur(18px) saturate(1.4);
	border-bottom: 1px solid transparent;
	transition: border-color 0.3s ease, background-color 0.3s ease;
}

.site-header.is-scrolled {
	border-bottom-color: var(--border);
	background: var(--glass-strong);
	box-shadow: var(--shadow-header);
}

.header-inner {
	display: flex;
	align-items: center;
	gap: 28px;
	height: var(--header-h);
}

.branding {
	flex-shrink: 0;
	display: flex;
	align-items: center;
}

.site-brand {
	display: inline-flex;
	align-items: center;
	gap: 11px;
	font-size: 1.22rem;
	font-weight: 800;
	letter-spacing: 0.01em;
}

.brand-dot {
	width: 11px;
	height: 11px;
	border-radius: 4px;
	background: var(--grad);
	box-shadow: 0 0 16px rgba(122, 108, 255, 0.75);
	transition: transform 0.3s ease;
}

.site-brand:hover .brand-dot {
	transform: rotate(90deg) scale(1.1);
}

.custom-logo-link img {
	max-height: 40px;
	width: auto;
}

.primary-nav {
	flex: 1;
	min-width: 0;
}

.nav-list {
	display: flex;
	align-items: center;
	gap: 2px;
}

.nav-list li {
	position: relative;
}

.nav-list a,
.nav-list .page_item a {
	display: inline-block;
	padding: 8px 15px;
	border-radius: 999px;
	color: var(--text-dim);
	font-size: 0.94rem;
	font-weight: 550;
	white-space: nowrap;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-list a:hover {
	color: var(--text);
	background: var(--accent-soft);
}

.nav-list .current-menu-item > a,
.nav-list .is-active > a,
.nav-list li.current_page_item > a {
	color: var(--accent);
	background: var(--accent-soft);
	font-weight: 650;
}

/* 二级菜单 */
.nav-list .sub-menu,
.nav-list .children {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	min-width: 190px;
	background: var(--card-2);
	border: 1px solid var(--border-strong);
	border-radius: 14px;
	padding: 7px;
	box-shadow: var(--shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: all 0.22s ease;
	z-index: 20;
}

.nav-list li:hover > .sub-menu,
.nav-list li:hover > .children,
.nav-list li:focus-within > .sub-menu,
.nav-list li:focus-within > .children {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.nav-list .sub-menu a,
.nav-list .children a {
	display: block;
	padding: 10px 13px;
	border-radius: 9px;
	font-size: 0.9rem;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
	margin-left: auto;
}

.icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid transparent;
	border-radius: 12px;
	background: transparent;
	color: var(--text-dim);
	cursor: pointer;
	transition: all 0.22s ease;
}

.icon-btn:hover {
	background: var(--accent-soft);
	border-color: var(--border);
	color: var(--text);
}

.icon-btn svg {
	width: 19px;
	height: 19px;
}

/* 主题切换按钮：夜间显示太阳、日间显示月亮 */
.theme-toggle .icon-sun { display: block; }
.theme-toggle .icon-moon { display: none; }

[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

.nav-toggle {
	display: none;
}

/* 移动端抽屉 */
.mobile-nav {
	display: none;
	position: fixed;
	top: var(--header-h);
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--glass-strong);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	padding: 26px 22px calc(26px + env(safe-area-inset-bottom));
	overflow-y: auto;
	z-index: 99;
}

body.nav-open .mobile-nav {
	display: block;
	animation: fadeDown 0.25s ease;
}

.mobile-nav .nav-list {
	flex-direction: column;
	align-items: stretch;
	gap: 6px;
}

.mobile-nav .nav-list a {
	display: block;
	padding: 14px 18px;
	font-size: 1.05rem;
	border-radius: 14px;
}

body.nav-open {
	overflow: hidden;
}

@keyframes fadeDown {
	from { opacity: 0; transform: translateY(-10px); }
	to { opacity: 1; transform: translateY(0); }
}

/* 抽屉菜单项依次入场 */
body.nav-open .mobile-nav .nav-list > li {
	animation: fadeDown 0.32s ease backwards;
}

body.nav-open .mobile-nav .nav-list > li:nth-child(1) { animation-delay: 0.02s; }
body.nav-open .mobile-nav .nav-list > li:nth-child(2) { animation-delay: 0.05s; }
body.nav-open .mobile-nav .nav-list > li:nth-child(3) { animation-delay: 0.08s; }
body.nav-open .mobile-nav .nav-list > li:nth-child(4) { animation-delay: 0.11s; }
body.nav-open .mobile-nav .nav-list > li:nth-child(5) { animation-delay: 0.14s; }
body.nav-open .mobile-nav .nav-list > li:nth-child(6) { animation-delay: 0.17s; }
body.nav-open .mobile-nav .nav-list > li:nth-child(7) { animation-delay: 0.2s; }
body.nav-open .mobile-nav .nav-list > li:nth-child(8) { animation-delay: 0.23s; }
body.nav-open .mobile-nav .nav-list > li:nth-child(9) { animation-delay: 0.26s; }
body.nav-open .mobile-nav .nav-list > li:nth-child(10) { animation-delay: 0.29s; }
body.nav-open .mobile-nav .nav-list > li:nth-child(11) { animation-delay: 0.32s; }
body.nav-open .mobile-nav .nav-list > li:nth-child(n+12) { animation-delay: 0.35s; }

/* =========================================================
   6. 首页 Hero
   ========================================================= */
.hero {
	position: relative;
	padding: 88px 0 42px;
	overflow: hidden;
}

.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(720px 340px at 12% -6%, rgba(122, 108, 255, 0.2), transparent 65%),
		radial-gradient(640px 320px at 88% -4%, rgba(76, 194, 255, 0.14), transparent 65%),
		radial-gradient(1000px 480px at 50% 118%, rgba(122, 108, 255, 0.09), transparent 70%);
	pointer-events: none;
}

[data-theme="light"] .hero::before {
	background:
		radial-gradient(720px 340px at 12% -6%, rgba(106, 92, 240, 0.1), transparent 65%),
		radial-gradient(640px 320px at 88% -4%, rgba(13, 157, 224, 0.08), transparent 65%);
}

.hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: linear-gradient(var(--border) 1px, transparent 1px),
		linear-gradient(90deg, var(--border) 1px, transparent 1px);
	background-size: 46px 46px;
	mask-image: radial-gradient(ellipse 85% 68% at 50% 0%, #000 25%, transparent 72%);
	-webkit-mask-image: radial-gradient(ellipse 85% 68% at 50% 0%, #000 25%, transparent 72%);
	pointer-events: none;
}

.hero .container {
	position: relative;
	z-index: 1;
}

/* 紧凑版 Hero（论坛页） */
.hero-compact {
	padding: 52px 0 44px;
}

.hero-compact .hero-title {
	font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.hero-compact .hero-sub {
	margin-bottom: 20px;
}

.hero-kicker {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--text-faint);
	margin-bottom: 20px;
}

.hero-kicker::before {
	content: "";
	width: 30px;
	height: 2px;
	border-radius: 2px;
	background: var(--grad);
}

.hero-title {
	font-size: clamp(2.2rem, 5.4vw, 3.8rem);
	font-weight: 800;
	line-height: 1.14;
	letter-spacing: -0.03em;
	max-width: 840px;
	margin-bottom: 16px;
}

.hero-sub {
	font-size: 1.1rem;
	color: var(--text-dim);
	max-width: 620px;
	margin-bottom: 28px;
}

/* 横幅介绍（支持 HTML） */
.hero-panels {
	display: grid;
	grid-template-columns: 1.12fr 1fr;
	gap: 18px;
	margin-top: 30px;
	align-items: stretch;
}

.hero-intro {
	height: 100%;
	padding: 22px 26px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--text-dim);
	font-size: 0.95rem;
	line-height: 1.85;
	position: relative;
	overflow: hidden;
	transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* 首页幻灯片 */
.hero-panels.no-slider {
	grid-template-columns: 1fr;
}

.hero-slider {
	position: relative;
	overflow: hidden;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	aspect-ratio: 16 / 10;
	transition: background-color 0.3s ease, border-color 0.3s ease;
}

.hero-slider::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: var(--grad);
	opacity: 0.7;
	z-index: 3;
}

.hero-intro:hover,
.hero-slider:hover {
	border-color: var(--border-strong);
}

.hsl-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.6s ease;
	pointer-events: none;
}

.hsl-slide.is-active {
	opacity: 1;
	pointer-events: auto;
}

.hsl-slide img,
.hsl-slide a {
	display: block;
	width: 100%;
	height: 100%;
}

.hsl-slide img {
	object-fit: cover;
}

.hsl-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	margin: 0;
	padding: 34px 16px 12px;
	color: #fff;
	font-size: 0.85rem;
	font-weight: 600;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 100%);
}

.hsl-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 4;
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(15, 23, 42, 0.35);
	color: #fff;
	font-size: 1.2rem;
	line-height: 1;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.25s ease, background-color 0.25s ease;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.hsl-prev {
	left: 10px;
}

.hsl-next {
	right: 10px;
}

.hero-slider:hover .hsl-arrow,
.hsl-arrow:focus-visible {
	opacity: 1;
}

.hsl-arrow:hover {
	background: rgba(15, 23, 42, 0.6);
}

.hsl-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 10px;
	z-index: 4;
	display: flex;
	justify-content: center;
	gap: 7px;
}

.hsl-dot {
	width: 7px;
	height: 7px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.45);
	cursor: pointer;
	transition: background-color 0.25s ease, transform 0.25s ease;
}

.hsl-dot.is-active {
	background: #fff;
	transform: scale(1.25);
}

.hero-intro::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: var(--grad);
	opacity: 0.7;
}

.hero-intro > p:last-child {
	margin-bottom: 0;
}

.hero-intro strong {
	color: var(--text);
	font-weight: 700;
}

.hero-intro a {
	color: var(--accent);
	text-decoration: underline;
	text-decoration-color: rgba(122, 108, 255, 0.4);
	text-underline-offset: 3px;
	transition: text-decoration-color 0.2s ease;
}

.hero-intro a:hover {
	text-decoration-color: var(--accent);
}

.hero-intro ul {
	margin-block: 0 1em;
	padding: 0;
}

.hero-intro ul li {
	list-style: none;
	position: relative;
	padding-left: 20px;
	margin-bottom: 7px;
}

.hero-intro ul li:last-child {
	margin-bottom: 0;
}

.hero-intro ul li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 0.68em;
	width: 8px;
	height: 8px;
	border-radius: 3px;
	background: var(--grad);
}

.hero-intro code {
	background: var(--accent-soft);
	color: var(--accent);
	padding: 2px 8px;
	border-radius: 6px;
	font-size: 0.85em;
}

/* =========================================================
   7. 区块标题
   ========================================================= */
.section {
	padding-block: 8px;
}

.section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
}

.section-title {
	font-size: 1.42rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	position: relative;
	padding-left: 18px;
	margin: 0;
}

.section-title::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 5px;
	height: 24px;
	border-radius: 5px;
	background: var(--grad);
}

.section-more {
	color: var(--text-faint);
	font-size: 0.9rem;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	transition: color 0.2s ease, gap 0.2s ease;
}

.section-more:hover {
	color: var(--accent);
	gap: 8px;
}

/* 列表页顶部 */
.page-head {
	padding: 76px 0 6px;
	position: relative;
}

.page-head::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(560px 260px at 10% 0%, rgba(122, 108, 255, 0.12), transparent 68%);
	pointer-events: none;
}

[data-theme="light"] .page-head::before {
	background: radial-gradient(560px 260px at 10% 0%, rgba(106, 92, 240, 0.07), transparent 68%);
}

.page-head .container {
	position: relative;
}

.page-title {
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	letter-spacing: -0.025em;
	margin-bottom: 10px;
}

.page-desc {
	color: var(--text-dim);
	margin: 0;
	max-width: 720px;
}

.page-count {
	color: var(--text-faint);
	font-size: 0.9rem;
	margin-top: 12px;
}

/* =========================================================
   8. 文章卡片（单列横向列表）
   ========================================================= */
.post-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 18px;
}

/* 相关文章区：窄容器内缩小横向缩略图 */
.related-posts .card-thumb {
	flex: 0 0 190px;
	max-width: 190px;
}

.post-card {
	position: relative;
	display: flex;
	flex-direction: row;
	align-items: stretch;
	background-color: var(--card);
	background-image: linear-gradient(180deg, var(--sheen), transparent 46%);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	animation: cardIn 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
	transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

@keyframes cardIn {
	from { opacity: 0; transform: translateY(14px); }
	to { opacity: 1; transform: none; }
}

.post-card:hover {
	transform: translateY(-4px);
	border-color: rgba(122, 108, 255, 0.4);
	background: var(--card-hover);
	box-shadow: var(--shadow-glow), var(--shadow);
}

.card-thumb {
	position: relative;
	display: block;
	flex: 0 0 300px;
	max-width: 300px;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--card-2);
}

.card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.post-card:hover .card-thumb img {
	transform: scale(1.06);
}

/* 缩略图上的柔和渐变遮罩 */
.card-thumb::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.28));
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.post-card:hover .card-thumb::after {
	opacity: 1;
}

.thumb-fallback {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 3rem;
	font-weight: 800;
	color: var(--text-faint);
	opacity: 0.6;
	text-shadow: 0 0 46px rgba(122, 108, 255, 0.4);
	background:
		radial-gradient(320px 190px at 28% 18%, rgba(122, 108, 255, 0.18), transparent 70%),
		radial-gradient(320px 190px at 80% 84%, rgba(76, 194, 255, 0.13), transparent 70%),
		var(--card-2);
}

.card-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 4px 13px;
	border-radius: 999px;
	font-size: 0.74rem;
	font-weight: 650;
	letter-spacing: 0.02em;
	color: #fff;
	background: rgba(8, 8, 12, 0.55);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.16);
	transition: background-color 0.2s ease;
}

.post-card:hover .card-badge {
	background: var(--grad);
	border-color: transparent;
}

.card-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 0;
	padding: 20px 22px 18px;
}

.card-title {
	font-size: 1.13rem;
	font-weight: 750;
	line-height: 1.42;
	letter-spacing: -0.01em;
	margin: 0 0 10px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.card-title a {
	transition: color 0.2s ease;
}

.post-card:hover .card-title a {
	background: var(--grad-text);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.card-excerpt {
	color: var(--text-dim);
	font-size: 0.92rem;
	line-height: 1.68;
	margin: 0 0 16px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.card-meta {
	margin-top: auto;
	display: flex;
	align-items: center;
	gap: 9px;
	color: var(--text-faint);
	font-size: 0.82rem;
}

.card-meta svg {
	width: 14px;
	height: 14px;
	vertical-align: -2px;
	margin-right: 4px;
}

.card-meta .meta-dot {
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: var(--text-faint);
	flex-shrink: 0;
}

/* =========================================================
   9. 分页
   ========================================================= */
.pagination,
.posts-navigation {
	margin-top: 44px;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.pagination .page-numbers,
.posts-navigation .nav-previous a,
.posts-navigation .nav-next a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 15px;
	border-radius: 13px;
	border: 1px solid var(--border);
	background: var(--card);
	color: var(--text-dim);
	font-size: 0.92rem;
	font-weight: 650;
	transition: all 0.22s ease;
}

.pagination .page-numbers.current {
	background: var(--grad);
	border-color: transparent;
	color: #fff;
	box-shadow: var(--shadow-glow);
}

/* 省略号弱化为纯文本 */
.pagination .page-numbers.dots {
	background: transparent;
	border-color: transparent;
	min-width: 22px;
	padding: 0 4px;
	cursor: default;
}

.pagination a.page-numbers:hover,
.posts-navigation .nav-previous a:hover,
.posts-navigation .nav-next a:hover {
	border-color: rgba(122, 108, 255, 0.5);
	color: var(--text);
	transform: translateY(-2px);
	box-shadow: var(--shadow-glow);
}

/* =========================================================
   10. 侧边栏 & 小工具
   ========================================================= */
.widget-area {
	position: sticky;
	top: calc(var(--header-h) + 24px);
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.widget {
	position: relative;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 22px;
	transition: border-color 0.25s ease, background-color 0.3s ease;
}

.widget:hover {
	border-color: var(--border-strong);
}

.widget-title {
	font-size: 0.98rem;
	font-weight: 750;
	letter-spacing: -0.01em;
	margin: 0 0 18px;
	padding-bottom: 13px;
	border-bottom: 1px solid var(--border);
	position: relative;
	padding-left: 15px;
}

.widget-title::before {
	content: "";
	position: absolute;
	left: 0;
	top: 3px;
	width: 4px;
	height: 17px;
	border-radius: 4px;
	background: var(--grad);
}

.widget ul {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.widget ul li a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 8px 11px;
	margin-inline: -11px;
	border-radius: 9px;
	color: var(--text-dim);
	font-size: 0.92rem;
	transition: all 0.18s ease;
}

.widget ul li a:hover {
	color: var(--text);
	background: var(--accent-soft);
	padding-left: 15px;
}

.widget .count {
	font-size: 0.76rem;
	color: var(--text-faint);
	background: var(--bg-elev);
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 1px 9px;
}

/* 随机/最近文章列表（带排名序号） */
.widget-list {
	counter-reset: wj;
}

.widget-empty {
	color: var(--text-faint);
	font-size: 0.88rem;
	margin: 0;
}

.widget-recent-item {
	counter-increment: wj;
	display: flex;
	gap: 12px;
	padding: 12px 2px;
	border-bottom: 1px solid var(--border);
	align-items: flex-start;
	transition: padding-left 0.18s ease, background-color 0.18s ease;
	border-radius: 6px;
}

.widget-recent-item:last-child {
	border-bottom: none;
}

.widget-recent-item:hover {
	padding-left: 7px;
}

.widget-recent-item::before {
	content: counter(wj, decimal-leading-zero);
	flex-shrink: 0;
	width: 26px;
	height: 26px;
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.72rem;
	font-weight: 750;
	color: var(--text-faint);
	background: var(--bg-elev);
	border: 1px solid var(--border);
	transition: all 0.2s ease;
}

.widget-recent-item:hover::before {
	background: var(--grad);
	color: #fff;
	border-color: transparent;
	box-shadow: var(--shadow-glow);
}

.widget-recent-item a {
	flex: 1;
	min-width: 0;
}

.widget-recent-item .wt {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 0.9rem;
	font-weight: 550;
	line-height: 1.5;
	color: var(--text-dim);
	transition: color 0.18s ease;
}

.widget-recent-item a:hover .wt {
	color: var(--text);
}

.widget-recent-item .wd {
	font-size: 0.76rem;
	color: var(--text-faint);
	flex-shrink: 0;
	padding-top: 3px;
	font-variant-numeric: tabular-nums;
}

/* 标签云 */
.tagcloud,
.widget_tag_cloud .tagcloud {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tagcloud a {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 6px 13px;
	border-radius: 999px;
	border: 1px solid var(--border);
	background: var(--card-2);
	color: var(--text-dim) !important;
	font-size: 0.85rem !important;
	line-height: 1.5;
	transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.tagcloud a:hover {
	border-color: rgba(122, 108, 255, 0.55);
	color: var(--text) !important;
	background: var(--accent-soft);
	transform: translateY(-1px);
	box-shadow: var(--shadow-glow);
}

.tagcloud a .count {
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--text-faint);
	background: var(--bg-elev);
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 0 8px;
	line-height: 1.7;
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.tagcloud a:hover .count {
	color: #fff;
	background: var(--grad);
	border-color: transparent;
}

/* =========================================================
   11. 文章详情页
   ========================================================= */
.single-wrap {
	padding: 46px 0 80px;
}

.breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 9px;
	color: var(--text-faint);
	font-size: 0.85rem;
	margin-bottom: 28px;
}

.breadcrumbs a:hover {
	color: var(--accent);
}

.breadcrumbs .sep {
	opacity: 0.45;
}

.entry-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.entry-cats a {
	padding: 5px 14px;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 650;
	color: var(--accent);
	background: var(--accent-soft);
	border: 1px solid rgba(122, 108, 255, 0.28);
	transition: all 0.22s ease;
}

.entry-cats a:hover {
	background: var(--grad);
	color: #fff;
	border-color: transparent;
	transform: translateY(-1px);
}

.entry-title {
	font-size: clamp(1.75rem, 4.6vw, 2.6rem);
	font-weight: 800;
	letter-spacing: -0.025em;
	line-height: 1.25;
	margin-bottom: 20px;
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 15px;
	color: var(--text-faint);
	font-size: 0.88rem;
	margin-bottom: 32px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--border);
}

.entry-meta .avatar {
	width: 27px;
	height: 27px;
	border-radius: 50%;
	vertical-align: -8px;
	margin-right: 7px;
	border: 1px solid var(--border-strong);
}

.entry-updated {
	color: var(--text-faint);
}

.entry-updated::before {
	content: "已更新 ";
	opacity: 0.75;
}

.entry-meta a {
	color: var(--text-dim);
	font-weight: 550;
}

.entry-meta a:hover {
	color: var(--accent);
}

.entry-thumb {
	margin: 0 0 36px;
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--border);
	box-shadow: var(--shadow-sm);
}

.entry-thumb img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

/* 正文排版 */
.entry-content {
	font-size: 1.03rem;
	line-height: 1.9;
	color: var(--text);
	opacity: 0.96;
}

.entry-content > * {
	margin-block: 0 1.25em;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	color: var(--text);
	margin: 2.1em 0 0.85em;
	letter-spacing: -0.015em;
}

.entry-content h2 {
	font-size: 1.48rem;
	padding-left: 15px;
	position: relative;
}

.entry-content h2::before {
	content: "";
	position: absolute;
	left: 0;
	top: 9px;
	bottom: 9px;
	width: 4px;
	border-radius: 4px;
	background: var(--grad);
}

.entry-content h3 {
	font-size: 1.24rem;
}

.entry-content h3::before {
	content: "";
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-right: 10px;
	border-radius: 2.5px;
	background: var(--grad);
}

.entry-content a {
	color: var(--accent);
	text-decoration: underline;
	text-decoration-color: rgba(122, 108, 255, 0.4);
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
	transition: text-decoration-color 0.2s ease;
}

.entry-content a:hover {
	text-decoration-color: var(--accent);
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.45em;
	margin-block: 0 1.25em;
}

.entry-content ul li,
.entry-content ol li {
	list-style: disc;
	margin-bottom: 0.55em;
	padding-left: 0.3em;
}

.entry-content ol li {
	list-style: decimal;
}

.entry-content ul li::marker,
.entry-content ol li::marker {
	color: var(--accent);
}

.entry-content blockquote {
	position: relative;
	margin: 1.8em 0;
	padding: 20px 24px 20px 52px;
	background: var(--accent-soft);
	border: 1px solid var(--border);
	border-left: 3px solid var(--accent);
	border-radius: var(--radius-sm);
	color: var(--text-dim);
}

.entry-content blockquote::before {
	content: "\201C";
	position: absolute;
	left: 18px;
	top: 8px;
	font-size: 2.6rem;
	font-weight: 800;
	line-height: 1;
	background: var(--grad-text);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
	opacity: 0.9;
}

.entry-content blockquote p:last-child {
	margin-bottom: 0;
}

.entry-content img {
	border-radius: var(--radius-sm);
}

.entry-content figure.wp-block-image {
	margin: 2em 0;
}

.entry-content figure.wp-block-image img {
	box-shadow: var(--shadow-sm);
	border: 1px solid var(--border);
}

.entry-content figcaption {
	text-align: center;
	color: var(--text-faint);
	font-size: 0.85rem;
	margin-top: 12px;
}

.entry-content pre {
	position: relative;
	background: var(--bg-elev);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 44px 20px 20px;
	overflow-x: auto;
	font-size: 0.88rem;
	line-height: 1.65;
}

/* 代码块顶部装饰点 */
.entry-content pre::before {
	content: "";
	position: absolute;
	top: 17px;
	left: 18px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #ff5f57;
	box-shadow: 17px 0 0 #febc2e, 34px 0 0 #28c840;
	opacity: 0.85;
}

.entry-content code {
	background: var(--accent-soft);
	color: var(--accent);
	padding: 2px 8px;
	border-radius: 6px;
	font-size: 0.88em;
}

.entry-content pre code {
	background: transparent;
	padding: 0;
	color: inherit;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin-block: 0 1.5em;
	font-size: 0.93rem;
	display: block;
	overflow-x: auto;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border);
}

.entry-content th,
.entry-content td {
	border: 1px solid var(--border);
	padding: 11px 15px;
	text-align: left;
}

.entry-content th {
	background: var(--card-2);
	font-weight: 700;
}

.entry-content tbody tr:nth-child(even) {
	background: var(--zebra);
}

.entry-content hr {
	border: none;
	height: 1px;
	background: var(--border-strong);
	margin: 2.4em 0;
}

/* 标签 */
.entry-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	margin-top: 38px;
	padding-top: 26px;
	border-top: 1px solid var(--border);
}

.entry-tags a {
	padding: 7px 15px;
	border-radius: 999px;
	border: 1px solid var(--border);
	background: var(--card);
	color: var(--text-dim);
	font-size: 0.85rem;
	transition: all 0.2s ease;
}

.entry-tags a:hover {
	border-color: rgba(122, 108, 255, 0.55);
	color: var(--text);
	background: var(--accent-soft);
	transform: translateY(-1px);
}

/* 上下篇 */
.post-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-top: 38px;
}

.post-nav a {
	display: block;
	padding: 19px 21px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	transition: all 0.24s ease;
	height: 100%;
}

.post-nav a:hover {
	border-color: rgba(122, 108, 255, 0.5);
	transform: translateY(-3px);
	box-shadow: var(--shadow-glow);
}

.post-nav .label {
	display: block;
	color: var(--text-faint);
	font-size: 0.8rem;
	margin-bottom: 7px;
}

.post-nav .t {
	color: var(--text);
	font-weight: 650;
	font-size: 0.95rem;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.post-nav .next {
	text-align: right;
}

/* 作者卡片 */
.author-box {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	margin-top: 38px;
	padding: 26px;
	position: relative;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
}

.author-box::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: var(--grad);
	opacity: 0.85;
}

.author-box .avatar {
	width: 62px;
	height: 62px;
	border-radius: 50%;
	border: 2px solid transparent;
	background: var(--grad);
	padding: 2px;
	flex-shrink: 0;
}

.author-box .name {
	font-weight: 750;
	font-size: 1.03rem;
	margin-bottom: 5px;
}

.author-box .desc {
	color: var(--text-dim);
	font-size: 0.9rem;
	margin: 0;
	line-height: 1.7;
}

/* =========================================================
   12. 评论
   ========================================================= */
.comments-area {
	margin-top: 60px;
	padding-top: 38px;
	border-top: 1px solid var(--border);
}

.comments-title {
	font-size: 1.3rem;
	letter-spacing: -0.015em;
	margin-bottom: 26px;
}

.comment-list .comment {
	padding: 21px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	margin-bottom: 16px;
	transition: border-color 0.2s ease;
}

.comment-list .comment:hover {
	border-color: var(--border-strong);
}

.comment-list .children {
	margin-top: 16px;
	padding-left: 26px;
	border-left: 1px solid var(--border);
}

.comment-list .children .comment {
	background: var(--bg-elev);
}

.comment-list .comment-body {
	display: flex;
	gap: 15px;
}

.comment-list .avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	flex-shrink: 0;
	border: 1px solid var(--border-strong);
}

.comment-list .comment-author {
	font-weight: 700;
	font-size: 0.95rem;
}

.comment-list .comment-metadata {
	font-size: 0.79rem;
	color: var(--text-faint);
	margin-bottom: 9px;
}

.comment-list .comment-metadata a:hover {
	color: var(--accent);
}

.comment-list .comment-content {
	font-size: 0.94rem;
	color: var(--text-dim);
	line-height: 1.75;
}

.comment-list .reply {
	margin-top: 9px;
}

.comment-list .reply a {
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--accent);
}

.comment-respond {
	margin-top: 32px;
	padding: 26px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.comment-reply-title {
	font-size: 1.14rem;
	margin-bottom: 18px;
}

.comment-form p {
	margin-bottom: 16px;
}

.comment-form label {
	display: block;
	font-size: 0.88rem;
	color: var(--text-dim);
	margin-bottom: 7px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	background: var(--bg-elev);
	border: 1px solid var(--border-strong);
	border-radius: 11px;
	color: var(--text);
	padding: 12px 15px;
	font-size: 0.94rem;
	font-family: inherit;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease;
}

.comment-form input:hover,
.comment-form textarea:hover {
	border-color: rgba(122, 108, 255, 0.45);
}

.comment-form input:focus,
.comment-form textarea:focus {
	background: var(--card-2);
	border-color: rgba(122, 108, 255, 0.6);
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08), 0 0 0 3px var(--accent-soft);
	outline: none;
}

.comment-form ::placeholder {
	color: var(--text-faint);
	opacity: 1;
}

.comment-form input[type="checkbox"] {
	width: 15px;
	height: 15px;
	accent-color: var(--accent);
	cursor: pointer;
}

.comment-form .submit,
button[type="submit"],
input[type="submit"]:not(#wp-link-submit) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	padding: 0 24px;
	border: none;
	border-radius: 10px;
	background: var(--grad);
	color: #fff;
	font-size: 0.9rem;
	font-weight: 650;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: all 0.22s ease;
	box-shadow: var(--shadow-glow);
}

.comment-form .submit:hover,
button[type="submit"]:hover,
input[type="submit"]:not(#wp-link-submit):hover {
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 12px 30px rgba(122, 108, 255, 0.32);
}

.comment-form .submit:active,
button[type="submit"]:active,
input[type="submit"]:not(#wp-link-submit):active {
	transform: translateY(0) scale(0.98);
	box-shadow: 0 4px 14px rgba(122, 108, 255, 0.22);
}

.comment-form .submit:focus-visible,
button[type="submit"]:focus-visible,
input[type="submit"]:not(#wp-link-submit):focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(139, 124, 246, 0.35);
}

button[type="submit"]:disabled,
input[type="submit"]:not(#wp-link-submit):disabled {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.comment-form-cookies-consent label {
	display: inline;
	margin-left: 6px;
}

.comment-navigation .nav-links {
	justify-content: space-between;
}

.comment-navigation a {
	color: var(--text-dim);
	font-size: 0.9rem;
}

.comment-navigation a:hover {
	color: var(--accent);
}

.no-comments {
	color: var(--text-faint);
}

/* =========================================================
   13. 页面 / 404
   ========================================================= */
.page-content-wrap {
	padding: 48px 0 80px;
}

.error-404 {
	text-align: center;
	padding: 116px 0 136px;
	position: relative;
	overflow: hidden;
}

.error-404::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(520px 280px at 50% 18%, rgba(122, 108, 255, 0.14), transparent 70%);
	pointer-events: none;
}

.error-404 .code {
	font-size: clamp(5.5rem, 17vw, 10rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.04em;
	background: var(--grad-text);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
	margin-bottom: 14px;
	position: relative;
	animation: floaty 5.5s ease-in-out infinite;
}

@keyframes floaty {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-8px); }
}

.error-404 p {
	color: var(--text-dim);
	position: relative;
}

/* 404 页推荐文章 */
.error-404-recent {
	max-width: 560px;
	margin: 44px auto 0;
	text-align: left;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 22px 26px;
	position: relative;
}

.error-404-recent .section-title {
	margin-bottom: 14px;
}

.error-404-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.error-404-list li {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding: 9px 0;
	border-top: 1px solid var(--border);
}

.error-404-list li:first-child {
	border-top: 0;
}

.error-404-list a {
	color: var(--text);
	font-size: 0.93rem;
	font-weight: 550;
	text-decoration: none;
	transition: color 0.2s ease;
}

.error-404-list a:hover {
	color: var(--accent);
}

.error-404-date {
	color: var(--text-faint);
	font-size: 0.82rem;
	flex-shrink: 0;
}

/* =========================================================
   14. 页脚
   ========================================================= */
.site-footer {
	position: relative;
	margin-top: 48px;
	background: var(--bg-elev);
	border-top: 1px solid var(--border);
}

.site-footer::before {
	content: "";
	position: absolute;
	top: -1px;
	left: 0;
	right: 0;
	height: 1px;
	background: var(--grad);
	opacity: 0.55;
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 44px;
	padding-block: 56px 44px;
}

.footer-brand .site-brand {
	margin-bottom: 14px;
}

.footer-brand p {
	color: var(--text-faint);
	font-size: 0.9rem;
	max-width: 380px;
	margin: 0;
	line-height: 1.75;
}

/* 页脚社交入口 */
.footer-social {
	display: flex;
	gap: 10px;
	margin-top: 18px;
}

.fs-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 11px;
	border: 1px solid var(--border);
	background: var(--card);
	color: var(--text-dim);
	transition: all 0.22s ease;
}

.fs-link:hover {
	border-color: rgba(122, 108, 255, 0.5);
	color: var(--text);
	background: var(--accent-soft);
	transform: translateY(-2px);
	box-shadow: var(--shadow-glow);
}

.fs-link svg {
	width: 17px;
	height: 17px;
}

.footer-col h4 {
	position: relative;
	font-size: 0.95rem;
	margin-bottom: 20px;
	padding-bottom: 12px;
	color: var(--text);
}

.footer-col h4::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 26px;
	height: 2px;
	border-radius: 2px;
	background: var(--grad);
}

.footer-nav ul {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.footer-nav a {
	color: var(--text-faint);
	font-size: 0.9rem;
	padding: 4px 0;
	display: inline-block;
	transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-nav a:hover {
	color: var(--accent);
	padding-left: 5px;
}

.footer-meta p {
	color: var(--text-faint);
	font-size: 0.88rem;
	margin-bottom: 10px;
}

.footer-bar {
	border-top: 1px solid var(--border);
	padding-block: 22px;
}

.footer-bar .container {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	color: var(--text-faint);
	font-size: 0.84rem;
}

.footer-bar a {
	color: var(--text-dim);
}

.footer-bar a:hover {
	color: var(--accent);
}

/* TG 在线客服（图标圆钮） */
.tg-float {
	position: fixed;
	right: 26px;
	bottom: 89px;
	z-index: 90;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: linear-gradient(135deg, #2aabee 0%, #1786c7 100%);
	color: #fff;
	box-shadow: 0 10px 28px rgba(42, 171, 238, 0.35);
	transition: transform 0.28s ease, box-shadow 0.28s ease, opacity 0.3s ease;
}

.tg-float:hover {
	transform: translateY(-3px);
	color: #fff;
	box-shadow: 0 15px 34px rgba(42, 171, 238, 0.45);
}

.tg-float svg {
	width: 22px;
	height: 22px;
	flex-shrink: 0;
}

/* 回到顶部 */
.back-to-top {
	position: fixed;
	right: 26px;
	bottom: 30px;
	width: 47px;
	height: 47px;
	border: 1px solid var(--border-strong);
	border-radius: 15px;
	background: var(--glass-strong);
	backdrop-filter: blur(12px);
	color: var(--text-dim);
	cursor: pointer;
	z-index: 90;
	opacity: 0;
	visibility: hidden;
	transform: translateY(14px);
	transition: all 0.3s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.back-to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.back-to-top:hover {
	background: var(--grad);
	color: #fff;
	border-color: transparent;
	box-shadow: var(--shadow-glow);
}

.back-to-top svg {
	width: 18px;
	height: 18px;
}

/* =========================================================
   15. 响应式
   ========================================================= */
@media (max-width: 1024px) {
	.layout {
		grid-template-columns: 1fr;
		gap: 44px;
	}

	.hero-panels {
		grid-template-columns: 1fr;
	}

	.widget-area {
		position: static;
	}
}

@media (max-width: 900px) {
	.primary-nav {
		display: none;
	}

	.nav-toggle {
		display: inline-flex;
	}
}

@media (max-width: 768px) {
	:root {
		--header-h: 60px;
	}

	.hero {
		padding: 68px 0 56px;
	}

	.card-thumb {
		flex: 0 0 220px;
		max-width: 220px;
	}

	.card-body {
		padding: 17px 18px 15px;
	}

	.footer-grid {
		grid-template-columns: 1fr;
		gap: 30px;
		padding-block: 42px 34px;
	}

	.post-nav {
		grid-template-columns: 1fr;
	}

	.post-nav .next {
		text-align: left;
	}

	.author-box {
		flex-direction: column;
	}
}

@media (max-width: 620px) {
	.post-card {
		flex-direction: column;
	}

	.card-thumb {
		flex: 0 0 auto;
		max-width: 100%;
		width: 100%;
		aspect-ratio: 16 / 9;
	}

	/* 相关文章缩略图在堆叠布局下恢复全宽 */
	.related-posts .card-thumb {
		flex-basis: auto;
		max-width: 100%;
	}

	.card-excerpt {
		-webkit-line-clamp: 3;
	}

	.hero-intro {
		padding: 18px 20px;
		font-size: 0.92rem;
	}

	.hero-slider {
		aspect-ratio: 4 / 3;
	}

	.hsl-arrow {
		opacity: 1;
	}
}

@media (max-width: 560px) {
	body {
		font-size: 15px;
	}

	.page-head {
		padding: 54px 0 4px;
	}

	.back-to-top {
		right: 16px;
		bottom: 18px;
	}

	.tg-float {
		right: 16px;
		bottom: 77px;
		width: 48px;
		height: 48px;
		justify-content: center;
	}

	.container,
	.container-narrow {
		padding-inline: 18px;
	}

	.footer-bar .container {
		flex-direction: column;
		justify-content: center;
		text-align: center;
	}
}

/* 动画偏好 */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* =========================================================
   16. bbPress 论坛（BBS 首页布局 + 论坛内页暗色适配）
   ========================================================= */

/* ---- 论坛首页布局 ---- */
.bbs-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 40px;
	align-items: start;
	padding-block: 0;
}

.bbs-main-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 18px;
}

.bbs-col-title {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--text);
	font-size: 1.2rem;
	font-weight: 700;
}

.bbs-col-title::before {
	content: "";
	width: 4px;
	height: 18px;
	border-radius: 2px;
	background: var(--grad);
}

.bbs-more {
	color: var(--text-dim);
	font-size: 0.85rem;
	transition: color 0.2s ease;
}

.bbs-more:hover {
	color: var(--accent);
}

.bbs-topic-list {
	display: grid;
	gap: 14px;
}

.bbs-topic-item {
	display: flex;
	gap: 15px;
	padding: 18px 22px;
	background-color: var(--card);
	background-image: linear-gradient(180deg, var(--sheen), transparent 46%);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.bbs-topic-item:hover {
	border-color: var(--border-accent);
	transform: translateY(-2px);
	box-shadow: var(--shadow-hover);
}

.bbs-topic-avatar img {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 1px solid var(--border);
	background: var(--bg-elev);
}

.bbs-topic-body {
	flex: 1;
	min-width: 0;
}

.bbs-topic-title {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin: 2px 0 0;
	font-size: 1.06rem;
	font-weight: 650;
	line-height: 1.5;
}

.bbs-topic-title a {
	color: var(--text);
	transition: color 0.2s ease;
}

.bbs-topic-title a:hover {
	color: var(--accent);
}

.is-closed .bbs-topic-title a {
	color: var(--text-faint);
	text-decoration: line-through;
	text-decoration-color: var(--text-faint);
	text-decoration-thickness: 1px;
}

.bbs-flag {
	flex-shrink: 0;
	padding: 1px 8px;
	border-radius: 999px;
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.flag-sticky {
	color: #fff;
	background: var(--grad);
}

.flag-closed {
	color: var(--text-faint);
	background: var(--bg-elev);
	border: 1px solid var(--border);
}

.bbs-topic-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px 14px;
	margin-top: 8px;
	color: var(--text-faint);
	font-size: 0.8rem;
}

.bbs-forum-badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent);
	font-size: 0.74rem;
	font-weight: 600;
	transition: filter 0.2s ease;
}

.bbs-forum-badge:hover {
	filter: brightness(1.2);
}

.bbs-meta-active {
	margin-left: auto;
}

.bbs-empty {
	padding: 40px 20px;
	background: var(--card);
	border: 1px dashed var(--border);
	border-radius: var(--radius);
	color: var(--text-faint);
	text-align: center;
}

/* ---- 右侧全部版块 ---- */
.bbs-side {
	position: sticky;
	top: calc(var(--header-h) + 20px);
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.bbs-widget {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 20px 20px 6px;
	transition: border-color 0.25s ease;
}

.bbs-widget:hover {
	border-color: var(--border-strong);
}

.bbs-widget-pinned {
	padding: 20px 22px;
}

/* ---- 置顶帖列表 ---- */
.bbs-pinned-item {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 10px 0;
}

.bbs-pinned-item + .bbs-pinned-item {
	border-top: 1px solid var(--border);
}

.bbs-pinned-title {
	color: var(--text);
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.55;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color 0.2s ease;
}

.bbs-pinned-item:hover .bbs-pinned-title {
	color: var(--accent);
}

.bbs-pinned-meta {
	color: var(--text-faint);
	font-size: 0.76rem;
	font-variant-numeric: tabular-nums;
}

/* ---- 参与讨论提示（话题详情页） ---- */
.bbs-auth-notice {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px 18px;
	flex-wrap: wrap;
	clear: both;
	margin-bottom: 20px;
	padding: 15px 20px;
	background: var(--accent-soft);
	border: 1px solid rgba(122, 108, 255, 0.25);
	border-radius: var(--radius-sm);
}

.bbs-auth-notice-text {
	color: var(--text-dim);
	font-size: 0.9rem;
}

.bbs-auth-notice-actions {
	display: flex;
	gap: 10px;
}

.bbs-auth-notice .bbs-btn {
	height: 36px;
	padding: 0 18px;
	font-size: 0.85rem;
}

.bbs-forum-group {
	padding-bottom: 12px;
	margin-bottom: 12px;
	border-bottom: 1px solid var(--border);
}

.bbs-forum-group:last-child {
	border-bottom: none;
	margin-bottom: 0;
}

.bbs-group-name {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--text);
	font-size: 0.92rem;
	font-weight: 700;
	transition: color 0.2s ease;
}

.bbs-group-name::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 2px;
	background: var(--grad);
}

.bbs-group-name:hover {
	color: var(--accent);
}

.bbs-forum-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 8px;
	margin-inline: -8px;
	border-radius: 10px;
	transition: background-color 0.2s ease;
}

.bbs-forum-item:hover {
	background: var(--accent-soft);
}

.bbs-forum-item + .bbs-forum-item {
	border-top: 1px solid var(--border);
}

.bbs-forum-item-info {
	min-width: 0;
}

.bbs-forum-item-name {
	display: block;
	color: var(--text);
	font-size: 0.92rem;
	font-weight: 600;
	transition: color 0.2s ease;
}

.bbs-forum-item-name:hover {
	color: var(--accent);
}

.bbs-forum-item-desc {
	display: block;
	color: var(--text-faint);
	font-size: 0.78rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bbs-forum-item-meta {
	flex-shrink: 0;
	color: var(--text-faint);
	font-size: 0.76rem;
	white-space: nowrap;
}

/* ---- 论坛内页（版块/话题/用户/搜索）暗色适配 ---- */
.bbp-main {
	padding-block: 48px 80px;
}

/* 论坛首页带通栏 Hero，紧贴头部，去掉顶部间距 */
.bbp-main:has(> .hero-compact) {
	padding-top: 0;
}

#bbpress-forums {
	color: var(--text);
	font-size: 0.95rem;
}

#bbpress-forums ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

#bbpress-forums img.avatar {
	border-radius: 50%;
}

/* 面包屑 */
#bbpress-forums .bbp-breadcrumb p,
#bbpress-forums .bbp-breadcrumb {
	float: none;
	margin: 0 0 20px;
	color: var(--text-faint);
	font-size: 0.85rem;
}

#bbpress-forums .bbp-breadcrumb a {
	color: var(--text-dim);
	transition: color 0.2s ease;
}

#bbpress-forums .bbp-breadcrumb a:hover {
	color: var(--accent);
}

#bbpress-forums .bbp-breadcrumb .bbp-breadcrumb-sep {
	color: var(--text-faint);
	padding: 0 6px;
}

#bbpress-forums .bbp-breadcrumb .bbp-breadcrumb-current {
	color: var(--accent);
}

/* 搜索框 */
#bbpress-forums #bbp-search-form {
	display: flex;
	gap: 8px;
	margin-bottom: 20px;
}

#bbpress-forums #bbp-search-form input[type="text"],
#bbpress-forums #bbp-search-form input[type="search"] {
	flex: 1;
	max-width: 420px;
}

/* 列表容器（版块索引 / 话题列表 / 搜索结果） */
#bbpress-forums ul.bbp-forums,
#bbpress-forums ul.bbp-topics,
#bbpress-forums ul.bbp-search-results {
	margin-bottom: 22px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
}

/* 表头行 */
#bbpress-forums li.bbp-header,
#bbpress-forums li.bbp-footer {
	padding: 12px 20px;
	color: var(--text-faint);
	font-size: 0.78rem;
	font-weight: 600;
	background: var(--bg-elev);
}

#bbpress-forums li.bbp-header ul.forum-titles,
#bbpress-forums li.bbp-body ul.bbp-forum,
#bbpress-forums li.bbp-body ul.bbp-topic {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 88px 88px 150px;
	gap: 12px;
	align-items: start;
}

/* 中和 bbpress.css 的 float + 百分比宽度，保证网格列宽生效 */
#bbpress-forums li.bbp-header ul.forum-titles > li,
#bbpress-forums li.bbp-body ul.bbp-forum > li,
#bbpress-forums li.bbp-body ul.bbp-topic > li {
	float: none !important;
	width: auto !important;
	text-transform: none;
}

#bbpress-forums li.bbp-body ul.bbp-forum,
#bbpress-forums li.bbp-body ul.bbp-topic {
	padding: 16px 20px;
	border-top: 1px solid var(--border);
}

/* 置顶话题行（覆盖 bbpress.css 的 #ffffe0） */
#bbpress-forums li.bbp-body ul.topic.sticky,
#bbpress-forums li.bbp-body ul.topic.super-sticky {
	background-color: var(--accent-soft) !important;
	border-left: 3px solid var(--accent);
}

/* 标题与摘要 */
#bbpress-forums .bbp-forum-title,
#bbpress-forums .bbp-topic-title a,
#bbpress-forums .bbp-topic-permalink {
	color: var(--text) !important;
	font-weight: 650;
	text-decoration: none !important;
	transition: color 0.2s ease;
}

#bbpress-forums .bbp-forum-title:hover,
#bbpress-forums .bbp-topic-title a:hover,
#bbpress-forums .bbp-topic-permalink:hover {
	color: var(--accent) !important;
}

#bbpress-forums li.status-closed .bbp-topic-permalink {
	color: var(--text-faint) !important;
	text-decoration: line-through !important;
	text-decoration-thickness: 1px;
}

#bbpress-forums .bbp-forum-content {
	margin-top: 6px;
	color: var(--text-dim);
	font-size: 0.85rem;
	line-height: 1.7;
}

#bbpress-forums .bbp-forums-list {
	margin-top: 8px;
	color: var(--text-faint);
	font-size: 0.8rem;
}

#bbpress-forums .bbp-forums-list a {
	color: var(--text-dim);
}

#bbpress-forums .bbp-forums-list a:hover {
	color: var(--accent);
}

#bbpress-forums .bbp-topic-title .bbp-topic-started-by,
#bbpress-forums .bbp-topic-title .bbp-topic-voice-count,
#bbpress-forums .bbp-topic-meta {
	color: var(--text-faint);
	font-size: 0.8rem;
}

#bbpress-forums .bbp-topic-title .bbp-topic-meta a,
#bbpress-forums .bbp-topic-freshness a {
	color: var(--text-dim) !important;
	transition: color 0.2s ease;
}

#bbpress-forums .bbp-topic-title .bbp-topic-meta a:hover,
#bbpress-forums .bbp-topic-freshness a:hover {
	color: var(--accent) !important;
}

#bbpress-forums .bbp-forum-topic-count,
#bbpress-forums .bbp-forum-reply-count,
#bbpress-forums .bbp-topic-voice-count,
#bbpress-forums .bbp-topic-reply-count {
	color: var(--text-dim);
	font-size: 0.88rem;
}

#bbpress-forums .bbp-forum-freshness,
#bbpress-forums .bbp-topic-freshness {
	color: var(--text-faint);
	font-size: 0.82rem;
}

/* 分页 */
#bbpress-forums .bbp-pagination {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	margin-bottom: 20px;
	color: var(--text-faint);
	font-size: 0.85rem;
}

#bbpress-forums .bbp-pagination-links {
	display: flex;
	gap: 6px;
}

#bbpress-forums .bbp-pagination-links a,
#bbpress-forums .bbp-pagination-links span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	padding: 6px 11px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 9px;
	color: var(--text-dim);
	font-size: 0.85rem;
	transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

#bbpress-forums .bbp-pagination-links a:hover {
	border-color: var(--accent);
	color: var(--accent);
}

#bbpress-forums .bbp-pagination-links span.current {
	background: var(--grad);
	border-color: transparent;
	color: #fff;
	font-weight: 650;
}

/* 通知 */
#bbpress-forums .bbp-template-notice {
	margin-bottom: 20px;
	padding: 12px 16px;
	background: var(--accent-soft);
	border: 1px solid var(--border);
	border-left: 3px solid var(--accent);
	border-radius: 10px;
	color: var(--text-dim);
	font-size: 0.88rem;
}

#bbpress-forums .bbp-template-notice.error {
	background: rgba(239, 68, 68, 0.1);
	border-left-color: #ef4444;
}

/* 话题标签 / 管理链接 */
#bbpress-forums .bbp-topic-tags a,
#bbpress-forums .bbp-topic-tag-link {
	display: inline-flex;
	padding: 2px 10px;
	margin: 0 6px 6px 0;
	background: var(--bg-elev);
	border: 1px solid var(--border);
	border-radius: 999px;
	color: var(--text-dim);
	font-size: 0.78rem;
	transition: border-color 0.2s ease, color 0.2s ease;
}

#bbpress-forums .bbp-topic-tags a:hover {
	border-color: var(--accent);
	color: var(--accent);
}

#bbpress-forums .bbp-admin-links {
	color: var(--text-faint);
	font-size: 0.78rem;
}

#bbpress-forums .bbp-admin-links a {
	color: var(--text-faint);
}

#bbpress-forums .bbp-admin-links a:hover {
	color: var(--accent);
}

/* 表单（发帖/回帖/编辑） */
#bbpress-forums .bbp-form legend {
	padding: 0 6px;
	color: var(--text);
	font-weight: 700;
}

#bbpress-forums .bbp-form fieldset {
	margin-bottom: 20px;
	padding: 18px 20px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

#bbpress-forums label {
	color: var(--text-dim);
	font-size: 0.88rem;
}

#bbpress-forums input[type="text"],
#bbpress-forums input[type="email"],
#bbpress-forums input[type="password"],
#bbpress-forums input[type="url"],
#bbpress-forums input[type="number"],
#bbpress-forums input[type="search"],
#bbpress-forums textarea,
#bbpress-forums select,
#bbpress-forums fieldset.bbp-form input[type="text"],
#bbpress-forums fieldset.bbp-form input[type="email"],
#bbpress-forums fieldset.bbp-form input[type="password"],
#bbpress-forums fieldset.bbp-form input[type="url"],
#bbpress-forums fieldset.bbp-form input[type="number"],
#bbpress-forums fieldset.bbp-form input[type="search"],
#bbpress-forums fieldset.bbp-form textarea,
#bbpress-forums fieldset.bbp-form select {
	width: 100%;
	max-width: 640px;
	height: auto;
	min-height: 0;
	padding: 10px 14px;
	background: var(--bg-elev);
	border: 1px solid var(--border-strong);
	border-radius: 11px;
	color: var(--text);
	font-size: 0.9rem;
	font-family: inherit;
	line-height: 1.6;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease;
}

#bbpress-forums input:hover:not([type="submit"]):not([type="button"]):not([type="checkbox"]),
#bbpress-forums textarea:hover,
#bbpress-forums select:hover,
#bbpress-forums fieldset.bbp-form input:hover:not([type="submit"]):not([type="button"]):not([type="checkbox"]),
#bbpress-forums fieldset.bbp-form textarea:hover,
#bbpress-forums fieldset.bbp-form select:hover {
	border-color: rgba(122, 108, 255, 0.45);
}

#bbpress-forums input:focus,
#bbpress-forums textarea:focus,
#bbpress-forums select:focus,
#bbpress-forums fieldset.bbp-form input:focus,
#bbpress-forums fieldset.bbp-form textarea:focus,
#bbpress-forums fieldset.bbp-form select:focus {
	outline: none;
	background: var(--card-2);
	border-color: rgba(122, 108, 255, 0.6);
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12), 0 0 0 3px var(--accent-soft);
}

#bbpress-forums ::placeholder {
	color: var(--text-faint);
	opacity: 1;
}

#bbpress-forums select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 36px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%238b7bff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 13px center;
	cursor: pointer;
}

#bbpress-forums input[type="checkbox"] {
	accent-color: var(--accent);
	width: 15px;
	height: 15px;
	cursor: pointer;
}

#bbpress-forums textarea {
	min-height: 170px;
	resize: vertical;
	line-height: 1.75;
}

#bbpress-forums .bbp-submit-wrapper {
	margin-top: 4px;
}

#bbpress-forums button[type="submit"],
#bbpress-forums .bbp-submit-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	padding: 0 24px;
	background: var(--grad);
	border: none;
	border-radius: 10px;
	color: #fff;
	font-size: 0.9rem;
	font-weight: 650;
	letter-spacing: 0.02em;
	cursor: pointer;
	box-shadow: var(--shadow-glow);
	transition: all 0.22s ease;
}

#bbpress-forums button[type="submit"]:hover {
	color: #fff;
	filter: none;
	transform: translateY(-2px);
	box-shadow: 0 12px 30px rgba(122, 108, 255, 0.32);
}

/* ---------------------------------------------------------
   表单深度优化：结构与细节（发帖 / 回帖 / 编辑 / 登录表单）
   ------------------------------------------------------- */

/* 行布局：label 块级化，去掉 label 后的 <br> 空隙 */
#bbpress-forums .bbp-form p,
#bbpress-forums fieldset.bbp-form p {
	margin: 0 0 18px;
	padding: 0;
}

#bbpress-forums .bbp-form label,
#bbpress-forums fieldset.bbp-form label {
	display: block;
	margin: 0 0 8px;
	color: var(--text);
	font-size: 0.86rem;
	font-weight: 650;
	letter-spacing: 0.01em;
}

#bbpress-forums .bbp-form p > br {
	display: none;
}

/* 复选框行（订阅通知 / 记住我 / 编辑日志）：横排对齐 */
#bbpress-forums .bbp-form p:has(input[type="checkbox"]),
#bbpress-forums fieldset.bbp-form p:has(input[type="checkbox"]) {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 18px;
}

#bbpress-forums .bbp-form p:has(input[type="checkbox"]) label,
#bbpress-forums fieldset.bbp-form p:has(input[type="checkbox"]) label {
	display: inline;
	margin: 0;
	font-size: 0.88rem;
	font-weight: 400;
	color: var(--text-dim);
	cursor: pointer;
}

/* legend：带渐变标记的小节标题 */
#bbpress-forums .bbp-form > legend,
#bbpress-forums fieldset.bbp-form > legend {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 18px;
	padding: 0;
	width: auto;
	border: none;
	font-size: 1rem;
	letter-spacing: -0.01em;
}

#bbpress-forums .bbp-form > legend::before,
#bbpress-forums fieldset.bbp-form > legend::before {
	content: "";
	width: 4px;
	height: 16px;
	border-radius: 999px;
	background: var(--grad);
	flex-shrink: 0;
}

/* 嵌套 fieldset（编辑原因等）：弱化为内嵌分组 */
#bbpress-forums .bbp-form .bbp-form {
	margin-bottom: 4px;
	padding: 16px 18px;
	background: var(--card-2);
	border: 1px dashed var(--border-strong);
}

/* 内容编辑器（quicktags 工具栏 + textarea） */
#bbpress-forums .bbp-the-content-wrapper {
	margin-bottom: 18px;
	max-width: 640px;
}

#bbpress-forums .wp-editor-container {
	border: 1px solid var(--border-strong) !important;
	border-radius: 11px;
	overflow: hidden;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#bbpress-forums .wp-editor-container:focus-within {
	border-color: rgba(122, 108, 255, 0.6);
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12), 0 0 0 3px var(--accent-soft);
}

#bbpress-forums .quicktags-toolbar {
	padding: 8px 10px;
	background: var(--card-2);
	border-bottom: 1px solid var(--border) !important;
}

#bbpress-forums .quicktags-toolbar input.ed_button {
	height: 26px;
	padding: 0 9px;
	background: transparent;
	border: 1px solid var(--border);
	border-radius: 7px;
	color: var(--text-dim);
	font-size: 0.78rem;
	line-height: 1;
	cursor: pointer;
	transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

#bbpress-forums .quicktags-toolbar input.ed_button:hover {
	background: var(--accent-soft);
	border-color: var(--accent);
	color: var(--text);
}

/* 编辑器内 textarea（含 tinymce 模式的容器） */
#bbpress-forums .wp-editor-area {
	display: block;
	width: 100% !important;
	min-height: 170px;
	padding: 12px 14px;
	background: var(--bg-elev);
	border: none !important;
	color: var(--text);
	font-family: inherit !important;
	font-size: 0.9rem !important;
	line-height: 1.75;
}

#bbpress-forums .mce-panel {
	background: var(--bg-elev) !important;
	border-color: var(--border) !important;
}

#bbpress-forums .mce-btn {
	border-color: var(--border) !important;
	color: var(--text-dim);
}

/* 允许的标签提示 */
#bbpress-forums .bbp-form .form-allowed-tags {
	margin: -6px 0 18px;
	padding: 12px 14px;
	background: var(--bg-elev);
	border: 1px dashed var(--border-strong);
	border-radius: 10px;
	color: var(--text-faint);
	font-size: 0.78rem;
	line-height: 1.7;
	overflow-x: auto;
}

#bbpress-forums .bbp-form .form-allowed-tags code {
	display: block;
	padding: 0;
	background: none;
	border: none;
	color: var(--text-faint);
	font-size: 0.74rem;
	white-space: pre-wrap;
	word-break: break-all;
}

/* 提交按钮细节 */
#bbpress-forums button[type="submit"]:active {
	transform: translateY(0);
	filter: brightness(0.96);
}

#bbpress-forums button[type="submit"]:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

/* bbPress 内嵌登录表单（未登录发帖区） */
#bbpress-forums .bbp-login-form .bbp-username,
#bbpress-forums .bbp-login-form .bbp-password {
	margin-bottom: 14px;
}

#bbpress-forums .bbp-login-form label {
	display: block;
	margin-bottom: 8px;
	color: var(--text);
	font-size: 0.86rem;
	font-weight: 650;
}

#bbpress-forums .bbp-login-form .bbp-remember-me input {
	margin-right: 6px;
}

/* ---------------------------------------------------------
   表单必填校验：顶部弹窗提示 + 错误字段标记
   ------------------------------------------------------- */
.hj-toast {
	position: fixed;
	top: 22px;
	left: 50%;
	z-index: 100000;
	transform: translate(-50%, -16px);
	max-width: min(86vw, 420px);
	padding: 11px 20px;
	background: var(--card);
	border: 1px solid var(--border-strong);
	border-left: 3px solid #ff5c7a;
	border-radius: 12px;
	color: var(--text);
	font-size: 0.88rem;
	letter-spacing: 0.01em;
	box-shadow: 0 14px 44px rgba(0, 0, 0, 0.4);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.24s ease, transform 0.24s ease;
}

.hj-toast.is-show {
	opacity: 1;
	transform: translate(-50%, 0);
}

.hj-field-error {
	border-color: rgba(255, 92, 122, 0.7) !important;
	box-shadow: 0 0 0 3px rgba(255, 92, 122, 0.16) !important;
	animation: hj-shake 0.32s ease;
}

@keyframes hj-shake {

	0%,
	100% {
		transform: translateX(0);
	}

	25% {
		transform: translateX(-5px);
	}

	75% {
		transform: translateX(5px);
	}
}

/* ---------------------------------------------------------
   论坛发帖/回帖：图片上传行
   ------------------------------------------------------- */
.hj-upload-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 10px;
	flex-wrap: wrap;
}

.hj-upload-btn {
	height: 32px;
	padding: 0 14px;
	font-size: 0.8rem;
	flex-shrink: 0;
}

.hj-upload-btn:disabled {
	opacity: 0.55;
	cursor: wait;
}

.hj-upload-hint {
	font-size: 0.75rem;
	color: var(--text-dim);
}

/* ---------------------------------------------------------
   WP 内置弹窗（quicktags 插入/编辑链接 #wp-link-wrap）
   注意：#link-selector/.submitbox 为 absolute + em 计算布局，勿动几何；
   列表项无 <a>，结构为 li > .item-title + .item-info
   ------------------------------------------------------- */
#wp-link-backdrop {
	background: rgba(10, 10, 18, 0.62) !important;
	opacity: 1 !important;
}

#wp-link-wrap {
	background: var(--card) !important;
	border: 1px solid var(--border-strong) !important;
	border-radius: 16px !important;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5) !important;
	color: var(--text);
	overflow: hidden;
}

#link-modal-title {
	background: transparent !important;
	color: var(--text) !important;
	border-bottom: 1px solid var(--border) !important;
	text-shadow: none !important;
}

#wp-link-close {
	color: var(--text-dim) !important;
	transition: background 0.2s ease, color 0.2s ease !important;
}

#wp-link-close::before {
	color: inherit !important;
}

#wp-link-close:hover,
#wp-link-close:focus {
	color: var(--text) !important;
	background: rgba(139, 124, 246, 0.14) !important;
	box-shadow: none !important;
}

#wp-link-wrap #link-selector {
	color: var(--text);
	background: transparent !important;
}

#wp-link-wrap .howto {
	color: var(--text-dim) !important;
	text-shadow: none !important;
}

#wp-link-wrap #link-options label,
#wp-link-wrap .link-search-wrapper label {
	display: flex;
	align-items: center;
	gap: 10px;
}

#wp-link-wrap #link-options label span,
#wp-link-wrap .link-search-wrapper .search-label {
	display: inline-block;
	width: 64px;
	flex-shrink: 0;
	max-width: none !important;
	text-align: left;
	padding: 0 !important;
	color: var(--text-dim);
	font-size: 13px;
	text-shadow: none !important;
	word-break: keep-all;
}

#wp-link-wrap #link-options label input[type="text"],
#wp-link-wrap .link-search-field {
	flex: 1 1 auto;
	width: auto !important;
	max-width: none !important;
	margin-top: 0 !important;
	height: 38px;
	padding: 0 12px !important;
	background: var(--bg) !important;
	border: 1px solid var(--border-strong) !important;
	border-radius: 10px !important;
	color: var(--text) !important;
	box-shadow: none !important;
	transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

#wp-link-wrap #link-options label input[type="text"]:hover,
#wp-link-wrap .link-search-field:hover {
	border-color: rgba(139, 124, 246, 0.5) !important;
}

#wp-link-wrap #link-options label input[type="text"]:focus,
#wp-link-wrap .link-search-field:focus {
	border-color: var(--accent) !important;
	box-shadow: 0 0 0 3px rgba(139, 124, 246, 0.18) !important;
	outline: none !important;
}

#wp-link-wrap .link-target input[type="checkbox"] {
	accent-color: var(--accent);
}

#wp-link-wrap .link-search-wrapper .spinner {
	float: none;
	margin: 0 !important;
	visibility: visible;
}

#wp-link-search-toggle {
	color: var(--accent) !important;
	text-decoration: none !important;
	text-shadow: none !important;
}

#wp-link-search-toggle:hover {
	color: var(--accent) !important;
	text-decoration: underline !important;
}

#wp-link-wrap .query-results {
	border: 1px solid var(--border) !important;
	border-radius: 10px !important;
	background: var(--bg) !important;
	box-shadow: none !important;
}

#wp-link-wrap .query-results .query-notice {
	border-bottom: 1px solid var(--border) !important;
	background: transparent !important;
	color: var(--text-dim) !important;
}

#wp-link-wrap .query-notice .query-notice-default {
	border-left: 3px solid var(--accent) !important;
	padding: 8px 10px !important;
}

#wp-link-wrap .query-results em {
	color: inherit !important;
	font-style: normal !important;
}

#wp-link-wrap .query-results li {
	border-bottom: 1px solid var(--border) !important;
	background: transparent !important;
	color: var(--text) !important;
	padding: 9px 12px !important;
	cursor: pointer;
	transition: background 0.15s ease !important;
}

#wp-link-wrap .query-results li:hover {
	background: rgba(139, 124, 246, 0.12) !important;
	color: var(--text) !important;
}

#wp-link-wrap .query-results li.selected {
	background: rgba(139, 124, 246, 0.2) !important;
	color: var(--accent) !important;
}

#wp-link-wrap .query-results li.selected .item-title {
	color: inherit !important;
	font-weight: 600;
}

#wp-link-wrap .query-results li:last-child {
	border-bottom: none !important;
}

#wp-link-wrap .query-results li.unselectable:hover {
	background: transparent !important;
	color: var(--text-dim) !important;
}

#wp-link-wrap .item-title {
	color: inherit !important;
	font-size: 13px;
	text-shadow: none !important;
}

#wp-link-wrap .item-info {
	color: var(--text-dim) !important;
	font-size: 11px;
	text-transform: uppercase;
	top: 10px !important;
	right: 12px !important;
	text-shadow: none !important;
}

#wp-link-wrap .no-matches-found {
	background: rgba(255, 92, 122, 0.07) !important;
	border-bottom: none !important;
}

#wp-link-wrap .no-matches-found .item-title {
	border-left: 3px solid #ff5c7a !important;
	padding: 8px 10px !important;
	display: block;
}

#wp-link-wrap .submitbox {
	background: transparent !important;
	border-top: 1px solid var(--border) !important;
	box-shadow: none !important;
}

#wp-link-wrap .submitbox .button {
	background: transparent !important;
	border: 1px solid var(--border-strong) !important;
	color: var(--text) !important;
	border-radius: 10px !important;
	height: 36px !important;
	padding: 0 18px !important;
	font-size: 0.9rem !important;
	font-weight: 650 !important;
	box-shadow: none !important;
	text-shadow: none !important;
	transition: all 0.22s ease !important;
}

#wp-link-wrap .submitbox .button:hover,
#wp-link-wrap .submitbox .button:focus {
	border-color: var(--accent) !important;
	color: var(--accent) !important;
	background: rgba(139, 124, 246, 0.08) !important;
}

#wp-link-wrap .submitbox .button-primary {
	background: linear-gradient(135deg, #8b7cf6, #6366f1) !important;
	border: 1px solid transparent !important;
	color: #fff !important;
	border-radius: 10px !important;
	height: 36px !important;
	padding: 0 20px !important;
	font-size: 0.9rem !important;
	font-weight: 650 !important;
	box-shadow: 0 4px 16px rgba(124, 108, 246, 0.35) !important;
	text-shadow: none !important;
}

#wp-link-wrap .submitbox .button-primary:hover,
#wp-link-wrap .submitbox .button-primary:focus {
	background: linear-gradient(135deg, #9a8cf8, #7377f3) !important;
	border-color: transparent !important;
	color: #fff !important;
	box-shadow: 0 6px 20px rgba(124, 108, 246, 0.45) !important;
}

/* 用户中心 */
#bbpress-forums #bbp-user-wrapper {
	display: grid;
	grid-template-columns: 200px minmax(0, 1fr);
	gap: 28px;
	align-items: start;
}

#bbpress-forums #bbp-user-navigation li {
	margin-bottom: 4px;
}

#bbpress-forums #bbp-user-navigation a {
	display: block;
	padding: 9px 14px;
	border-radius: 10px;
	color: var(--text-dim);
	font-size: 0.9rem;
	transition: background 0.2s ease, color 0.2s ease;
}

#bbpress-forums #bbp-user-navigation li.current a,
#bbpress-forums #bbp-user-navigation a:hover {
	background: var(--accent-soft);
	color: var(--accent);
}

#bbpress-forums .bbp-user-section h2,
#bbpress-forums .entry-title {
	color: var(--text);
}

#bbpress-forums .bbp-user-profile .bbp-user-details {
	color: var(--text-dim);
	font-size: 0.88rem;
}

/* ---- 论坛响应式 ---- */
@media (max-width: 1024px) {
	.bbs-layout {
		grid-template-columns: 1fr;
		gap: 36px;
	}

	.bbs-side {
		position: static;
	}
}

@media (max-width: 768px) {
	#bbpress-forums li.bbp-header {
		display: none;
	}

	#bbpress-forums li.bbp-body ul.bbp-forum,
	#bbpress-forums li.bbp-body ul.bbp-topic {
		grid-template-columns: 1fr;
		gap: 6px;
	}

	#bbpress-forums .bbp-forum-topic-count,
	#bbpress-forums .bbp-forum-reply-count,
	#bbpress-forums .bbp-topic-voice-count,
	#bbpress-forums .bbp-topic-reply-count {
		display: none;
	}

	#bbpress-forums .bbp-forum-freshness,
	#bbpress-forums .bbp-topic-freshness {
		font-size: 0.78rem;
	}

	#bbpress-forums #bbp-user-wrapper {
		grid-template-columns: 1fr;
	}

	.bbs-topic-item {
		padding: 14px 16px;
	}

	.bbs-meta-active {
		margin-left: 0;
	}
}

/* =========================================================
   17. bbPress 自定义模板组件（heisejidi/bbpress/ 模板专用）
   ========================================================= */

/* ---- 页面头 ---- */
.bbs-page-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px 24px;
	flex-wrap: wrap;
	margin: 0 0 24px;
	padding: 26px 30px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	position: relative;
	overflow: hidden;
}

.bbs-page-head::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: var(--grad);
	opacity: 0.7;
}

.bbs-page-title {
	margin: 0;
	font-size: 1.6rem;
	font-weight: 800;
	color: var(--text);
}

.bbs-page-desc {
	margin: 8px 0 0;
	color: var(--text-dim);
	font-size: 0.94rem;
}

/* ---- 注册 / 登录按钮 ---- */
.bbs-auth-actions {
	display: flex;
	gap: 10px;
	flex-shrink: 0;
}

.bbs-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	padding: 0 24px;
	border-radius: 10px;
	font-size: 0.9rem;
	font-weight: 650;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: all 0.22s ease;
}

.bbs-btn:active {
	transform: translateY(0) scale(0.98);
}

.bbs-btn:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(139, 124, 246, 0.35);
}

.bbs-btn-primary {
	background: var(--grad);
	color: #fff;
	box-shadow: var(--shadow-glow);
}

.bbs-btn-primary:hover {
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 12px 30px rgba(122, 108, 255, 0.32);
}

.bbs-btn-ghost {
	border: 1px solid var(--border-strong);
	color: var(--text-dim);
}

.bbs-btn-ghost:hover {
	border-color: rgba(122, 108, 255, 0.5);
	color: var(--text);
	background: var(--accent-soft);
	transform: translateY(-2px);
}

.bbs-page-tag {
	display: inline-flex;
	margin-top: 12px;
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent);
	font-size: 0.72rem;
	font-weight: 600;
}

.bbs-empty-title {
	margin: 0 0 8px;
	font-size: 1.1rem;
	color: var(--text);
}

/* ---- 版块头（单版块页） ---- */
.bbs-forum-head {
	display: flex;
	clear: both;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 16px;
	padding: 24px 28px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.bbs-forum-head-title {
	margin: 0;
	font-size: 1.4rem;
	font-weight: 800;
	color: var(--text);
}

.bbs-forum-head-desc {
	margin-top: 8px;
	color: var(--text-dim);
	font-size: 0.9rem;
	line-height: 1.7;
}

.bbs-forum-head-stats {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 10px;
}

.bbs-stat-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 7px 14px;
	background: var(--bg-elev);
	border: 1px solid var(--border);
	border-radius: 999px;
	color: var(--text-dim);
	font-size: 0.8rem;
	white-space: nowrap;
}

.bbs-stat-chip strong {
	color: var(--text);
	font-weight: 700;
}

.bbs-stat-fresh a {
	color: var(--text);
	font-weight: 600;
}

.bbs-stat-fresh a:hover {
	color: var(--accent);
}

.bbs-forum-actions {
	margin-bottom: 16px;
	color: var(--text-dim);
	font-size: 0.85rem;
}

.bbs-forum-actions a {
	color: var(--accent);
}

/* ---- 发帖按钮 / 表单面板 ---- */
.bbs-main-head .bbs-btn {
	flex-shrink: 0;
}

.bbs-new-topic-panel {
	margin-bottom: 20px;
	padding: 22px 24px;
	background: var(--card);
	background-image: linear-gradient(180deg, var(--sheen), transparent 46%);
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.bbs-new-topic-panel[hidden] {
	display: none;
}

.bbs-new-topic-panel .bbp-topic-form legend,
.bbs-new-topic-panel .bbp-form legend {
	color: var(--text);
	font-size: 1.05rem;
	font-weight: 750;
	padding: 0 0 12px;
}

.bbs-forum-head-side {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
	flex-shrink: 0;
}

.bbs-thread-actions {
	display: flex;
	justify-content: flex-end;
	clear: both;
	margin-bottom: 16px;
}

.bbs-thread-actions .bbs-btn {
	flex-shrink: 0;
}

@media (max-width: 768px) {
	.bbs-forum-head-side {
		align-items: flex-start;
	}

	.bbs-new-topic-panel {
		padding: 16px 16px;
	}
}

/* ---- 子版块卡片 ---- */
.bbs-subforum-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin-bottom: 26px;
}

.bbs-forum-card {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
	padding: 18px 20px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.bbs-forum-card:hover {
	border-color: var(--border-accent);
	transform: translateY(-2px);
	box-shadow: var(--shadow-hover);
}

.bbs-forum-card-main {
	min-width: 0;
}

.bbs-forum-card-title {
	display: block;
	color: var(--text);
	font-size: 1rem;
	font-weight: 700;
	transition: color 0.2s ease;
}

.bbs-forum-card-title:hover {
	color: var(--accent);
}

.bbs-forum-card-desc {
	margin-top: 5px;
	color: var(--text-faint);
	font-size: 0.84rem;
	line-height: 1.6;
}

.bbs-forum-card-meta {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 4px;
	color: var(--text-faint);
	font-size: 0.78rem;
	white-space: nowrap;
}

/* ---- 话题头卡（话题详情页） ---- */
.bbs-thread-head {
	margin-bottom: 22px;
	padding: 28px 32px;
	background-color: var(--card);
	background-image: linear-gradient(180deg, var(--sheen), transparent 46%);
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.bbs-thread-title {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 14px;
	font-size: 1.45rem;
	font-weight: 800;
	line-height: 1.4;
	color: var(--text);
}

.bbs-thread-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 14px;
	margin-bottom: 10px;
	color: var(--text-faint);
	font-size: 0.84rem;
}

.bbs-thread-author {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--text);
	font-weight: 600;
}

.bbs-thread-author:hover {
	color: var(--accent);
}

.bbs-thread-author img {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--bg-elev);
}

.bbs-thread-tags {
	display: block;
	margin-bottom: 8px;
	color: var(--text-faint);
	font-size: 0.82rem;
}

.bbs-thread-tags a {
	display: inline-flex;
	padding: 2px 10px;
	margin: 0 6px 6px 0;
	background: var(--bg-elev);
	border: 1px solid var(--border);
	border-radius: 999px;
	color: var(--text-dim);
	font-size: 0.78rem;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.bbs-thread-tags a:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.bbs-topic-desc {
	margin: 0;
	color: var(--text-faint);
	font-size: 0.85rem;
}

.bbs-thread-content {
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid var(--border);
}

.bbs-thread-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px 16px;
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid var(--border);
	color: var(--text-dim);
	font-size: 0.85rem;
}

.bbs-thread-actions a {
	color: var(--text-dim);
	transition: color 0.2s ease;
}

.bbs-thread-actions a:hover {
	color: var(--accent);
}

/* ---- 回复列表 ---- */
.bbs-reply-list {
	display: grid;
	gap: 14px;
}

.bbs-reply-card {
	display: grid;
	grid-template-columns: 150px minmax(0, 1fr);
	gap: 22px;
	padding: 22px 24px;
	background-color: var(--card);
	background-image: linear-gradient(180deg, var(--sheen), transparent 46%);
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.bbs-reply-author {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 0.88rem;
}

.bbs-reply-author .bbp-author-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--text);
	font-weight: 650;
}

.bbs-reply-author .bbp-author-link:hover {
	color: var(--accent);
}

.bbs-reply-author .bbp-author-avatar img {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid var(--border);
	background: var(--bg-elev);
	display: block;
}

.bbs-reply-author .bbp-author-name {
	color: var(--text);
	font-weight: 650;
}

.bbs-reply-author .bbp-author-role {
	color: var(--text-faint);
	font-size: 0.76rem;
}

.bbs-reply-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px 12px;
	margin-bottom: 10px;
	color: var(--text-faint);
	font-size: 0.78rem;
}

.bbs-reply-meta a {
	color: var(--text-dim);
}

.bbs-reply-meta a:hover {
	color: var(--accent);
}

.bbs-reply-anchor {
	color: var(--text-faint);
	font-weight: 600;
}

.bbs-reply-anchor:hover {
	color: var(--accent);
}

/* ---- 分页 ---- */
.bbs-pagination {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	margin: 22px 0;
	color: var(--text-faint);
	font-size: 0.85rem;
}

.bbs-page-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.bbs-page-links a,
.bbs-page-links .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	padding: 6px 11px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 9px;
	color: var(--text-dim);
	font-size: 0.85rem;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.bbs-page-links a:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.bbs-page-links .page-numbers.current {
	background: var(--grad);
	border-color: transparent;
	color: #fff;
	font-weight: 650;
}

/* ---- 搜索结果卡 ---- */
.bbs-result-card {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 16px 20px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.bbs-result-card:hover {
	border-color: var(--border-accent);
	transform: translateY(-2px);
	box-shadow: var(--shadow-hover);
}

.bbs-result-badge {
	flex-shrink: 0;
	margin-top: 2px;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent);
	font-size: 0.72rem;
	font-weight: 600;
}

.bbs-result-title {
	margin: 0;
	font-size: 1rem;
	font-weight: 650;
	line-height: 1.5;
}

.bbs-result-title a {
	color: var(--text);
	transition: color 0.2s ease;
}

.bbs-result-title a:hover {
	color: var(--accent);
}

.bbs-result-meta {
	margin-top: 6px;
	color: var(--text-faint);
	font-size: 0.78rem;
}

.bbs-result-excerpt {
	margin-top: 6px;
	color: var(--text-dim);
	font-size: 0.85rem;
	line-height: 1.65;
}

/* ---- 用户中心 ---- */
.bbs-user-card {
	margin-bottom: 16px;
	padding: 24px 18px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	text-align: center;
}

.bbs-user-avatar img {
	width: 110px;
	height: 110px;
	margin: 0 auto;
	border-radius: 50%;
	border: 3px solid var(--bg-elev);
	box-shadow: var(--shadow-sm);
}

.bbs-user-name {
	margin: 14px 0 4px;
	color: var(--text);
	font-size: 1.05rem;
}

.bbs-user-role {
	margin: 0;
	color: var(--text-faint);
	font-size: 0.8rem;
}

.bbs-user-description {
	color: var(--text-dim);
}

.bbs-user-info {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 12px;
	margin: 0;
}

.bbs-user-info-row {
	padding: 14px 16px;
	background: var(--bg-elev);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
}

.bbs-user-info-row dt {
	color: var(--text-faint);
	font-size: 0.78rem;
}

.bbs-user-info-row dd {
	margin: 4px 0 0;
	color: var(--text);
	font-size: 1.02rem;
	font-weight: 700;
}

/* ---- 论坛统计页 ---- */
.bbs-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 14px;
}

.bbs-stat {
	padding: 22px 18px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	text-align: center;
}

.bbs-stat strong {
	display: block;
	font-size: 1.7rem;
	font-weight: 800;
	background: var(--grad-text);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.bbs-stat span {
	display: block;
	margin-top: 4px;
	color: var(--text-faint);
	font-size: 0.82rem;
}

/* ---- 提示条（话题锁定等） ---- */
.bbs-notice {
	margin-bottom: 20px;
	padding: 16px 20px;
	background: var(--card);
	border: 1px solid var(--border);
	border-left: 3px solid var(--accent);
	border-radius: var(--radius-sm);
}

.bbs-notice-desc {
	margin: 0 0 10px;
	color: var(--text-dim);
	font-size: 0.9rem;
}

.bbs-notice-actions {
	display: flex;
	gap: 10px;
	margin: 0;
}

.bbs-notice-btn {
	display: inline-flex;
	padding: 6px 14px;
	border: 1px solid var(--border);
	border-radius: 8px;
	color: var(--text-dim);
	font-size: 0.8rem;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.bbs-notice-btn:hover {
	border-color: var(--accent);
	color: var(--accent);
}

/* ---- 行内操作（收藏 / 订阅） ---- */
.bbs-row-action a {
	color: var(--accent);
	font-weight: 600;
}

/* ---- 自定义模板响应式 ---- */
@media (max-width: 768px) {
	.bbs-page-head {
		flex-direction: column;
		align-items: flex-start;
		padding: 18px;
	}

	.bbs-page-title {
		font-size: 1.3rem;
	}

	.bbs-auth-actions {
		width: 100%;
	}

	.bbs-auth-actions .bbs-btn {
		flex: 1;
	}

	.bbs-forum-head {
		flex-direction: column;
		gap: 14px;
		padding: 20px 18px;
	}

	.bbs-forum-head-stats {
		justify-content: flex-start;
	}

	.bbs-subforum-list {
		grid-template-columns: 1fr;
	}

	.bbs-forum-card {
		flex-direction: column;
		gap: 10px;
	}

	.bbs-forum-card-meta {
		flex-direction: row;
		align-items: center;
		gap: 10px;
	}

	.bbs-thread-head {
		padding: 20px 18px;
	}

	.bbs-thread-title {
		font-size: 1.2rem;
	}

	.bbs-thread-author img {
		width: 22px;
		height: 22px;
	}

	.bbs-reply-card {
		grid-template-columns: 1fr;
		gap: 12px;
		padding: 16px 18px;
	}
}

/* =========================================================
   18. 前台登录 / 注册页
   ========================================================= */
.auth-wrap {
	display: flex;
	justify-content: center;
	padding: 40px 0 72px;
	position: relative;
	z-index: 1;
}

.auth-card {
	width: 100%;
	max-width: 440px;
	padding: 32px 32px 28px;
	background: var(--card);
	background-image: linear-gradient(180deg, var(--sheen), transparent 46%);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	position: relative;
	overflow: hidden;
	box-shadow: var(--shadow-sm);
}

.auth-card::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(420px 200px at 12% -8%, rgba(122, 108, 255, 0.14), transparent 65%);
	pointer-events: none;
}

.auth-card > * {
	position: relative;
	z-index: 1;
}

.auth-card .hero-kicker {
	margin-bottom: 12px;
}

.auth-title {
	margin: 0 0 6px;
	font-size: 1.7rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--text);
}

.auth-sub {
	margin: 0 0 22px;
	color: var(--text-dim);
	font-size: 0.92rem;
}

.auth-errors {
	margin-bottom: 18px;
	padding: 12px 15px;
	background: rgba(255, 92, 92, 0.08);
	border: 1px solid rgba(255, 92, 92, 0.32);
	border-radius: var(--radius-sm);
}

.auth-errors p {
	margin: 0;
	color: #ff9b9b;
	font-size: 0.88rem;
	line-height: 1.7;
}

[data-theme="light"] .auth-errors p {
	color: #c0392b;
}

.auth-field {
	margin-bottom: 16px;
}

.auth-field label {
	display: block;
	margin-bottom: 7px;
	font-size: 0.86rem;
	font-weight: 650;
	color: var(--text);
}

.auth-field input {
	width: 100%;
	padding: 12px 15px;
	background: var(--bg-elev);
	border: 1px solid var(--border-strong);
	border-radius: 11px;
	color: var(--text);
	font-size: 0.95rem;
	font-family: inherit;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-field input:focus {
	outline: none;
	border-color: rgba(122, 108, 255, 0.6);
	box-shadow: 0 0 0 3px var(--accent-soft);
}

.auth-field input:hover:not(:focus) {
	border-color: rgba(122, 108, 255, 0.45);
}

/* WebKit 自动填充背景覆盖 */
.auth-field input:-webkit-autofill,
.auth-field input:-webkit-autofill:hover,
.auth-field input:-webkit-autofill:focus {
	-webkit-box-shadow: 0 0 0 1000px var(--bg-elev) inset;
	-webkit-text-fill-color: var(--text);
	caret-color: var(--text);
	transition: background-color 99999s ease-out;
}

.auth-field ::placeholder {
	color: var(--text-faint);
	opacity: 1;
}

.auth-captcha {
	display: flex;
	align-items: stretch;
	gap: 10px;
}

.auth-captcha input {
	flex: 1;
	min-width: 0;
	letter-spacing: 0.06em;
	font-variant-numeric: tabular-nums;
}

.auth-captcha-q {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	padding: 0 14px;
	background: var(--bg-elev);
	border: 1px dashed var(--border-strong);
	border-radius: 11px;
	color: var(--text-dim);
	font-size: 0.9rem;
	font-weight: 650;
	letter-spacing: 0.05em;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.auth-hint {
	display: block;
	margin-top: 6px;
	color: var(--text-faint);
	font-size: 0.8rem;
}

.auth-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 2px 0 14px;
	font-size: 0.85rem;
	color: var(--text-dim);
}

.auth-row label {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	cursor: pointer;
	user-select: none;
}

.auth-row input[type="checkbox"] {
	width: 15px;
	height: 15px;
	accent-color: var(--accent);
}

.auth-submit {
	width: 100%;
	height: 46px;
	margin-top: 6px;
	border: none;
	cursor: pointer;
	font-size: 0.95rem;
}

.auth-switch {
	margin: 20px 0 0;
	padding-top: 16px;
	border-top: 1px solid var(--border);
	text-align: center;
	color: var(--text-faint);
	font-size: 0.88rem;
}

.auth-switch a {
	color: var(--accent);
	font-weight: 650;
	transition: color 0.2s ease;
}

.auth-switch a:hover {
	color: var(--accent-2);
}

@media (max-width: 768px) {
	.auth-card {
		padding: 26px 20px 24px;
	}

	.auth-captcha {
		flex-wrap: wrap;
	}

	.auth-captcha-q {
		width: 100%;
		justify-content: center;
	}
}
