/* ==========================================================================
   NavPress 主题样式 — v2.0 设计系统
   基于 Bootstrap 5.3 的 CSS 变量体系，3 套主题（grey-light / dark / black）
   + 双栏布局（侧边栏可折叠）+ 玻璃态/渐变/考究间距阴影
   ========================================================================== */

:root {
	/* 强调色（用于链接、按钮、强调、图表）。 */
	--np-accent: #f1404b;
	--np-accent-rgb: 241, 64, 75;
	--np-accent-soft: rgba(var(--np-accent-rgb), .12);
	--np-accent-soft-2: rgba(var(--np-accent-rgb), .22);

	/* 几何。 */
	--np-radius-sm: 6px;
	--np-radius: 10px;
	--np-radius-lg: 16px;
	--np-radius-xl: 20px;
	--np-sidebar-width: 240px;
	--np-sidebar-width-collapsed: 64px;
	--np-header-height: 56px;

	/* 动画。 */
	--np-transition: all .25s cubic-bezier(.4, 0, .2, 1);
	--np-transition-fast: all .15s ease;
	--np-ease-out: cubic-bezier(.4, 0, .2, 1);

	/* 字体。 */
	--np-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
		"Hiragino Sans GB", "Microsoft YaHei", Roboto, "Helvetica Neue", Arial, sans-serif;
	--np-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

	/* 排版尺寸。 */
	--np-text-xs: 12px;
	--np-text-sm: 13px;
	--np-text-base: 14px;
	--np-text-md: 15px;
	--np-text-lg: 17px;
	--np-text-xl: 20px;
	--np-text-2xl: 24px;
	--np-text-3xl: 30px;
}

/* ---------- 浅色主题（grey-light，默认） ---------- */
:root,
[data-bs-theme="light"] {
	--np-bg: #f7f8fa;
	--np-bg-elevated: #ffffff;
	--np-sidebar-bg: #ffffff;
	--np-card-bg: #ffffff;
	--np-border: rgba(0, 0, 0, .08);
	--np-border-strong: rgba(0, 0, 0, .14);
	--np-text: #1f2329;
	--np-text-muted: #6b7280;
	--np-shadow-sm: 0 1px 2px rgba(0, 0, 0, .04);
	--np-shadow: 0 2px 8px rgba(0, 0, 0, .06);
	--np-shadow-md: 0 6px 20px rgba(0, 0, 0, .08);
	--np-shadow-lg: 0 16px 40px rgba(0, 0, 0, .12);
	--np-glass-bg: rgba(255, 255, 255, .72);
	--np-glass-border: rgba(255, 255, 255, .5);
	--np-overlay: rgba(0, 0, 0, .04);
}

/* ---------- 暗黑主题（dark） ---------- */
[data-bs-theme="dark"] {
	--np-bg: #1c1e22;
	--np-bg-elevated: #262a30;
	--np-sidebar-bg: #1f2126;
	--np-card-bg: #262a30;
	--np-border: rgba(255, 255, 255, .08);
	--np-border-strong: rgba(255, 255, 255, .14);
	--np-text: #e6e8eb;
	--np-text-muted: #9aa3af;
	--np-shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
	--np-shadow: 0 2px 8px rgba(0, 0, 0, .35);
	--np-shadow-md: 0 6px 20px rgba(0, 0, 0, .45);
	--np-shadow-lg: 0 16px 40px rgba(0, 0, 0, .55);
	--np-glass-bg: rgba(38, 42, 48, .72);
	--np-glass-border: rgba(255, 255, 255, .06);
	--np-overlay: rgba(255, 255, 255, .04);
}

/* ---------- 纯黑主题（black，最深；与 data-bs-theme=dark 叠加） ---------- */
html.np-black[data-bs-theme="dark"] {
	--np-bg: #0f1012;
	--np-bg-elevated: #181a1d;
	--np-sidebar-bg: #14161a;
	--np-card-bg: #181a1d;
	--np-border: rgba(255, 255, 255, .06);
	--np-border-strong: rgba(255, 255, 255, .12);
	--np-text: #e6e8eb;
	--np-text-muted: #8a8f99;
	--np-shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
	--np-shadow: 0 2px 8px rgba(0, 0, 0, .55);
	--np-shadow-md: 0 6px 20px rgba(0, 0, 0, .65);
	--np-shadow-lg: 0 16px 40px rgba(0, 0, 0, .75);
	--np-glass-bg: rgba(24, 26, 29, .75);
	--np-glass-border: rgba(255, 255, 255, .05);
	--np-overlay: rgba(255, 255, 255, .03);
}

/* ---------- 基础 ---------- */
html, body {
	height: 100%;
}
body {
	background: var(--np-bg);
	color: var(--np-text);
	font-family: var(--np-font);
	font-size: var(--np-text-base);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	transition: background-color .3s ease, color .3s ease;
}

/* 双栏布局：左侧侧边栏 + 右侧主内容区。 */
.np-layout {
	display: flex;
	min-height: 100vh;
}
.np-sidebar {
	position: sticky;
	top: 0;
	width: var(--np-sidebar-width);
	height: 100vh;
	background: var(--np-sidebar-bg);
	border-right: 1px solid var(--np-border);
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	transition: width .3s var(--np-ease-out), transform .3s var(--np-ease-out);
	z-index: 1030;
}
.np-main-wrap {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	background: var(--np-bg);
}
/* ============================================================
   折叠态对齐体系（设计原则）
   折叠后侧边栏宽 64px，品牌 logo、菜单图标、底部图标三块必须
   共享同一条规则：图标在 64px 内水平居中，中心线统一为 32px。
   任何一块都不要靠自己的 flex 布局把图标挤到边上去。
   ============================================================ */
