:root {
	--primary: #4f46e5;
	--primary-light: #6366f1;
	--primary-dark: #3730a3;
	--secondary: #818cf8;
	--text-primary: #f8fafc;
	--text-secondary: #e2e8f0;
	--bg-gradient: linear-gradient(135deg, rgba(30, 27, 75, 0.9), rgba(39, 39, 42, 0.95));
	--glass: rgba(255, 255, 255, 0.05);
	--glass-hover: rgba(255, 255, 255, 0.08);
	--glass-dark: rgba(15, 23, 42, 0.85);
	--shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
	--shadow-hover: 0 12px 40px 0 rgba(31, 38, 135, 0.25);
	--border: rgba(255, 255, 255, 0.1);
	--transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: "Inter", "Segoe UI", "微软雅黑", sans-serif;
}

body {
	background: var(--bg-gradient);
	color: var(--text-primary);
	min-height: 100vh;
	padding: 30px 0;
	line-height: 1.5;
}

.page-title {
	text-align: center;
	margin-bottom: 30px;
	font-size: 2.2rem;
	background: linear-gradient(90deg, var(--primary-light), var(--secondary));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	letter-spacing: 0.5px;
}

.search-container {
	max-width: 800px;
	margin: 0 auto 50px;
	padding: 0 20px;
}

.search-box {
	position: relative;
	width: 100%;
}

/* 搜索引擎选择器（强制竖向排列） */
.search-select-wrapper {
	position: absolute;
	left: 10px;
	top: 10px;
	z-index: 10;
	width: auto;
}

/* 选中项显示 */
.search-select-current {
	height: calc(100% - 20px);
	padding: 0 16px;
	background: var(--glass);
	color: var(--text-secondary);
	border-radius: 6px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: var(--transition);
	min-height: 36px;
	min-width: 80px;
}

.search-select-current::after {
	content: none;
}

.search-select-current:hover {
	background: var(--glass-hover);
}

/* 选项容器 - 强制竖向排列 */
.search-select-options {
	/* 初始隐藏 */
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
	/* 布局设置 */
	list-style: none;
	position: absolute;
	top: 100%;
	left: 0;
	margin-top: 5px;
	background: var(--glass-dark);
	border-radius: 6px;
	box-shadow: var(--shadow);
	z-index: 100;
	/* 竖向排列核心 */
	display: flex;
	flex-direction: column; /* 竖向排列 */
	width: 100%; /* 与选中项同宽 */
	min-width: 80px;
}

/* 鼠标悬浮时显示选项（保持竖向） */
.search-select-wrapper:hover .search-select-options {
	max-height: 200px; /* 足够显示多个选项的高度 */
}

/* 单个选项样式 */
.search-select-options li {
	padding: 10px 16px;
	cursor: pointer;
	transition: var(--transition);
	white-space: nowrap;
	display: flex;
	align-items: center;
}

.search-select-options li::before {
	content: "✓";
	opacity: 0;
	margin-right: 8px;
	font-size: 12px;
	color: var(--primary-light);
	transition: opacity 0.3s ease;
}

.search-select-options li.active {
	background: rgba(79, 70, 229, 0.15);
	color: var(--primary-light);
}

.search-select-options li.active::before {
	opacity: 1;
}

.search-select-options li:hover:not(.active) {
	background: rgba(255, 255, 255, 0.08);
}

/* 搜索框样式 */
.search-input {
	width: 100%;
	padding: 16px 20px 16px 100px;
	height: 56px;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: var(--glass);
	backdrop-filter: blur(12px);
	color: var(--text-primary);
	font-size: 16px;
	line-height: 1.5;
	outline: none;
	transition: var(--transition);
	box-shadow: var(--shadow);
}

