/* ==========================================================
   Akai - AI 工具导航主题主样式
   ========================================================== */

:root {
	--bg: #0a0e1a;
	--bg-soft: #0e1424;
	--card: #131b30;
	--card-hover: #17213c;
	--border: rgba(148, 163, 184, 0.14);
	--text: #e8edf6;
	--text-dim: #98a5bd;
	--text-faint: #64748b;
	--primary: #6366f1;
	--primary-2: #a855f7;
	--accent-grad: linear-gradient(135deg, #6366f1, #a855f7);
	--success: #34d399;
	--warning: #fbbf24;
	--danger: #f87171;
	--radius: 14px;
	--radius-sm: 10px;
	--shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
	--header-h: 64px;
	--sidebar-w: 248px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
		"Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
	font-size: 15px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	padding-left: var(--sidebar-w);
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--primary);
	text-decoration: none;
	transition: color 0.2s ease;
}

a:hover {
	color: var(--primary-2);
}

.container {
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 20px;
}

/* 仅屏幕阅读器可见 */
.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;
	word-wrap: normal !important;
}

/* ===================== 按钮 ===================== */

.akai-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 9px 18px;
	border: none;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
	line-height: 1.4;
}

.akai-btn-primary {
	background: var(--accent-grad);
	color: #fff;
	box-shadow: 0 4px 18px rgba(99, 102, 241, 0.35);
}

.akai-btn-primary:hover {
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 6px 24px rgba(168, 85, 247, 0.45);
}

.akai-btn-ghost {
	background: transparent;
	color: var(--text);
	border: 1px solid var(--border);
}

.akai-btn-ghost:hover {
	color: var(--text);
	border-color: var(--primary);
	background: rgba(99, 102, 241, 0.08);
}

.akai-btn-lg {
	padding: 12px 26px;
	font-size: 15px;
}

/* ===================== 页头（左侧栏） ===================== */

.site-header {
	position: fixed;
	left: 0;
	top: 0;
	bottom: 0;
	width: var(--sidebar-w);
	z-index: 100;
	background: rgba(10, 14, 26, 0.92);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-right: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	overscroll-behavior: contain;
	transition: transform 0.28s ease;
}

/* 侧栏收起：页面让出宽度、侧栏左移滑出 */
body {
	transition: padding-left 0.28s ease;
}

html.nav-collapsed body {
	padding-left: 0;
}

html.nav-collapsed .site-header {
	transform: translateX(-100%);
}

/* 收起/展开按钮：放在顶部导航最左侧 */
.sidebar-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	padding: 0;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 9px;
	color: var(--text-dim);
	cursor: pointer;
	transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.sidebar-toggle:hover {
	color: var(--primary-2);
	border-color: var(--primary);
	background: rgba(99, 102, 241, 0.08);
}

.sidebar-toggle svg {
	transition: transform 0.28s ease;
}

html.nav-collapsed .sidebar-toggle svg {
	transform: rotate(180deg);
}

/* ===================== 内容区顶部导航 ===================== */

.top-nav {
	position: sticky;
	top: 0;
	z-index: 90;
	background: rgba(10, 14, 26, 0.88);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--border);
}

.top-nav-inner {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 12px;
	min-height: 58px;
	padding-top: 8px;
	padding-bottom: 8px;
}

/* 复用主导航菜单，但在顶部导航里横向排列 */
.top-nav .main-nav-list {
	flex-direction: row;
	flex-wrap: wrap;
	width: auto;
	gap: 4px;
}

.top-nav .main-nav-list a {
	padding: 7px 13px;
	font-size: 14px;
}

/* 顶部导航二级菜单：父项悬停 / 键盘聚焦时向下弹出 */
.top-nav .menu-item-has-children {
	position: relative;
}

.top-nav .menu-item-has-children > a::after {
	content: '';
	display: inline-block;
	width: 5px;
	height: 5px;
	margin-left: 7px;
	margin-bottom: 2px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	opacity: 0.7;
	vertical-align: middle;
	transform: rotate(45deg);
	transition: transform 0.25s ease;
}

.top-nav .menu-item-has-children:hover > a::after,
.top-nav .menu-item-has-children:focus-within > a::after {
	transform: rotate(-135deg);
	margin-bottom: -1px;
}