.np-layout.np-sidebar-collapsed .np-sidebar {
	width: var(--np-sidebar-width-collapsed);
}
/* 所有文字彻底隐藏（display:none 不占位，避免错位）。 */
.np-layout.np-sidebar-collapsed .np-sidebar-label,
.np-layout.np-sidebar-collapsed .np-sidebar-text,
.np-layout.np-sidebar-collapsed .np-sidebar-brand-text,
.np-layout.np-sidebar-collapsed .np-sidebar-footer-label {
	display: none;
}
/* 品牌区：logo 图标居中。收起 .np-sidebar-logo 的 flex:1，
   否则它会撑满 64px 并把 logo 顶到最左（中心 18px），与菜单图标（32px）错位。 */
.np-layout.np-sidebar-collapsed .np-sidebar-brand {
	justify-content: center;
	padding-left: 0;
	padding-right: 0;
}
.np-layout.np-sidebar-collapsed .np-sidebar-logo {
	flex: 0 0 auto;
	justify-content: center;
	gap: 0;
}
/* 菜单项：图标固定宽度 + 居中，三个顶级项严格对齐（中心 32px）。 */
.np-layout.np-sidebar-collapsed .np-sidebar-item > a {
	justify-content: center;
	padding-left: 0;
	padding-right: 0;
	gap: 0;
}

/* 移动端：侧边栏变成全屏抽屉。 */
@media (max-width: 991.98px) {
	.np-sidebar {
		position: fixed;
		left: 0;
		top: 0;
		transform: translateX(-100%);
		box-shadow: var(--np-shadow-lg);
		width: var(--np-sidebar-width);
	}
	.np-layout.np-sidebar-open .np-sidebar {
		transform: translateX(0);
	}
	.np-layout.np-sidebar-open::after {
		content: "";
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, .5);
		z-index: 1020;
	}
	/* 移动端折叠态：64px 图标条常驻，遮罩隐藏、主内容让位（不再遮挡）。 */
	.np-layout.np-sidebar-open.np-sidebar-collapsed::after {
		display: none;
	}
	.np-layout.np-sidebar-open.np-sidebar-collapsed .np-main-wrap {
		margin-left: var(--np-sidebar-width-collapsed);
	}
}

/* 页脚贴底（在主内容区内）。 */
.np-main { flex: 1 0 auto; }
.np-footer { flex-shrink: 0; }

a {
	color: var(--np-accent);
}
a:hover {
	color: var(--np-accent);
	filter: brightness(1.1);
}

/* 玻璃态基类。 */
.np-glass {
	background: var(--np-glass-bg);
	border: 1px solid var(--np-glass-border);
	backdrop-filter: saturate(180%) blur(20px);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
}

.min-width-0 {
	min-width: 0;
}

.text-truncate-2 {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---------- 页头 ---------- */
.np-header {
	background: var(--bs-body-bg);
	border-bottom: 1px solid var(--bs-border-color);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

.np-logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--np-accent), #6610f2);
	color: #fff;
	font-weight: 700;
	font-size: 20px;
}

.np-brand-text small {
	font-size: 12px;
}

.np-search .form-select {
	max-width: 96px;
	border-radius: 0;
	border-right: 0;
}

.np-search .form-control {
	border-radius: 0 8px 8px 0;
}

.np-theme-toggle {
	border: 1px solid var(--bs-border-color);
	color: var(--bs-body-color);
}

.np-theme-toggle:hover {
	background: var(--bs-tertiary-bg);
}

/* 移动端侧边导航抽屉（桌面端 offcanvas-lg 自动转为横向）。 */
.np-offcanvas {
	--bs-offcanvas-width: 300px;
}
.np-offcanvas .offcanvas-body {
	align-items: center;
}
.np-nav-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* ---------- 首页 Hero ---------- */
.np-hero {
	background:
		radial-gradient(60% 80% at 50% 0%, color-mix(in srgb, var(--np-accent) 10%, transparent), transparent);
}

.np-hero-search {
	max-width: 560px;
}

.np-hero-search .form-control {
	border-radius: 12px 0 0 12px;
}

.np-hero-search .btn {
	border-radius: 0 12px 12px 0;
}

/* ---------- 分类标签 ---------- */
.np-chip {
	display: inline-flex;
	align-items: center;
	padding: 6px 16px;
	border-radius: 999px;
	background: var(--bs-tertiary-bg);
	color: var(--bs-body-color);
	text-decoration: none;
	font-size: 14px;
	transition: var(--np-transition);
	border: 1px solid transparent;
}

.np-chip:hover {
	background: var(--np-accent);
	color: #fff;
}

/* ---------- 卡片 ---------- */
.np-card {
	position: relative;
	transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
	border: 1px solid var(--np-border);
	border-radius: var(--np-radius);
	overflow: hidden;
	background: var(--np-card-bg);
	box-shadow: var(--np-shadow-sm);
	height: 100%;
}

.np-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 26px 40px -24px rgba(0, 36, 100, .3);
	border-color: var(--np-border-strong);
}

.np-card-main {
	color: inherit;
	text-decoration: none;
	display: block;
}

.np-card-body {
	display: flex;
	align-items: center;
	padding: .938rem;
	position: relative;
}

.np-card-icon {
	width: 40px;
	height: 40px;
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(128, 128, 128, .1);
	border-radius: 50%;
	overflow: hidden;
	margin-right: .5rem;
}

.np-card-icon img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 50%;
	vertical-align: unset;
}

.np-card-info {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	padding-right: 5px;
}