.search-input:focus {
	background: var(--glass-hover);
	border-color: var(--primary-light);
	box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.search-input::placeholder {
	color: rgba(226, 232, 240, 0.6);
}

/* 搜索按钮 */
.search-button {
	position: absolute;
	right: 10px;
	top: 10px;
	height: calc(100% - 20px);
	padding: 0 24px;
	background: var(--primary);
	color: white;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: var(--transition);
	font-weight: 500;
	display: flex;
	align-items: center;
	justify-content: center;
}

.search-button:hover {
	background: var(--primary-dark);
	transform: translateY(-1px);
}

.search-button:active {
	transform: translateY(1px);
}

/* 搜索建议 */
.suggestions {
	position: absolute;
	top: calc(100% + 5px);
	left: 0;
	right: 0;
	background: var(--glass-dark);
	backdrop-filter: blur(12px);
	border-radius: 12px;
	box-shadow: var(--shadow);
	z-index: 90;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease, padding 0.3s ease, border 0.3s ease;
	border: 1px solid var(--border);
}

.suggestions.active {
	max-height: 320px;
	padding: 8px 0;
}

.suggestions li {
	padding: 12px 24px;
	cursor: pointer;
	transition: var(--transition);
	list-style: none;
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 15px;
}

.suggestions li::before {
	content: "🔍";
	opacity: 0.5;
	font-size: 14px;
}

.suggestions li:hover {
	background: rgba(255, 255, 255, 0.08);
}

.suggestions li.active {
	background: rgba(79, 70, 229, 0.15);
	color: var(--primary-light);
	font-weight: 500;
}

/* 清空按钮 */
.clear-btn {
	position: absolute;
	right: 100px;
	top: 50%;
	transform: translateY(-50%);
	color: rgba(226, 232, 240, 0.7);
	cursor: pointer;
	display: none;
	font-size: 18px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: var(--transition);
}

.clear-btn:hover {
	background: rgba(255, 255, 255, 0.1);
	color: var(--text-primary);
}

.clear-btn.active {
	display: flex;
}

/* 导航卡片区域 */
.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

.nav-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
	gap: 28px;
	align-items: stretch;
}

.nav-card {
	background: var(--glass);
	backdrop-filter: blur(12px);
	border-radius: 16px;
	padding: 24px;
	transition: var(--transition);
	border: 1px solid var(--border);
	overflow: hidden;
	position: relative;
	height: 100%;
	display: flex;
	flex-direction: column;
}

.nav-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 4px;
	background: linear-gradient(90deg, var(--primary), var(--secondary));
	transform: scaleX(0);
	transition: transform 0.4s ease;
	transform-origin: left center;
}

.nav-card:hover {
	transform: translateY(-6px);
	box-shadow: var(--shadow-hover);
	border-color: rgba(255, 255, 255, 0.15);
}

.nav-card:hover::before {
	transform: scaleX(1);
}

.nav-title {
	font-size: 19px;
	font-weight: 600;
	margin-bottom: 20px;
	color: var(--secondary);
	display: flex;
	align-items: center;
	gap: 10px;
	padding-left: 4px;
}

.nav-title::before {
	content: "";
	width: 4px;
	height: 20px;
	background: var(--primary);
	border-radius: 2px;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	flex-grow: 1;
}

.nav-link {
	flex: 0 0 calc(33.333% - 5.33px);
	text-align: center;
	height: 56px;
}

.nav-link a {
	display: block;
	padding: 14px 6px;
	background: rgba(255, 255, 255, 0.06);
	color: var(--text-secondary);
	text-decoration: none;
	border-radius: 8px;
	font-size: clamp(12px, 2vw, 14px);
	transition: var(--transition);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	letter-spacing: 0;
}

.nav-link a:hover {
	background: var(--primary);
	color: white;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

/* 页脚 */
.footer {
	text-align: center;
	margin-top: 80px;
	padding: 24px;
	color: rgba(226, 232, 240, 0.5);
	font-size: 14px;
	position: relative;
}

.footer::before {
	content: "";
	position: absolute;
	top: 0;
	left: 10%;
	width: 80%;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* 响应式调整 */
@media (max-width: 1024px) {
	.nav-grid {
		grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	}
}

@media (max-width: 768px) {
	.page-title {
		font-size: 1.8rem;
		margin-bottom: 20px;
	}

	.nav-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.nav-link {
		flex: 0 0 calc(50% - 4px);
		height: 50px;
	}

	.search-input {
		padding: 14px 20px 14px 90px;
		font-size: 15px;
		height: 52px;
	}

	.search-select-wrapper {
		min-width: 70px;
	}

	.search-button {
		padding: 0 20px;
	}

	.clear-btn {
		right: 80px;
	}

	.nav-card {
		padding: 20px;
	}
}

@media (max-width: 480px) {
	body {
		padding: 20px 0;
	}

	.page-title {
		font-size: 1.5rem;
	}

	.search-container {
		margin-bottom: 30px;
	}

	.nav-link {
		flex: 0 0 100%;
		height: 48px;
	}

	.search-select-wrapper {
		min-width: 60px;
	}

	.search-select-current {
		padding: 0 12px;
		font-size: 14px;
	}

	.search-input {
		padding: 12px 16px 12px 80px;
		font-size: 14px;
		height: 48px;
	}

	.search-button {
		padding: 0 18px;
		font-size: 14px;
	}

	.suggestions li {
		padding: 10px 16px;
		font-size: 14px;
	}
}