.top-nav .sub-menu {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	z-index: 20;
	min-width: 180px;
	margin: 0;
	padding: 8px;
	list-style: none;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.top-nav .menu-item-has-children:hover > .sub-menu,
.top-nav .menu-item-has-children:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.top-nav .sub-menu a {
	display: block;
	padding: 8px 12px;
	border-radius: 8px;
	color: var(--text-dim);
	font-size: 14px;
	white-space: nowrap;
	transition: background 0.2s ease, color 0.2s ease;
}

.top-nav .sub-menu a:hover,
.top-nav .sub-menu li.current-menu-item > a {
	color: var(--text);
	background: rgba(99, 102, 241, 0.12);
}

/* 登录后台时避开固定管理条 */
.admin-bar .top-nav,
.admin-bar .site-header {
	top: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar .top-nav,
	.admin-bar .site-header {
		top: 46px;
	}
}

.site-header-inner {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 24px;
	padding: 22px 16px 18px;
	min-height: 100%;
}

.site-brand {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	padding: 4px 6px 0;
}

.site-brand .custom-logo {
	max-height: 40px;
	width: auto;
}

.site-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--text);
}

.site-logo:hover {
	color: var(--text);
}

.site-logo-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: var(--accent-grad);
	color: #fff;
	font-weight: 800;
	font-size: 16px;
	letter-spacing: 0.5px;
	flex-shrink: 0;
}

.site-logo-text {
	font-size: 18px;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.site-nav {
	display: flex;
	width: 100%;
}

.main-nav-list {
	display: flex;
	flex-direction: column;
	gap: 2px;
	width: 100%;
	list-style: none;
	margin: 0;
	padding: 0;
}

.main-nav-list a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	border-radius: 10px;
	color: var(--text-dim);
	font-weight: 500;
	transition: background 0.2s ease, color 0.2s ease;
}

.main-nav-list a:hover,
.main-nav-list li.current-menu-item > a,
.main-nav-list li.current_page_item > a {
	color: var(--text);
	background: rgba(99, 102, 241, 0.12);
}

/* ===================== 导航图标（菜单项 CSS 类 icon-xxx） ===================== */

.main-nav-list .nav-icon {
	display: inline-flex;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	color: var(--text-dim);
	transition: color 0.2s ease;
}

.main-nav-list .nav-icon svg {
	display: block;
	width: 100%;
	height: 100%;
}

.main-nav-list a:hover .nav-icon,
.main-nav-list li.current-menu-item > a .nav-icon,
.main-nav-list li.current_page_item > a .nav-icon {
	color: var(--text);
}

/* 顶部横向导航保持简洁，不显示图标 */
.top-nav .main-nav-list .nav-icon {
	display: none;
}

/* ===================== 二级菜单 ===================== */

/* 侧栏：有子项的父菜单右侧显示展开箭头 */
.site-nav .menu-item-has-children > a {
	position: relative;
	padding-right: 36px;
}

.site-nav .menu-item-has-children > a::after {
	content: '';
	position: absolute;
	top: 50%;
	right: 16px;
	width: 6px;
	height: 6px;
	margin-top: -5px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	opacity: 0.65;
	transform: rotate(45deg);
	transition: transform 0.25s ease, margin-top 0.25s ease;
}

.site-nav .menu-item-has-children:hover > a::after,
.site-nav .menu-item-has-children:focus-within > a::after {
	margin-top: -1px;
	transform: rotate(-135deg);
}

/* 侧栏：二级菜单默认收起，悬停 / 键盘聚焦时向下展开 */
.site-nav .sub-menu {
	max-height: 0;
	overflow: hidden;
	visibility: hidden;
	margin: 0;
	padding: 0 0 0 14px;
	list-style: none;
	border-left: 1px solid var(--border);
	transition: max-height 0.3s ease, visibility 0.3s ease;
}

.site-nav .menu-item-has-children:hover > .sub-menu,
.site-nav .menu-item-has-children:focus-within > .sub-menu {
	max-height: 600px;
	visibility: visible;
}

