/* ===== 全局重置 ===== */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
html {
	scroll-behavior: smooth;
}
body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	background: #f5f7fa;
	color: #1e2a3a;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
a {
	text-decoration: none;
	color: inherit;
}

/* ===== 主体布局 ===== */
.app-wrapper {
	display: flex;
	min-height: 100vh;
	position: relative;
}

/* ===== 移动端顶部栏 ===== */
.mobile-header {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1001;
	background: #ffffff;
	padding: 12px 16px;
	border-bottom: 1px solid #eef1f5;
	align-items: center;
	justify-content: space-between;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.mobile-header .logo {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 18px;
	font-weight: 700;
	color: #1a2b3c;
}
.mobile-header .logo i {
	color: #3b82f6;
	font-size: 22px;
}
.mobile-header .hamburger-btn {
	background: none;
	border: none;
	font-size: 24px;
	color: #1a2b3c;
	cursor: pointer;
	padding: 4px 6px;
	transition: color 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
}
.mobile-header .hamburger-btn:hover {
	color: #3b82f6;
}
.mobile-header .hamburger-btn i {
	transition: transform 0.3s ease;
}
.mobile-header .hamburger-btn.open i {
	transform: rotate(90deg);
}

/* ===== 遮罩层 ===== */
.overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.4);
	z-index: 999;
	opacity: 0;
	transition: opacity 0.3s ease;
	backdrop-filter: blur(2px);
}
.overlay.active {
	opacity: 1;
}

/* ===== 左侧导航 ===== */
.sidebar {
	width: 240px;
	background: #ffffff;
	border-right: 1px solid #e8ecf1;
	padding: 28px 0 20px 0;
	flex-shrink: 0;
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
	z-index: 1000;
}
.sidebar-brand {
	padding: 0 20px 20px 20px;
	border-bottom: 1px solid #eef1f5;
	margin-bottom: 16px;
}
.sidebar-brand .logo {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 20px;
	font-weight: 700;
	color: #1a2b3c;
}
.sidebar-brand .logo i {
	color: #3b82f6;
	font-size: 26px;
}
.sidebar-brand .sub {
	font-size: 13px;
	color: #7b8a9b;
	margin-top: 4px;
	padding-left: 4px;
}

/* 导航菜单 */
.nav-menu {
	flex: 1;
	padding: 0 12px;
}
.nav-menu .nav-label {
	font-size: 11px;
	font-weight: 600;
	color: #9aa9b9;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 12px 12px 6px 12px;
}
.nav-menu a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	color: #3d4e5f;
	transition: all 0.2s ease;
	margin-bottom: 2px;
	cursor: pointer;
}
.nav-menu a i {
	width: 20px;
	font-size: 16px;
	color: #7b8a9b;
	transition: color 0.2s;
}
.nav-menu a:hover {
	background: #f0f4f9;
	color: #1a2b3c;
}
.nav-menu a:hover i {
	color: #3b82f6;
}
.nav-menu a.active {
	background: #eef4ff;
	color: #2563eb;
}
.nav-menu a.active i {
	color: #2563eb;
}
.nav-menu a .badge {
	margin-left: auto;
	background: #e8ecf1;
	font-size: 11px;
	padding: 0 10px;
	border-radius: 30px;
	line-height: 20px;
	color: #5a6b7c;
	font-weight: 500;
}
.nav-menu a.active .badge {
	background: #dbe7fe;
	color: #2563eb;
}
/* 最新AI工具特殊标记 */
.nav-menu a .new-tag {
	margin-left: auto;
	background: #f43f5e;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	padding: 0 8px;
	border-radius: 30px;
	line-height: 18px;
	letter-spacing: 0.3px;
}
.nav-menu a.active .new-tag {
	background: #e11d48;
}

/* 底部信息 */
.sidebar-footer {
	padding: 16px 20px 0 20px;
	border-top: 1px solid #eef1f5;
	margin-top: 12px;
	font-size: 12px;
	color: #9aa9b9;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.sidebar-footer a {
	color: #7b8a9b;
	transition: color 0.2s;
}
.sidebar-footer a:hover {
	color: #3b82f6;
}

