/* only for index.html */

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	min-height: 100%;

	background: #050505;

	font-family:
		Inter,
		"Noto Sans SC",
		"Microsoft YaHei",
		Arial,
		sans-serif;
}

[v-cloak] {
	display: none;
}

.nav-card {
	transition:
		transform 0.15s ease,
		background-color 0.15s ease,
		border-color 0.15s ease;
}

.nav-card:hover {
	transform: translateY(-2px);
	background-color: rgba(255, 255, 255, 0.07);
	border-color: rgba(255, 255, 255, 0.25);
}

::placeholder {
	color: rgba(255, 255, 255, 0.35);
}

input:focus {
	outline: none;
}


/* ================================================
       搜索栏：圆角一体壳
       [ 引擎下拉 | 输入框 | 主题色光效按钮 ]
    ================================================= */

.search-shell {
	display: flex;
	align-items: center;
	gap: 2px;
	height: 56px;
	padding: 0 7px 0 8px;
	position: relative;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 999px;
	transition:
		border-color 0.2s ease,
		box-shadow 0.2s ease;
}

.search-shell:focus-within {
	border-color: var(--engine, #4285f4);
	box-shadow: 0 0 0 3px color-mix(in srgb,
			var(--engine, #4285f4) 22%,
			transparent);
}


/* ================================================
       自定义引擎下拉
    ================================================= */

.engine-select {
	position: relative;
	flex-shrink: 0;
	height: 100%;
	display: flex;
	align-items: center;
}

.engine-select-trigger {
	display: flex;
	align-items: center;
	gap: 7px;
	height: 42px;
	padding: 0 12px;
	background: transparent;
	border: none;
	border-radius: 999px;
	color: rgba(255, 255, 255, 0.85);
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	user-select: none;
	white-space: nowrap;
	transition: background-color 0.15s ease;
}

.engine-select-trigger:hover {
	background: rgba(255, 255, 255, 0.08);
}

.engine-select.open .engine-select-trigger {
	background: rgba(255, 255, 255, 0.1);
}

.engine-select-trigger .chevron {
	transition: transform 0.2s ease;
	opacity: 0.5;
}

.engine-select.open .engine-select-trigger .chevron {
	transform: rotate(180deg);
}

.engine-select-dropdown {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	z-index: 60;
	min-width: 220px;
	background: #161616;
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 14px;
	padding: 5px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65);
	animation: dropdown-in 0.15s ease;
}

@keyframes dropdown-in {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.engine-select-option {
	display: flex;
	align-items: center;
	gap: 9px;
	width: 100%;
	padding: 10px 12px;
	border: none;
	border-radius: 10px;
	background: transparent;
	color: rgba(255, 255, 255, 0.75);
	font-size: 14px;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 0.1s ease;
	text-align: left;
}

.engine-select-option:hover {
	background: rgba(255, 255, 255, 0.08);
}

.engine-select-option.selected {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.engine-select-option .check {
	margin-left: auto;
	opacity: 0;
	color: var(--engine, #4285f4);
}

.engine-select-option.selected .check {
	opacity: 1;
}

/* 品牌 SVG 图标 */
.engine-icon {
	display: inline-flex;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.engine-icon svg {
	width: 18px;
	height: 18px;
	display: block;
}


/* 输入框：透明填充壳内空间 */
.search-shell .search-input {
	flex: 1;
	min-width: 0;
	height: 100%;
	padding: 0 12px;
	background: transparent;
	border: none;
	color: rgba(255, 255, 255, 0.9);
	font-size: 15px;
}

.search-shell .search-input:focus {
	outline: none;
}


/* ================================================
       Gemini 式边缘光效按钮（嵌在输入框壳内）

       主题色由 :style 写入 --g1~--g4，
       conic-gradient 读取后随引擎切换
    ================================================= */

@property --angle {
	syntax: "<angle>";
	initial-value: 0deg;
	inherits: false;
}

.glow-btn {
	position: relative;
	isolation: isolate;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border: none;
	border-radius: 999px;
	background: transparent;
	cursor: pointer;
	color: rgba(255, 255, 255, 0.9);
	transition: transform 0.15s ease;
}

.glow-btn:hover {
	transform: translateY(0px) scale(1.04);
}

.glow-btn:active {
	transform: scale(0.96);
}

/* 锐利描边环 */
.glow-btn::before {
	content: "";
	position: absolute;
	inset: -3px;
	z-index: -1;
	border-radius: inherit;
	padding: 2px;
	background:
		conic-gradient(from var(--angle),
			var(--g1, #4285f4) 0%,
			var(--g2, #ea4335) 30%,
			var(--g3, #fbbc05) 55%,
			var(--g4, #34a853) 80%,
			var(--g1, #4285f4) 100%);
	-webkit-mask:
		linear-gradient(#000 0 0) content-box,
		linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask:
		linear-gradient(#000 0 0) content-box,
		linear-gradient(#000 0 0);
	mask-composite: exclude;
	opacity: 0.5;
	transition: opacity 0.25s ease;
	animation: glow-spin 3.5s linear infinite;
	pointer-events: none;
}

/* 外发光光晕（同样只留边缘一圈，不糊中间） */
.glow-btn::after {
	content: "";
	position: absolute;
	inset: -5px;
	z-index: -2;
	border-radius: inherit;
	padding: 6px;
	background:
		conic-gradient(from var(--angle),
			var(--g1, #4285f4) 0%,
			var(--g2, #ea4335) 30%,
			var(--g3, #fbbc05) 55%,
			var(--g4, #34a853) 80%,
			var(--g1, #4285f4) 100%);
	-webkit-mask:
		linear-gradient(#000 0 0) content-box,
		linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask:
		linear-gradient(#000 0 0) content-box,
		linear-gradient(#000 0 0);
	mask-composite: exclude;
	filter: blur(14px);
	opacity: 0;
	transition: opacity 0.3s ease;
	animation: glow-spin 3.5s linear infinite;
	pointer-events: none;
}

/* hover：光效全开、转速加快 */
.glow-btn:hover::before {
	opacity: 1;
	animation-duration: 1.6s;
}

.glow-btn:hover::after {
	opacity: 0.8;
	animation-duration: 1.6s;
}

.glow-btn:active::before {
	opacity: 1;
	animation-duration: 0.8s;
}

@keyframes glow-spin {
	to {
		--angle: 360deg;
	}
}

@media (prefers-reduced-motion: reduce) {

	.glow-btn::before,
	.glow-btn::after {
		animation: none;
	}
}