/* 二级菜单条目样式（侧栏 + 移动端面板） */
.site-nav .sub-menu a,
.site-nav-mobile .sub-menu a {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border-radius: 8px;
	color: var(--text-faint);
	font-size: 14px;
	font-weight: 500;
	transition: background 0.2s ease, color 0.2s ease;
}

.site-nav .sub-menu a:hover,
.site-nav-mobile .sub-menu a:hover,
.site-nav .sub-menu li.current-menu-item > a,
.site-nav-mobile .sub-menu li.current-menu-item > a {
	color: var(--text);
	background: rgba(99, 102, 241, 0.1);
}

/* 移动端菜单面板没有悬停，二级菜单直接缩进展开 */
.site-nav-mobile .sub-menu {
	margin: 0;
	padding: 0 0 0 14px;
	list-style: none;
	border-left: 1px solid var(--border);
}

.site-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex-shrink: 0;
	padding-top: 12px;
	margin-top: auto;
	border-top: 1px solid var(--border);
}

.site-actions .akai-btn {
	width: 100%;
}

.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	padding: 8px;
	background: transparent;
	border: 1px solid var(--border);
	border-radius: 10px;
	cursor: pointer;
}

.nav-toggle span {
	display: block;
	height: 2px;
	width: 100%;
	background: var(--text);
	border-radius: 2px;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.site-nav-mobile {
	display: none;
	flex-direction: column;
	gap: 2px;
	padding: 0;
	background: transparent;
	border: 0;
}

.site-nav-mobile:not([hidden]) {
	display: flex;
}

.site-nav-mobile .main-nav-list a {
	padding: 10px 14px;
}

/* ===================== Hero ===================== */

.hero,
.page-hero {
	position: relative;
	padding: 44px 0 40px;
	text-align: center;
	overflow: hidden;
}

.page-hero {
	padding: 64px 0 52px;
}

.hero::before,
.page-hero::before {
	content: "";
	position: absolute;
	top: -140px;
	left: 50%;
	transform: translateX(-50%);
	width: 720px;
	height: 420px;
	background: radial-gradient(closest-side, rgba(99, 102, 241, 0.28), transparent 70%),
		radial-gradient(closest-side, rgba(168, 85, 247, 0.22), transparent 70%);
	filter: blur(30px);
	pointer-events: none;
	z-index: 0;
}

.hero > .container,
.page-hero > .container {
	position: relative;
	z-index: 1;
}

/* ===================== 首页最新文章板块（搜索栏上方） ===================== */

.latest-posts {
	margin-bottom: 26px;
}

.latest-posts-title {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 0 0 16px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 1px;
	color: var(--text-dim);
}

.latest-posts-title::before,
.latest-posts-title::after {
	content: "";
	height: 1px;
	width: 36px;
	background: var(--border);
}

.latest-posts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 12px;
	max-width: 980px;
	margin: 0 auto;
}

.post-card {
	display: block;
	background: rgba(19, 27, 48, 0.72);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	overflow: hidden;
	text-align: left;
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
	transform: translateY(-2px);
	border-color: rgba(99, 102, 241, 0.55);
	box-shadow: var(--shadow);
}

.post-card-thumb {
	display: block;
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--bg-soft);
}

.post-card-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.post-card:hover .post-card-thumb img {
	transform: scale(1.05);
}

.post-card-thumb-ph {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 30px;
	font-weight: 800;
	color: #a5b4fc;
	background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(168, 85, 247, 0.22));
}

.post-card-body {
	display: block;
	padding: 12px 14px;
}

.post-card-title {
	display: block;
	color: var(--text);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.45;
	min-height: 2.9em;
	margin-bottom: 8px;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.post-card-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	font-size: 12px;
	color: var(--text-faint);
}

.post-card-more {
	color: var(--primary);
	font-weight: 600;
}

.latest-posts-empty {
	margin: 0;
	color: var(--text-dim);
	font-size: 14px;
}

/* 搜索框 */

.hero-search {
	display: flex;
	gap: 8px;
	max-width: 620px;
	margin: 0 auto;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 6px;
	box-shadow: var(--shadow);
	transition: border-color 0.2s ease;
}

.hero-search:focus-within {
	border-color: var(--primary);
}

.hero-search-input {
	flex: 1;
	min-width: 0;
	background: transparent;
	border: none;
	outline: none;
	color: var(--text);
	font-size: 15px;
	padding: 8px 16px;
}