/* ===== 右侧内容 ===== */
.main-content {
	flex: 1;
	padding: 28px 32px 40px 32px;
	min-width: 0;
}

/* 页面头部 */
.page-header {
	margin-bottom: 28px;
}
.page-header h1 {
	font-size: 24px;
	font-weight: 700;
	color: #0b1c2e;
}
.page-header p {
	color: #6b7c8d;
	font-size: 15px;
	margin-top: 4px;
}

/* ===== 分类区块 ===== */
.category-section {
	margin-bottom: 40px;
	scroll-margin-top: 20px;
}
.category-section:last-child {
	margin-bottom: 0;
}
.category-section .cat-title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 18px;
	font-weight: 700;
	color: #0b1c2e;
	padding-bottom: 12px;
	border-bottom: 2px solid #eef1f5;
	margin-bottom: 16px;
}
.category-section .cat-title i {
	color: #3b82f6;
	font-size: 20px;
}
.category-section .cat-title .count {
	margin-left: auto;
	font-size: 13px;
	font-weight: 400;
	color: #7b8a9b;
}
/* 最新AI工具标题特殊样式 */
.category-section.latest .cat-title {
	border-bottom-color: #f43f5e;
}
.category-section.latest .cat-title i {
	color: #f43f5e;
}
.category-section.latest .cat-title .badge-new {
	background: #f43f5e;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	padding: 0 12px;
	border-radius: 30px;
	line-height: 22px;
	margin-left: 6px;
}

/* ===== 工具卡片（左右结构） ===== */
.tool-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 16px;
}

.tool-card {
	background: #ffffff;
	border-radius: 12px;
	padding: 16px 18px 14px 18px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
	border: 1px solid #eef1f5;
	transition: all 0.25s ease;
	display: flex;
	flex-direction: column;
	position: relative;
}
.tool-card:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
	transform: translateY(-2px);
	border-color: #dce3ec;
}
/* 最新工具卡片特殊标记 */
.tool-card.latest-card {
	border-color: #f43f5e;
	border-width: 1.5px;
}
.tool-card.latest-card .new-flag {
	position: absolute;
	top: -1px;
	right: 16px;
	background: #f43f5e;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	padding: 0 12px;
	border-radius: 0 0 8px 8px;
	line-height: 22px;
	letter-spacing: 0.3px;
}
.tool-card.latest-card:hover {
	border-color: #e11d48;
	box-shadow: 0 8px 28px rgba(244, 63, 94, 0.12);
}

/* 卡片头部：左图标 + 右标题+简介 */
.tool-card .card-head {
	display: flex;
	gap: 14px;
	align-items: flex-start;
}
.tool-card .card-head .icon {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	background: #eef4ff;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	color: #3b82f6;
	transition: background 0.2s, color 0.2s;
}
.tool-card .card-head .icon img{
    display:block;
    width:100%;
    height:100%;
}
.tool-card:hover .card-head .icon {
	background: #3b82f6;
	color: #ffffff;
}
.tool-card.latest-card .card-head .icon {
	background: #fef2f2;
	color: #f43f5e;
}
.tool-card.latest-card:hover .card-head .icon {
	background: #f43f5e;
	color: #ffffff;
}

.tool-card .card-head .info {
	flex: 1;
	min-width: 0;
}
.tool-card .card-head .info .name {
	font-size: 16px;
	font-weight: 600;
	color: #0b1c2e;
	line-height: 1.4;
}
.tool-card .card-head .info .desc {
	font-size: 13px;
	color: #6b7c8d;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* 标签与链接（缩进对齐） */
.tool-card .tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 10px;
	padding-left: 54px;
}
.tool-card .tags span {
	background: #f0f4f9;
	font-size: 11px;
	padding: 0 10px;
	border-radius: 30px;
	line-height: 22px;
	color: #4d5e6f;
	font-weight: 500;
}
.tool-card.latest-card .tags span {
	background: #fef2f2;
	color: #b91c1c;
}

.tool-card .footer-link {
	margin-top: 10px;
	padding-left: 54px;
	font-size: 13px;
	color: #3b82f6;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 6px;
}
.tool-card .footer-link i {
	font-size: 12px;
	transition: transform 0.2s;
}
.tool-card:hover .footer-link i {
	transform: translateX(4px);
}
.tool-card.latest-card .footer-link {
	color: #f43f5e;
}

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