.np-card-title {
	margin: 0;
	font-size: var(--np-text-base);
	font-weight: 600;
	line-height: 1.4;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.np-card-desc {
	margin: 0;
	line-height: 1.5;
	font-size: var(--np-text-xs);
	color: var(--np-text-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* 内联徽章（置顶 / NEW，显示在标题前）。 */
.np-tag {
	display: inline-block;
	font-size: 10px;
	font-weight: 600;
	line-height: 1;
	padding: 2px 4px;
	border-radius: 4px;
	margin-right: 4px;
	vertical-align: 1px;
}
.np-tag-sticky { background: #f1404b; color: #fff; }
.np-tag-new { background: var(--np-accent); color: #fff; }
.np-tag-type { background: #198754; color: #fff; }

/* 悬浮直达按钮：右上角半透明，hover 卡片时显现。 */
.np-card-goto {
	position: absolute;
	top: 16px;
	right: 8px;
	width: 30px;
	height: 30px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	color: var(--np-text-muted);
	text-decoration: none;
	font-size: 14px;
	opacity: .2;
	transition: opacity .25s ease, color .2s ease;
}
.np-card:hover .np-card-goto {
	opacity: 1;
}
.np-card-goto:hover {
	color: var(--np-accent);
}

/* 卡片尺寸变体（对齐 OneNav 的 default / max / mini）。 */
.np-card--maxi .np-card-icon {
	width: 60px;
	height: 60px;
}
.np-card--compact .np-card-icon {
	width: 25px;
	height: 25px;
}
.np-card--compact .np-card-body {
	padding: .4rem .5rem;
}

/* 无 hover 能力设备（触屏）：悬浮按钮常显。 */
@media (hover: none) {
	.np-card-goto { opacity: 1; }
}

/* ---------- 详情页 ---------- */
.np-detail-icon {
	width: 96px;
	height: 96px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--bs-tertiary-bg);
	overflow: hidden;
}

.np-detail-icon img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.np-detail-meta {
	background: var(--bs-tertiary-bg);
	color: var(--bs-secondary-color);
	font-weight: 500;
}

.np-detail-section-title {
	font-size: 18px;
	font-weight: 600;
	color: var(--np-text);
	margin-bottom: 1rem;
}
.np-detail-section-title i {
	color: var(--np-accent);
}

/* ---------- 首页模块 ---------- */
/* .np-content 已是统一容器（max-width + padding），内部 .container 不再叠加。 */
.np-content .container,
.np-module > .container {
	max-width: 100%;
	padding-left: 0;
	padding-right: 0;
}
.np-module {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	margin-bottom: 32px;
}
.np-module-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}
.np-module-head h2 {
	font-weight: 700;
	margin: 0;
	font-size: var(--np-text-lg);
	display: flex;
	align-items: center;
	gap: 8px;
}
.np-module-head h2 i {
	color: var(--np-accent);
}
.np-module-head .np-module-more {
	color: var(--np-text-muted);
	font-size: var(--np-text-sm);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	transition: var(--np-transition-fast);
}
.np-module-head .np-module-more:hover {
	color: var(--np-accent);
}

/* ---------- 侧边栏分类 AJAX 结果视图 ---------- */
.np-cat-result-head {
	padding-bottom: 12px;
	border-bottom: 1px solid var(--np-border);
}
.np-cat-result-head h1 {
	font-weight: 700;
	color: var(--np-text);
}
.np-cat-back {
	color: var(--np-text-muted);
	text-decoration: none;
	font-size: var(--np-text-sm);
	display: inline-flex;
	align-items: center;
	gap: 4px;
	transition: var(--np-transition-fast);
}
.np-cat-back:hover {
	color: var(--np-accent);
}

/* ---------- 卡片骨架屏（加载占位 + 扫光动画）---------- */
.np-skeleton-card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px;
	border: 1px solid var(--np-border);
	border-radius: var(--np-radius);
	background: var(--np-card-bg);
	height: 100%;
}
.np-skel-icon {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	flex-shrink: 0;
	background: linear-gradient(90deg, var(--np-overlay) 25%, var(--np-border-strong) 37%, var(--np-overlay) 63%);
	background-size: 400% 100%;
	animation: np-shimmer 1.2s infinite;
}
.np-skel-lines {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}
.np-skel-line {
	display: block;
	height: 12px;
	border-radius: 6px;
	background: linear-gradient(90deg, var(--np-overlay) 25%, var(--np-border-strong) 37%, var(--np-overlay) 63%);
	background-size: 400% 100%;
	animation: np-shimmer 1.2s infinite;
}
.np-skel-title {
	width: 160px;
	height: 22px;
}

/* 分类结果淡入（替换内容时平滑过渡，避免闪动）。 */
.np-fade-in { animation: np-fade-in .32s ease both; }
@keyframes np-fade-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

.np-category {
	border-bottom: 1px dashed var(--np-border);
	padding-bottom: 12px;
}

.np-category:last-child {
	border-bottom: none;
}

/* 分类标题（对齐 OneNav 的 h4.text-gray.text-lg + 图标 + 「更多」）。 */
.np-cat-title {
	font-size: 18px;
	font-weight: 600;
	color: var(--np-text);
}
.np-cat-title-icon {
	color: var(--np-accent);
	font-size: 18px;
}
.np-cat-more {
	font-size: var(--np-text-xs);
	color: var(--np-text-muted);
	text-decoration: none;
	transition: color .2s ease;
}
.np-cat-more:hover {
	color: var(--np-accent);
}

.np-html img {
	max-width: 100%;
	height: auto;
	border-radius: var(--np-radius);
}

/* ---------- 页面标题（归档 / 搜索，对齐 OneNav 的 h1.text-gray.text-lg + 图标） ---------- */
.np-page-title {
	font-size: 20px;
	font-weight: 600;
	color: var(--np-text);
	margin: 0;
}
.np-page-title-icon { color: var(--np-accent); }
.np-page-desc { font-size: var(--np-text-sm); }

/* 搜索结果 post_type 切换 Tab（对齐 OneNav 的 btn-search）。 */
.np-search-type-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.np-search-type-tab {
	display: inline-flex;
	align-items: center;
	padding: 5px 16px;
	font-size: 14px;
	color: var(--np-text-muted);
	border: 1px solid var(--np-border);
	border-radius: 999px;
	text-decoration: none;
	transition: all .2s ease;
}
.np-search-type-tab:hover { color: var(--np-text); border-color: var(--np-border-strong); }
.np-search-type-tab.active { color: #fff; background: var(--np-accent); border-color: var(--np-accent); }

/* ---------- 分页 ---------- */
.np-pagination ul.pagination {
	justify-content: center;
	margin: 0;
}

.np-pagination .page-link {
	border-radius: 8px;
	margin: 0 3px;
	color: var(--bs-body-color);
	background: var(--bs-tertiary-bg);
	border: none;
}

.np-pagination .page-link:hover {
	background: var(--np-accent);
	color: #fff;
}

.np-pagination .current .page-link {
	background: var(--np-accent);
	color: #fff;
}

/* ---------- 页脚 ---------- */
.np-footer {
	border-top: 1px solid var(--bs-border-color);
	margin-top: 48px;
	background: var(--bs-tertiary-bg);
}

/* 页脚信息条：所有屏幕（含移动端）保持单行水平排列，不换行。 */
.np-footer-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: nowrap;
}
.np-footer-copy {
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.np-footer-right {
	flex-shrink: 0;
	white-space: nowrap;
}

/* 友情链接 + 申请友链入口 */
.np-friendlinks {
	padding-bottom: 16px;
	margin-bottom: 16px;
	border-bottom: 1px solid var(--np-border);
}
.np-friendlinks-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}
.np-friendlinks-title {
	font-size: .95rem;
	font-weight: 700;
	margin: 0;
}
.np-friendlinks-title i { color: var(--np-accent); }
.np-friendlink-apply {
	font-size: .85rem;
	color: var(--np-accent);
	text-decoration: none;
	white-space: nowrap;
	transition: opacity .15s;
}
.np-friendlink-apply:hover { opacity: .8; }
.np-friendlinks-list {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	margin: 0;
	padding: 0;
}
.np-friendlinks-list li { margin: 0; }
.np-friendlinks-list a {
	font-size: .88rem;
	color: var(--np-text-muted);
	text-decoration: none;
	transition: color .15s;
}
.np-friendlinks-list a:hover { color: var(--np-accent); }

/* 顶部菜单 */
.np-topbar-menu {
	border-bottom: 1px solid var(--np-border);
	background: var(--bs-tertiary-bg);
}
.np-topbar-menu.np-topbar-sticky {
	position: sticky;
	top: 0;
	z-index: 1020;
	box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}
.np-topmenu {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0;
	padding: 0;
}
.np-topmenu li { margin: 0; }
.np-topmenu a {
	display: block;
	padding: 10px 16px;
	font-size: .9rem;
	color: var(--np-text-muted);
	text-decoration: none;
	border-radius: 6px;
	transition: color .15s, background .15s;
}
.np-topmenu a:hover { color: var(--np-accent); background: var(--np-overlay); }
.np-topmenu .current-menu-item > a,
.np-topmenu .current_page_item > a,
.np-topmenu .current-menu-ancestor > a {
	color: var(--np-accent);
	font-weight: 600;
}

/* 固定底部开关开启时：页脚悬浮在视口底部，body 留出底部空间由 JS 测量填充。 */
.np-footer.np-footer-fixed {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1020;
	margin-top: 0;
	box-shadow: 0 -6px 20px rgba(0, 0, 0, .08);
	animation: np-footer-in .25s ease both;
}
@keyframes np-footer-in { from { transform: translateY(100%); } to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
	.np-footer.np-footer-fixed { animation: none; }
}

/* ---------- 分页（横向） ---------- */
.np-pagination .page-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.np-pagination .page-numbers li { margin: 0; }
.np-pagination .page-numbers a,
.np-pagination .page-numbers span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 .75rem;
	border: 1px solid var(--bs-border-color);
	border-radius: 10px;
	background: var(--bs-body-bg);
	color: var(--bs-body-color);
	text-decoration: none;
	transition: var(--np-transition);
}
.np-pagination .page-numbers a:hover {
	border-color: var(--np-accent);
	color: var(--np-accent);
}
.np-pagination .page-numbers .current {
	background: var(--np-accent);
	border-color: var(--np-accent);
	color: #fff;
	font-weight: 600;
}
.np-pagination .page-numbers .dots {
	border: none;
	background: none;
}

/* ---------- 响应式 ---------- */
@media (max-width: 991.98px) {
	.np-search {
		margin: 12px 0;
		width: 100%;
	}

	/* 移动端侧边抽屉：内容纵向排布。 */
	.np-offcanvas .offcanvas-body {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}
	.np-offcanvas .navbar-nav .nav-link {
		padding: .6rem .75rem;
		border-radius: 8px;
	}
	.np-offcanvas .navbar-nav .nav-link:hover {
		background: var(--bs-tertiary-bg);
	}
	.np-offcanvas .np-search {
		margin: 0;
	}
	.np-nav-actions {
		border-top: 1px solid var(--bs-border-color);
		padding-top: 12px;
	}
	.np-nav-actions .btn {
		flex: 1;
	}
	.np-nav-actions .np-theme-toggle {
		flex: 0 0 auto;
	}
}

/* ==========================================================================
   体验升级：Hero / 卡片徽章 / Tab / 排行榜 / 我的导航 / 外观 / 加载
   ========================================================================== */

/* ---------- Hero 头图背景 ---------- */
.np-hero {
	position: relative;
	border-radius: var(--np-radius-lg);
	margin-bottom: 24px;
	border: 1px solid var(--np-border);
}
/* Hero 内容上下留白（对齐 OneNav header-big 的上下 padding），避免标题/口号/搜索框逼近边缘。 */
.np-hero .container {
	padding-top: 56px;
	padding-bottom: 56px;
}
@media (max-width: 575.98px) {
	.np-hero .container { padding-top: 40px; padding-bottom: 40px; }
}
.np-hero--gradient {
	background:
		radial-gradient(80% 110% at 50% -20%, color-mix(in srgb, var(--np-accent) 22%, transparent), transparent 70%),
		linear-gradient(180deg, color-mix(in srgb, var(--np-accent) 9%, var(--np-bg-elevated)), var(--np-bg-elevated));
}
.np-hero--wallpaper::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: linear-gradient(180deg, rgba(0,0,0,.3), rgba(0,0,0,.55));
}
.np-hero--wallpaper .container { position: relative; z-index: 1; color: #fff; }
.np-hero--wallpaper .np-hero-slogan { color: rgba(255,255,255,.85) !important; }
.np-hero--none { background: var(--np-bg-elevated); }
.np-hero-title { letter-spacing: 6px; font-weight: 700; color: var(--np-text); }
.np-hero-slogan { color: var(--np-text-muted) !important; }
.np-hero-search { max-width: 620px; position: relative; }

/* 聚合搜索引擎 Tab（对齐 OneNav 的 s-type-list）。 */
.np-search-tabs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px 8px;
	margin: 0 auto 16px;
	max-width: 620px;
}
.np-search-tab {
	display: inline-flex;
	align-items: center;
	padding: 4px 14px;
	font-size: 14px;
	color: var(--np-text-muted);
	border-radius: 999px;
	cursor: pointer;
	margin: 0;
	user-select: none;
	transition: all .2s ease;
}
.np-search-tab:hover { color: var(--np-text); background: var(--np-overlay); }
.np-search-tab.active { color: #fff; background: var(--np-accent); }

/* 玻璃态胶囊搜索框（对齐 OneNav 的 super-search-fm）。 */
.np-hero-search {
	display: flex;
	align-items: center;
	background: var(--np-glass-bg);
	border: 1px solid var(--np-glass-border);
	border-radius: 999px;
	padding: 6px 6px 6px 14px;
	backdrop-filter: saturate(180%) blur(20px);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	box-shadow: var(--np-shadow-md);
}
.np-hero-input {
	flex: 1;
	min-width: 0;
	border: none;
	background: transparent;
	outline: none;
	font-size: 16px;
	color: var(--np-text);
	padding: 8px 12px;
}
.np-hero-input::placeholder { color: var(--np-text-muted); }
.np-ai-toggle {
	flex: none;
	width: 38px;
	height: 38px;
	border: none;
	background: transparent;
	color: var(--np-text-muted);
	border-radius: 999px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all .2s ease;
}
.np-ai-toggle.active { background: var(--np-accent); color: #fff; }
.np-hero-btn {
	flex: none;
	width: 46px;
	height: 46px;
	border: none;
	background: var(--np-accent);
	color: #fff;
	border-radius: 999px;
	cursor: pointer;
	font-size: 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: filter .2s ease;
}
.np-hero-btn:hover { filter: brightness(1.08); }

/* 壁纸模式：搜索区元素适配浅色文字。 */
.np-hero--wallpaper .np-hero-title { color: #fff; }
.np-hero--wallpaper .np-search-tab { color: rgba(255,255,255,.85); }
.np-hero--wallpaper .np-search-tab:hover { color: #fff; background: rgba(255,255,255,.12); }
.np-hero--wallpaper .np-hero-search {
	background: rgba(255,255,255,.16);
	border-color: rgba(255,255,255,.25);
	backdrop-filter: saturate(180%) blur(20px);
}
.np-hero--wallpaper .np-hero-input { color: #fff; }
.np-hero--wallpaper .np-hero-input::placeholder { color: rgba(255,255,255,.8); }
.np-hero--wallpaper .np-ai-toggle { color: rgba(255,255,255,.85); }

@media (max-width: 575.98px) {
	.np-hero-title { letter-spacing: 2px; }
}

/* ---------- 热搜词 ---------- */
.np-hot-words { margin-left: auto; margin-right: auto; max-width: 620px; }
.np-chip {
	background: var(--np-bg-elevated);
	border: 1px solid var(--np-border);
	color: var(--np-text);
}
.np-chip:hover {
	background: var(--np-accent);
	border-color: var(--np-accent);
	color: #fff;
}
.np-chip-sm { padding: 3px 14px; font-size: 13px; border-radius: 999px; }

/* ---------- 卡片样式变体 ---------- */
/* 尺寸变体（maxi / compact）已在 .np-card--maxi / .np-card--compact 上定义，见卡片区块。 */
/* 外观编辑器「紧凑密度」实时作用到全局网格。 */
body.np-density-compact .np-card-body { padding: .65rem; }
body.np-density-compact .np-card-icon { width: 38px; height: 38px; }
body.np-density-compact .np-card-title { font-size: 14px; }

/* ---------- 分类 Tab ---------- */
.np-cat-tabs { scrollbar-width: thin; }
.np-cat-tab {
	white-space: nowrap;
	border-radius: 999px !important;
	margin-right: 8px;
	padding: 6px 16px;
	font-size: 14px;
}
.np-cat-content { min-height: 120px; }
.np-skeleton .np-card { background: linear-gradient(90deg, var(--bs-tertiary-bg) 25%, var(--bs-secondary-bg) 37%, var(--bs-tertiary-bg) 63%); background-size: 400% 100%; animation: np-shimmer 1.2s infinite; }
@keyframes np-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ---------- 排行榜 ---------- */
.np-rank-list {
	background: var(--np-card-bg);
	border: 1px solid var(--np-border);
	border-radius: var(--np-radius-lg);
	padding: 8px 16px;
	box-shadow: var(--np-shadow-sm);
}
.np-rank-item { border-bottom: 1px dashed var(--np-border); }
.np-rank-item:last-child { border-bottom: none; }
.np-rank-no {
	width: 26px;
	height: 26px;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	background: var(--np-overlay);
	font-weight: 700;
	font-size: 13px;
	color: var(--np-text-muted);
}
.np-rank-top { background: var(--np-accent); color: #fff; }
.np-rank-ico { background: var(--np-overlay); object-fit: contain; padding: 4px; }
.np-rank-link { color: var(--np-text); }
.np-rank-link:hover { color: var(--np-accent); }
.np-rank-views { color: var(--np-text-muted) !important; }

/* ---------- 我的导航 ---------- */
.np-mynav { scroll-margin-top: 80px; }
.np-mynav-item {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: .6rem .7rem;
	border: 1px solid var(--bs-border-color);
	border-radius: var(--np-radius);
	text-decoration: none;
	color: var(--bs-body-color);
	background: var(--bs-body-bg);
	transition: var(--np-transition);
}
.np-mynav-item:hover { border-color: color-mix(in srgb, var(--np-accent) 45%, var(--bs-border-color)); transform: translateY(-2px); }
.np-mynav-item img { width: 28px; height: 28px; border-radius: 6px; object-fit: contain; background: var(--bs-tertiary-bg); flex-shrink: 0; }
.np-mynav-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.np-mynav-remove { position: absolute; top: 2px; right: 4px; border: none; background: none; color: var(--bs-secondary-color); font-size: 12px; opacity: 0; }
.np-mynav-item:hover .np-mynav-remove { opacity: 1; }
.np-mynav-remove:hover { color: #dc3545; }

/* ---------- 搜索联想 ---------- */
.np-search-suggest {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	z-index: 60;
	max-height: 360px;
	overflow-y: auto;
	display: none;
	padding: .35rem;
}
.np-search-suggest.show { display: block; }
.np-suggest-item { display: flex; align-items: center; gap: 10px; padding: .5rem .6rem; border-radius: 8px; color: var(--bs-body-color); text-decoration: none; }
.np-suggest-item:hover, .np-suggest-item.active { background: var(--bs-tertiary-bg); }
.np-suggest-item img { width: 24px; height: 24px; border-radius: 6px; object-fit: contain; background: var(--bs-tertiary-bg); }
.np-suggest-item small { color: var(--bs-secondary-color); margin-left: auto; }

/* ---------- 加载动画 ---------- */
.np-loading {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--bs-body-bg);
	transition: opacity .4s ease;
}
.np-loading.hide { opacity: 0; pointer-events: none; }
.np-spinner {
	width: 42px;
	height: 42px;
	border: 4px solid color-mix(in srgb, var(--np-accent) 25%, transparent);
	border-top-color: var(--np-accent);
	border-radius: 50%;
	animation: np-spin .8s linear infinite;
}
@keyframes np-spin { to { transform: rotate(360deg); } }

/* ---------- 入场动画 ---------- */
/* 默认不在滚动时做位移动画，避免内容反复跳动（分类切换仍用 skeleton 灰屏过渡）。
   如需首屏淡入，可给容器加 .np-anim 并保留下方 keyframes。 */
@keyframes np-fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.np-anim .np-card { animation: np-fade-up .4s ease both; }

/* ---------- 滚动揭示动画（JS 加 .np-reveal，进入视口加 .np-revealed）---------- */
.np-reveal {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity .55s var(--np-ease-out), transform .55s var(--np-ease-out);
}
.np-reveal.np-revealed {
	opacity: 1;
	transform: translateY(0);
}

/* ---------- 外观编辑器抽屉 ---------- */
.np-appearance-panel {
	position: fixed;
	top: 0;
	right: 0;
	height: 100%;
	width: 300px;
	max-width: 86vw;
	z-index: 1060;
	background: #1c1f26;
	color: #fff;
	box-shadow: -8px 0 30px rgba(0,0,0,.35);
	transform: translateX(100%);
	transition: transform .3s ease;
	padding: 1rem;
	overflow-y: auto;
}
.np-appearance-panel.open { transform: translateX(0); }
.np-appearance-head { margin-bottom: 1rem; }
.np-accent-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.np-accent-dot.active { border-color: #fff; }
.np-accent-custom { width: 34px; height: 34px; border: none; background: none; padding: 0; cursor: pointer; }
.np-action-btn { border: 1px solid var(--bs-border-color); color: var(--bs-body-color); }
.np-action-btn:hover { background: var(--bs-tertiary-bg); }

/* ==========================================================================
   v2.0 双栏布局 — 侧边栏 + 移动端顶栏
   ========================================================================== */

/* ---------- 侧边栏品牌区 ---------- */
.np-sidebar-brand {
	padding: 16px 18px;
	border-bottom: 1px solid var(--np-border);
	display: flex;
	align-items: center;
	min-height: calc(var(--np-header-height) + 20px);
	flex-shrink: 0;
}
.np-sidebar-logo {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: var(--np-text);
	flex: 1;
	min-width: 0;
}
.np-sidebar-logo .np-logo {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--np-accent), #6610f2);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 18px;
	flex-shrink: 0;
}
.np-sidebar-brand-text {
	min-width: 0;
	line-height: 1.2;
}
.np-sidebar-brand-text .fw-bold {
	font-size: var(--np-text-md);
	color: var(--np-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	display: block;
}
.np-sidebar-brand-text small {
	font-size: 11px;
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: var(--np-text-muted);
}

/* ---------- 侧边栏菜单 ---------- */
.np-sidebar-menu {
	flex: 1 1 auto;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 12px;
	scrollbar-width: thin;
	scrollbar-color: var(--np-border-strong) transparent;
}
.np-sidebar-menu::-webkit-scrollbar { width: 6px; }
.np-sidebar-menu::-webkit-scrollbar-thumb { background: var(--np-border-strong); border-radius: 3px; }
.np-sidebar-menu::-webkit-scrollbar-track { background: transparent; }

.np-sidebar-list {
	list-style: none;
	padding: 0;
	margin: 0;
}
.np-sidebar-item { margin: 2px 0; }
.np-sidebar-link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 9px 12px;
	border-radius: 8px;
	color: var(--np-text);
	text-decoration: none;
	font-size: var(--np-text-base);
	transition: var(--np-transition-fast);
}
.np-sidebar-link i {
	font-size: 18px;
	width: 20px;
	text-align: center;
	color: var(--np-text-muted);
	transition: color .2s ease;
	flex-shrink: 0;
}
.np-sidebar-link:hover {
	background: var(--np-overlay);
	color: var(--np-text);
}
.np-sidebar-link:hover i { color: var(--np-accent); }
.np-sidebar-link.active {
	background: var(--np-accent-soft);
	color: var(--np-accent);
	font-weight: 600;
}
.np-sidebar-link.active i { color: var(--np-accent); }
.np-sidebar-label {
	flex: 1;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: opacity .2s ease;
}

/* ---------- 侧边栏分类树（子菜单）---------- */
/* 折叠箭头：绝对定位到菜单项右侧，不参与 flex 布局、不挤占图标位置（对齐 OneNav .sidebar-more）。 */
.np-sidebar-item {
	position: relative;
}
.np-sidebar-more {
	position: absolute;
	top: 0;
	right: 6px;
	height: 100%;
	max-height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	color: var(--np-text-muted);
	font-size: 12px;
	cursor: pointer;
	transition: transform .25s ease, color .2s ease;
}
.np-sidebar-more.open { transform: rotate(180deg); }
.np-sidebar-more:hover { color: var(--np-accent); }

.np-sidebar-submenu {
	list-style: none;
	margin: 0;
	padding: 0 0 0 18px;
}
.np-sidebar-submenu .np-sidebar-submenu {
	padding-left: 14px;
}
.np-sidebar-sublink {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 7px 10px;
	border-radius: 8px;
	color: var(--np-text-muted);
	text-decoration: none;
	font-size: var(--np-text-sm);
	transition: var(--np-transition-fast);
}
.np-sidebar-sublink i.bi-folder2 {
	font-size: 14px;
	width: 16px;
	text-align: center;
	flex-shrink: 0;
	color: var(--np-text-muted);
	opacity: .7;
}
.np-sidebar-sublink:hover {
	background: var(--np-overlay);
	color: var(--np-text);
}
.np-sidebar-sublink:hover i.bi-folder2 { color: var(--np-accent); opacity: 1; }
.np-sidebar-sublink.active {
	color: var(--np-accent);
	font-weight: 600;
}
.np-sidebar-sublink.active i.bi-folder2 { color: var(--np-accent); opacity: 1; }
.np-sub-toggle {
	border: none;
	background: transparent;
	color: var(--np-text-muted);
	padding: 0 2px;
	cursor: pointer;
	font-size: 12px;
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
}
.np-sub-toggle i { transition: transform .25s ease; }
.np-sub-toggle.open i { transform: rotate(180deg); }
.np-sub-hidden { display: none; }

/* 折叠态：分类树与折叠箭头隐藏，仅保留顶级菜单图标。 */
.np-layout.np-sidebar-collapsed .np-sidebar-submenu {
	display: none;
}
.np-layout.np-sidebar-collapsed .np-sidebar-more {
	display: none;
}

/* ---------- 侧边栏底部工具区 ---------- */
.np-sidebar-footer {
	border-top: 1px solid var(--np-border);
	padding: 8px 10px;
	display: flex;
	gap: 4px;
	flex-shrink: 0;
}
.np-sidebar-action {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	padding: 8px 4px;
	border: none;
	background: transparent;
	color: var(--np-text-muted);
	border-radius: 8px;
	cursor: pointer;
	font-size: 10px;
	transition: var(--np-transition-fast);
	min-width: 0;
}
.np-sidebar-action i { font-size: 16px; }
.np-sidebar-action:hover {
	background: var(--np-overlay);
	color: var(--np-accent);
}
.np-sidebar-footer-label {
	transition: opacity .2s ease;
	white-space: nowrap;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ---------- 折叠态：侧边栏底部纵向、按钮占满 ---------- */
.np-layout.np-sidebar-collapsed .np-sidebar-footer {
	flex-direction: column;
	padding: 8px 6px;
}
.np-layout.np-sidebar-collapsed .np-sidebar-action {
	width: 100%;
}

/* ---------- 移动端顶栏（仅 <992px 显示）---------- */
.np-mobile-topbar {
	height: var(--np-header-height);
	background: var(--np-bg-elevated);
	border-bottom: 1px solid var(--np-border);
	display: flex;
	align-items: center;
	padding: 0 12px;
	gap: 8px;
	position: sticky;
	top: 0;
	z-index: 1020;
}
.np-mobile-menu {
	width: 40px; height: 40px;
	border: none; background: transparent;
	color: var(--np-text);
	font-size: 22px;
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.np-mobile-menu:hover { background: var(--np-overlay); }
.np-mobile-brand {
	color: var(--np-text);
	text-decoration: none;
	font-weight: 600;
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: var(--np-text-md);
}

/* ---------- 主内容区通用 ---------- */
.np-content {
	padding: 20px;
	max-width: 1600px;
	margin: 0 auto;
	width: 100%;
}
@media (min-width: 1200px) {
	.np-content { padding: 28px 32px; }
}

/* ---------- 轻量 toast 提示 ---------- */
.np-toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 1080;
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: center;
	pointer-events: none;
}
.np-toast-item {
	max-width: 80vw;
	padding: 10px 18px;
	background: rgba(33, 37, 41, .92);
	color: #fff;
	font-size: 14px;
	border-radius: 999px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .25s ease, transform .25s ease;
}
.np-toast-item.show {
	opacity: 1;
	transform: translateY(0);
}

/* ---------- 前台投稿中心 ---------- */
.np-submit-title { font-weight: 700; }
.np-submit-page-title { font-weight: 700; }
.np-submit-tabs { flex-wrap: wrap; gap: 4px; }
.np-submit-tab { border-radius: 999px !important; }
.np-submit-side {
	background: var(--np-overlay);
	border-radius: var(--np-radius);
	padding: 16px;
}
.np-submit-msg { white-space: nowrap; }

/* 图标上传预览 */
.np-icon-upload { align-items: center; }
.np-icon-preview {
	width: 56px;
	height: 56px;
	flex: 0 0 56px;
	border: 1px dashed var(--np-border);
	border-radius: var(--np-radius-sm, 8px);
	background: var(--np-overlay);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--np-text-muted);
	font-size: 20px;
	overflow: hidden;
}
.np-icon-preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* 图形验证码 */
.np-captcha-img {
	display: inline-flex;
	align-items: center;
	height: 44px;
	border-radius: var(--np-radius-sm, 8px);
	overflow: hidden;
	border: 1px solid var(--np-border);
	background: #f4f6f8;
	cursor: pointer;
}
.np-captcha-img img { height: 44px; width: 120px; display: block; }
.np-captcha-img:hover { opacity: .9; }

/* ---------- 文章（独立入口 / 列表 / 详情） ---------- */
.np-article-list { display: flex; flex-direction: column; gap: 16px; }
.np-article-card {
	border: 1px solid var(--np-border);
	border-radius: var(--np-radius-lg);
	transition: box-shadow .2s, border-color .2s, transform .2s;
}
.np-article-card:hover {
	border-color: var(--np-accent);
	box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
	transform: translateY(-2px);
}
.np-article-title a { color: var(--np-text); }
.np-article-title a:hover { color: var(--np-accent); }
.np-article-excerpt { line-height: 1.7; }
.np-article-detail-head { border-bottom: 1px solid var(--np-border); padding-bottom: 16px; }
.np-article-detail-content { line-height: 1.9; font-size: 1rem; }
.np-article-detail-content img { max-width: 100%; height: auto; border-radius: var(--np-radius); }
.np-article-detail-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.np-tag-link {
	display: inline-block;
	padding: 2px 10px;
	font-size: .8rem;
	border-radius: 999px;
	background: var(--np-overlay);
	color: var(--np-text-muted);
	text-decoration: none;
}
.np-tag-link:hover { color: var(--np-accent); background: rgba(13, 110, 253, .1); }
.np-article-nav-item a { text-decoration: none; color: var(--np-text-muted); }
.np-article-nav-item a:hover { color: var(--np-accent); }

/* ---------- 文章侧边栏小部件 ---------- */
.np-article-sidebar { display: flex; flex-direction: column; gap: 16px; }
.np-article-sidebar .np-widget {
	border: 1px solid var(--np-border);
	border-radius: var(--np-radius-lg);
	box-shadow: none;
}
.np-widget-title {
	font-size: 1rem;
	font-weight: 700;
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--np-border);
}
.np-widget-title i { color: var(--np-accent); }
.np-widget-author .avatar { box-shadow: 0 4px 12px rgba(0, 0, 0, .12); }

.np-widget-list { list-style: none; padding: 0; margin: 0; }
.np-widget-list li { margin-bottom: 6px; }
.np-widget-list li:last-child { margin-bottom: 0; }
.np-widget-list a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 8px 12px;
	border-radius: 8px;
	color: var(--np-text);
	text-decoration: none;
	transition: background .15s, color .15s;
}
.np-widget-list a:hover { background: var(--np-overlay); color: var(--np-accent); }
.np-widget-list-label {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.np-widget-count {
	flex-shrink: 0;
	min-width: 24px;
	padding: 1px 8px;
	font-size: .75rem;
	text-align: center;
	border-radius: 999px;
	background: var(--np-overlay);
	color: var(--np-text-muted);
}
.np-widget-list a:hover .np-widget-count { background: rgba(13, 110, 253, .12); color: var(--np-accent); }

.np-widget-comments { list-style: none; padding: 0; margin: 0; }
.np-widget-comments li {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 10px 0;
	border-bottom: 1px dashed var(--np-border);
}
.np-widget-comments li:last-child { border-bottom: 0; padding-bottom: 0; }
.np-widget-comments img { border-radius: 50%; }
.np-widget-comment-body { min-width: 0; }
.np-widget-comment-body p { line-height: 1.5; margin-top: 2px; }

/* 热门文章小部件 */
.np-widget-hot { list-style: none; padding: 0; margin: 0; }
.np-widget-hot li { margin-bottom: 4px; }
.np-widget-hot li:last-child { margin-bottom: 0; }
.np-widget-hot a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 10px;
	border-radius: 8px;
	color: var(--np-text);
	text-decoration: none;
	transition: background .15s, color .15s;
}
.np-widget-hot a:hover { background: var(--np-overlay); color: var(--np-accent); }
.np-hot-rank {
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: .75rem;
	font-weight: 700;
	border-radius: 6px;
	background: var(--np-overlay);
	color: var(--np-text-muted);
}
.np-hot-rank-top { background: var(--np-accent); color: #fff; }
.np-hot-title {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

/* 标签云小部件 */
.np-widget-tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- 文章评论区 ---------- */
.np-comments-title { font-weight: 700; }
.np-comment-list { list-style: none; padding: 0; margin: 0; }
.np-comment-list > li { padding: 16px 0; border-bottom: 1px solid var(--np-border); }
.np-comment-list .comment-body { position: relative; padding-left: 60px; min-height: 48px; }
.np-comment-list .avatar { position: absolute; left: 0; top: 4px; border-radius: 50%; }
.np-comment-list .comment-author { font-weight: 600; }
.np-comment-list .comment-metadata { font-size: .8rem; color: var(--np-text-muted); margin-bottom: 8px; }
.np-comment-list .comment-metadata a { color: var(--np-text-muted); text-decoration: none; }
.np-comment-list .comment-content { line-height: 1.7; }
.np-comment-list .reply { margin-top: 8px; font-size: .85rem; }
.np-comment-list .children { list-style: none; padding-left: 24px; margin-top: 12px; }
.np-comments .comment-form label { display: block; margin-bottom: 4px; font-size: .9rem; }
.np-comments .comment-form input[type="text"],
.np-comments .comment-form input[type="email"],
.np-comments .comment-form input[type="url"],
.np-comments .comment-form textarea {
	width: 100%;
	padding: 8px 12px;
	margin-bottom: 12px;
	border: 1px solid var(--np-border);
	border-radius: 8px;
	background: var(--bs-body-bg, #fff);
	color: var(--np-text);
}
.np-comments .comment-form textarea { min-height: 120px; }
.np-comments .comment-form .submit { border: none; }

/* ---------- 文章点赞 ---------- */
.np-article-actions .btn.np-liked {
	color: #fff;
	background: #f1404b;
	border-color: #f1404b;
}
.np-article-actions .btn.np-liked:hover { color: #fff; background: #d5303a; border-color: #d5303a; }

/* ---------- 尊重系统"减少动态效果" ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
		scroll-behavior: auto !important;
	}
}