.hero-search-input::placeholder {
	color: var(--text-faint);
}

/* 站外搜索快捷入口 */
.search-engines {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 14px;
}

.search-engines-label {
	color: var(--text-faint);
	font-size: 13px;
}

.search-engine {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 5px 14px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 999px;
	color: var(--text-dim);
	font-family: inherit;
	font-size: 13px;
	line-height: 1.6;
	cursor: pointer;
	transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease,
		transform 0.2s ease;
}

.search-engine::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.6;
}

.search-engine[data-engine="baidu"]::before {
	background: #2932e1;
	opacity: 1;
}

.search-engine[data-engine="google"]::before {
	background: #4285f4;
	opacity: 1;
}

.search-engine[data-engine="bing"]::before {
	background: #008373;
	opacity: 1;
}

.search-engine:hover {
	color: var(--text);
	border-color: var(--primary);
	background: rgba(99, 102, 241, 0.1);
	transform: translateY(-1px);
}

/* ===================== 分类药丸导航 ===================== */

.category-pills {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 40px 0 8px;
}

.category-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 18px;
	border-radius: 999px;
	background: var(--card);
	border: 1px solid var(--border);
	color: var(--text-dim);
	font-weight: 500;
	font-size: 14px;
	transition: all 0.2s ease;
}

.category-pill:hover {
	color: var(--text);
	border-color: var(--primary);
	transform: translateY(-2px);
}

.category-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: rgba(99, 102, 241, 0.18);
	color: var(--primary-2);
	font-size: 12px;
	font-weight: 700;
}

/* ===================== 首页区块 ===================== */

.site-layout {
	padding-top: 12px;
	padding-bottom: 72px;
}

.home-section {
	margin-top: 48px;
	scroll-margin-top: calc(var(--header-h) + 20px);
}

.home-section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 18px;
}

.home-section-title {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
}

.home-section-title::before {
	content: "";
	display: inline-block;
	width: 5px;
	height: 18px;
	margin-right: 10px;
	border-radius: 4px;
	background: var(--accent-grad);
	vertical-align: -2px;
}

.home-section-more {
	font-size: 14px;
	color: var(--text-dim);
}

.home-section-more:hover {
	color: var(--primary-2);
}

/* 分类区块标题链接式 */
.home-section-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.home-section-title a:hover {
	color: var(--primary-2);
	text-decoration: underline;
	text-underline-offset: 4px;
}

.search-count {
	color: var(--text-dim);
	font-size: 14px;
}

/* ===================== 工具卡片 ===================== */

.tools-grid {
	display: grid;
	/* 宽屏最多一行 5 列（约 1200 容器内 5×200+间距放不下第 6 列），窗口变窄自动逐档减列 */
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 14px;
	/* 同一行卡片等高对齐，卡片底部与图标上下留白更规整 */
	align-items: stretch;
}

.tool-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
	transform: translateY(-3px);
	border-color: rgba(99, 102, 241, 0.55);
	box-shadow: var(--shadow);
	background: var(--card-hover);
}

.tool-card-main {
	flex: 1 1 auto;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px;
	color: var(--text);
}

.tool-card-main:hover {
	color: var(--text);
}

.tool-logo {
	position: relative;
	flex-shrink: 0;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--bg-soft);
	border: 1px solid var(--border);
	display: flex;
	align-items: center;
	justify-content: center;
}

.tool-logo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tool-logo-letter {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 22px;
	font-weight: 800;
	color: var(--primary-2);
	background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(168, 85, 247, 0.25));
}

.tool-logo-lg {
	width: 72px;
	height: 72px;
	border-radius: 50%;
}

.tool-logo-lg .tool-logo-letter {
	font-size: 30px;
}

.tool-card-body {
	display: block;
	min-width: 0;
}

.tool-name {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 3px;
	white-space: nowrap;
}

.tool-name .price-chip {
	flex-shrink: 0;
}

.tool-name-text {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	font-size: 15.5px;
	font-weight: 700;
}