@media (max-width: 992px) {
	.sidebar {
		width: 200px;
		padding: 20px 0;
	}
	.main-content {
		padding: 20px 20px 30px 20px;
	}
	.tool-grid {
		grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
		gap: 14px;
	}
}

/* ----- 移动端：导航变为右侧滑出抽屉 ----- */
@media (max-width: 768px) {
	.mobile-header {
		display: flex;
	}

	.main-content {
		padding: 72px 16px 24px 16px;
	}

	.sidebar {
		position: fixed;
		top: 0;
		right: 0;
		bottom: 0;
		left: auto;
		width: 280px;
		height: 100vh;
		border-right: none;
		border-left: 1px solid #eef1f5;
		padding: 20px 0 16px 0;
		transform: translateX(100%);
		transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
		z-index: 1000;
		box-shadow: -8px 0 32px rgba(0, 0, 0, 0.08);
		overflow-y: auto;
		border-radius: 0;
	}
	.sidebar.open {
		transform: translateX(0);
	}

	.overlay {
		display: block;
		visibility: hidden;
		opacity: 0;
		transition: opacity 0.3s ease, visibility 0.3s ease;
	}
	.overlay.active {
		visibility: visible;
		opacity: 1;
	}

	.sidebar-brand {
		padding: 0 16px 16px 16px;
		margin-bottom: 12px;
	}
	.sidebar-brand .logo {
		font-size: 18px;
	}
	.sidebar-brand .logo i {
		font-size: 22px;
	}
	.sidebar-brand .sub {
		font-size: 12px;
	}
	.nav-menu {
		padding: 0 8px;
	}
	.nav-menu a {
		padding: 8px 12px;
		font-size: 14px;
	}
	.nav-menu a .badge {
		font-size: 10px;
		padding: 0 8px;
		line-height: 18px;
	}
	.nav-menu a .new-tag {
		font-size: 9px;
		padding: 0 6px;
		line-height: 16px;
	}
	.sidebar-footer {
		padding: 12px 16px 0 16px;
		font-size: 11px;
	}

	.tool-grid {
		grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
		gap: 12px;
	}
	.category-section .cat-title {
		font-size: 16px;
	}
	.tool-card .card-head .icon {
		width: 36px;
		height: 36px;
		font-size: 18px;
	}
	.tool-card .tags {
		padding-left: 50px;
	}
	.tool-card .footer-link {
		padding-left: 50px;
	}
	.tool-card.latest-card .new-flag {
		font-size: 9px;
		line-height: 20px;
		padding: 0 10px;
		right: 12px;
	}
}

@media (max-width: 480px) {
	.mobile-header {
		padding: 10px 14px;
	}
	.mobile-header .logo {
		font-size: 16px;
	}
	.mobile-header .logo i {
		font-size: 20px;
	}
	.mobile-header .hamburger-btn {
		font-size: 22px;
	}

	.main-content {
		padding: 64px 12px 20px 12px;
	}
	.page-header h1 {
		font-size: 20px;
	}
	.page-header p {
		font-size: 14px;
	}

	.sidebar {
		width: 260px;
	}

	.tool-grid {
		grid-template-columns: 1fr;
		gap: 10px;
	}
	.tool-card {
		padding: 14px 16px;
	}
	.tool-card .card-head .icon {
		width: 34px;
		height: 34px;
		font-size: 16px;
	}
	.tool-card .card-head .info .name {
		font-size: 15px;
	}
	.tool-card .card-head .info .desc {
		font-size: 12px;
		-webkit-line-clamp: 2;
	}
	.tool-card .tags {
		padding-left: 48px;
	}
	.tool-card .footer-link {
		padding-left: 48px;
		font-size: 12px;
	}
	.category-section .cat-title {
		font-size: 15px;
	}
	.category-section .cat-title .badge-new {
		font-size: 10px;
		padding: 0 10px;
		line-height: 20px;
	}
	.tool-card.latest-card .new-flag {
		font-size: 8px;
		line-height: 18px;
		padding: 0 8px;
		right: 10px;
	}
}