.tool-desc {
	display: block;
	color: var(--text-dim);
	font-size: 12.5px;
	line-height: 1.45;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.tool-card-footer {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	padding: 0 14px 14px;
}

.tool-meta {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	min-width: 0;
}

/* 徽标 */

.chip {
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.5;
	white-space: nowrap;
}

.chip-cat {
	background: rgba(99, 102, 241, 0.14);
	color: #a5b4fc;
}

.chip-cat:hover {
	color: #c7d2fe;
}

.chip-tag {
	background: rgba(148, 163, 184, 0.12);
	color: var(--text-dim);
}

.price-chip {
	display: inline-flex;
	align-items: center;
	padding: 2px 9px;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 700;
}

.price-free {
	background: rgba(52, 211, 153, 0.14);
	color: var(--success);
}

.price-freemium {
	background: rgba(251, 191, 36, 0.14);
	color: var(--warning);
}

.price-paid {
	background: rgba(248, 113, 113, 0.14);
	color: var(--danger);
}

/* 复制按钮 */

.copy-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	flex-shrink: 0;
	background: transparent;
	border: 1px solid var(--border);
	border-radius: 8px;
	color: var(--text-dim);
	cursor: pointer;
	transition: all 0.2s ease;
}

.copy-btn:hover {
	color: var(--text);
	border-color: var(--primary);
}

.copy-btn.is-copied {
	color: var(--success);
	border-color: var(--success);
}

/* 工具卡“直达官网”按钮：悬停时右上角淡入 */
.go-corner {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 8px;
	color: var(--text-dim);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease,
		color 0.2s ease, border-color 0.2s ease;
}

.go-corner:hover {
	color: var(--primary-2);
	border-color: var(--primary);
}

.tool-card:hover .go-corner,
.go-corner:focus-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
}

@media (hover: none) {
	.go-corner {
		opacity: 1;
		visibility: visible;
		transform: none;
		pointer-events: auto;
	}
}

/* ===================== 列表/分类页头 ===================== */

.page-title {
	margin: 0;
	font-size: clamp(24px, 4vw, 34px);
	font-weight: 800;
}

.page-title-count {
	font-size: 0.6em;
	color: var(--text-dim);
	font-weight: 500;
}

.term-description {
	margin: 10px auto 0;
	max-width: 640px;
	color: var(--text-dim);
}

/* ===================== 详情页 ===================== */

.single-hero {
	padding: 44px 0 36px;
}

.single-tool-head {
	display: flex;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
	justify-content: flex-start;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 26px 28px;
	box-shadow: var(--shadow);
}

.single-tool-info {
	text-align: left;
	flex: 1;
	min-width: 260px;
}

/* 标题行：主标题 + 分类药丸同行显示，空间不足时自动换行 */
.single-tool-title-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.single-tool-meta {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 10px;
}

.single-tool-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	/* 两个按钮等宽拉伸：避免长短不一导致左右边缘错位 */
	align-items: stretch;
}

/* 按钮统一最小宽度，文字由 .akai-btn 的 justify-content 水平居中 */
.single-tool-actions .akai-btn {
	min-width: 172px;
}

/* ===================== 访问数 / 点赞 ===================== */

.tool-views,
.tool-domain,
.tool-likes {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--text-dim);
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	padding: 6px 0;
}

.tool-views svg,
.tool-domain svg,
.tool-likes svg {
	width: 15px;
	height: 15px;
	flex-shrink: 0;
}

/* ===================== 统计药丸：域名 / 访问 / 点赞 ===================== */

.tool-stats-pill {
	display: inline-flex;
	align-items: center;
	flex-wrap: nowrap;
	background: var(--bg-soft);
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 7px 0;
	line-height: 1;
}

.tool-stats-pill > .tool-views,
.tool-stats-pill > .tool-domain,
.tool-stats-pill > .tool-likes {
	padding: 0 14px;
}

/* 相邻项之间用竖线分割（用 border-left 避开对内容遮挡） */
.tool-stats-pill > .tool-domain + .tool-views,
.tool-stats-pill > .tool-domain + .tool-likes,
.tool-stats-pill > .tool-views + .tool-likes {
	border-left: 1px solid var(--border);
}

/* ===================== 详情页统计药丸里的点赞按钮 ===================== */

/* 按钮重置：去掉 UA 默认外观 */
button.tool-likes {
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: 0;
	font: inherit;
	color: var(--text-dim);
	cursor: pointer;
	padding: 0;
	transition: color 0.2s ease;
}

.tool-stats-pill > button.tool-likes:not(.is-liked):hover {
	color: var(--text);
}

button.tool-likes.is-liked {
	color: var(--primary-2);
	cursor: default;
}

button.tool-likes.is-liked svg {
	fill: rgba(168, 85, 247, 0.5);
	stroke: var(--primary-2);
}

/* 点赞时整个按钮弹跳一下 */
button.tool-likes.is-popped {
	animation: akai-like-pop 0.4s ease;
}

@keyframes akai-like-pop {
	0% {
		transform: scale(1);
	}

	50% {
		transform: scale(1.25);
	}

	100% {
		transform: scale(1);
	}
}

.single-content {
	display: grid;
	grid-template-columns: 1fr;
	gap: 40px;
}

.entry-content {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 24px 26px;
}

.entry-content p {
	margin: 0 0 16px;
	color: var(--text-dim);
}

.entry-content p:last-child {
	margin-bottom: 0;
}

.entry-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 18px;
}

.entry-meta {
	margin-top: 20px;
	font-size: 13px;
	color: var(--text-faint);
}

.entry-meta a {
	color: var(--text-dim);
}

/* 评论 */

.comments-area {
	margin-top: 32px;
}

.comment-list {
	list-style: none;
	padding: 0;
}

.comment {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 16px;
	margin-bottom: 12px;
}

.comment-meta {
	font-size: 13px;
	color: var(--text-dim);
	margin-bottom: 8px;
}

.comment-form label {
	display: block;
	margin: 12px 0 6px;
	font-weight: 600;
	font-size: 14px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 10px 14px;
	background: var(--bg-soft);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	color: var(--text);
	font-family: inherit;
}

/* ===================== 提交表单 ===================== */

.submit-wrapper {
	max-width: 760px;
	margin: 0 auto;
}

.akai-submit-form {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 28px;
	box-shadow: var(--shadow);
}

.akai-hp {
	position: absolute !important;
	left: -9999px !important;
	opacity: 0;
	height: 0;
	overflow: hidden;
	margin: 0;
	padding: 0;
}

.akai-form-row {
	margin-bottom: 18px;
}

.akai-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.akai-form-row label {
	display: block;
	margin-bottom: 8px;
	font-size: 14px;
	font-weight: 600;
	color: var(--text-dim);
}

.akai-submit-form input[type="text"],
.akai-submit-form input[type="url"],
.akai-submit-form select,
.akai-submit-form textarea {
	width: 100%;
	padding: 11px 14px;
	background: var(--bg-soft);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	color: var(--text);
	font-family: inherit;
	font-size: 14px;
	transition: border-color 0.2s ease;
}

.akai-submit-form input:focus,
.akai-submit-form select:focus,
.akai-submit-form textarea:focus {
	outline: none;
	border-color: var(--primary);
}

.akai-submit-form textarea {
	resize: vertical;
}

.akai-submit-form .akai-btn-primary {
	width: 100%;
	padding: 14px;
	font-size: 15px;
	margin-top: 6px;
}

/* 提示条 */

.akai-notice {
	padding: 14px 18px;
	border-radius: var(--radius-sm);
	margin-bottom: 18px;
	font-size: 14px;
	border: 1px solid;
}

.akai-notice-success {
	background: rgba(52, 211, 153, 0.1);
	border-color: rgba(52, 211, 153, 0.3);
	color: var(--success);
}

.akai-notice-error {
	background: rgba(248, 113, 113, 0.1);
	border-color: rgba(248, 113, 113, 0.3);
	color: var(--danger);
}

.akai-notice-info {
	background: rgba(99, 102, 241, 0.1);
	border-color: rgba(99, 102, 241, 0.3);
	color: #a5b4fc;
}

.akai-empty {
	text-align: center;
	color: var(--text-dim);
	padding: 60px 20px;
	border: 1px dashed var(--border);
	border-radius: var(--radius);
	background: rgba(19, 27, 48, 0.4);
}

/* ===================== 分页 ===================== */

.pagination,
.navigation.pagination {
	margin-top: 40px;
	text-align: center;
}

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 12px;
	margin: 0 3px;
	border-radius: 10px;
	background: var(--card);
	border: 1px solid var(--border);
	color: var(--text-dim);
	font-size: 14px;
}

.page-numbers.current {
	background: var(--accent-grad);
	color: #fff;
	border-color: transparent;
}

.page-numbers:hover {
	border-color: var(--primary);
	color: var(--text);
}

/* ===================== 页脚 ===================== */

.site-footer {
	border-top: 1px solid var(--border);
	background: var(--bg-soft);
	padding: 48px 0 28px;
}

.footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 32px;
	margin-bottom: 32px;
}

.footer-widget-title {
	margin: 0 0 12px;
	font-size: 15px;
	font-weight: 700;
}

.footer-widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-widget li {
	margin-bottom: 8px;
}

.footer-widget a {
	color: var(--text-dim);
	font-size: 14px;
}

.footer-widget a:hover {
	color: var(--text);
}

.site-footer-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	padding-top: 24px;
	border-top: 1px solid var(--border);
}

.footer-text {
	margin: 0;
	color: var(--text-faint);
	font-size: 13px;
}

.footer-nav {
	display: flex;
	gap: 16px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-nav a {
	color: var(--text-dim);
	font-size: 13px;
}

.footer-nav a:hover {
	color: var(--text);
}

/* ===================== 响应式 ===================== */

@media (max-width: 900px) {
	body {
		padding-left: 0;
	}

	/* 移动端顶栏改用 sticky，自带 64px 占位，避免遮挡详情页内容；锚点跳转预留偏移 */
	html {
		scroll-padding-top: var(--header-h);
	}

	/* 移动端侧栏变顶栏，收起按钮交给顶栏的汉堡菜单 */
	.sidebar-toggle {
		display: none;
	}

	html.nav-collapsed .site-header {
		transform: none;
	}

	/* 移动端已有顶栏 + 汉堡菜单，隐藏内容区顶部导航避免重复 */
	.top-nav {
		display: none;
	}

	.site-header {
		position: sticky;
		top: 0;
		bottom: auto;
		width: 100%;
		height: var(--header-h);
		flex-direction: row;
		border-right: 0;
		border-bottom: 1px solid var(--border);
		overflow: visible;
	}

	.site-header-inner {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
		height: var(--header-h);
		padding: 0 16px;
		flex: 0 0 auto;
	}

	.site-brand {
		padding: 0;
	}

	.site-nav {
		display: none;
	}

	.site-actions {
		flex-direction: row;
		margin-top: 0;
		padding-top: 0;
		border-top: 0;
	}

	.site-actions .akai-btn {
		width: auto;
	}

	.nav-toggle {
		display: flex;
	}

	/* 移动端：把侧栏内的导航改成顶栏下方的下拉。 */
	.site-nav-mobile {
		position: fixed;
		left: 0;
		right: 0;
		top: var(--header-h);
		padding: 8px 16px 14px;
		background: rgba(10, 14, 26, 0.96);
		backdrop-filter: blur(14px);
		-webkit-backdrop-filter: blur(14px);
		border-top: 1px solid var(--border);
	}

	.tools-grid {
		/* 平板同步多一列：约 860px 内容宽度下可排到 4 列 */
		grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	}

	.single-tool-head {
		flex-direction: column;
		text-align: center;
		padding: 22px 18px;
	}

	.single-tool-info {
		text-align: center;
	}

	.single-tool-title-row {
		justify-content: center;
	}

	.single-tool-meta {
		justify-content: center;
	}
}

@media (max-width: 560px) {
	.hero {
		padding: 32px 0 36px;
	}

	.page-hero {
		padding: 44px 0 36px;
	}

	.single-tool-head {
		padding: 18px 14px;
	}

	.latest-posts-grid {
		grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
	}

	.post-card-title {
		min-height: 0;
	}

	.hero-search {
		border-radius: 18px;
		flex-direction: column;
		padding: 10px;
	}

	.hero-search-btn {
		width: 100%;
	}

	.akai-form-grid {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.akai-submit-form {
		padding: 20px 16px;
	}

	.site-actions .akai-btn {
		display: none;
	}
}
