/* 搜索页 — 左中右布局 */
.yw-search-page {
	background: linear-gradient(180deg, #f8f9fb 0%, var(--yw-bg) 200px);
	padding-bottom: 48px;
}

.yw-search-layout {
	align-items: start;
}

.yw-search-center {
	min-width: 0;
}

.yw-search--sidebar {
	display: grid;
	gap: 10px;
}

.yw-search--sidebar .yw-search__input {
	width: 100%;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid #e2e8f0;
	font-size: 14px;
}

.yw-search-sidebar__channel-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 4px;
}

.yw-search-sidebar__channel {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 10px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 600;
	color: #334155;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.yw-search-sidebar__channel:hover {
	background: #f3f4f6;
	color: var(--yw-primary);
	text-decoration: none;
}

.yw-search-sidebar__channel-ico {
	width: 28px;
	height: 28px;
	border-radius: 8px;
	background: #f1f5f9;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	flex-shrink: 0;
}

.yw-search-sidebar__stack > .yw-search-panel + .yw-search-panel {
	border-top: 1px solid #e8edf3;
}

/* 中间 */
.yw-search-head {
	margin-bottom: 20px;
}

.yw-search-head__title {
	margin: 0 0 8px;
	font-size: clamp(24px, 2.8vw, 30px);
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: -0.02em;
	color: #0f172a;
}

.yw-search-head__sub {
	margin: 0 0 16px;
	font-size: 15px;
	line-height: 1.55;
	color: #64748b;
}

.yw-search--page {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 14px;
	background: #fff;
	border: 1px solid var(--yw-border);
	box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

.yw-search--page .yw-search__input {
	flex: 1 1 220px;
	min-width: 0;
	padding: 10px 12px;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	font-size: 15px;
}

.yw-search-results-card {
	padding: 20px 22px 24px;
	border-radius: 20px;
	background: #fff;
	border: 1px solid var(--yw-border);
	box-shadow: 0 4px 24px rgba(15, 23, 42, 0.05);
}

.yw-search-results {
	display: grid;
	gap: 14px;
}

.yw-search-result {
	display: grid;
	grid-template-columns: 96px 1fr;
	gap: 14px;
	padding: 14px;
	border-radius: 14px;
	border: 1px solid #eef2f6;
	background: #fafbfc;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.yw-search-result:not(:has(.yw-search-result__media)) {
	grid-template-columns: 1fr;
}

.yw-search-result:hover {
	border-color: #dbeafe;
	background: #fff;
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.yw-search-result__media {
	display: grid;
	place-items: center;
	border-radius: 10px;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: #e2e8f0;
}

.yw-search-result__media img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	object-position: center;
}

.yw-search-result__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin-bottom: 6px;
}

.yw-search-result__type {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 9px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	color: var(--yw-primary-dark);
	background: #eef2ff;
	border: 1px solid #e0e7ff;
}

.yw-search-result__date {
	font-size: 12px;
	color: #94a3b8;
}

.yw-search-result__title {
	margin: 0 0 6px;
	font-size: 17px;
	font-weight: 800;
	line-height: 1.35;
}

.yw-search-result__title a {
	color: #0f172a;
	text-decoration: none;
}

.yw-search-result__title a:hover {
	color: var(--yw-primary);
}

.yw-search-result__excerpt {
	margin: 0;
	font-size: 13px;
	line-height: 1.55;
	color: #64748b;
}

.yw-search-empty {
	padding: 28px 12px;
	text-align: center;
	color: #64748b;
}

.yw-search-empty__title {
	margin: 0 0 8px;
	font-size: 17px;
	font-weight: 800;
	color: #0f172a;
}

.yw-search-empty__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-top: 16px;
}

.yw-search-pagination {
	margin-top: 20px;
}

.yw-search-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

/* 右栏 */
.yw-search-sidebar--right {
	position: sticky;
	top: 88px;
}

.yw-search-sidebar__stack {
	display: flex;
	flex-direction: column;
	gap: 0;
	border-radius: 18px;
	background: #fff;
	border: 1px solid var(--yw-border);
	box-shadow: 0 4px 24px rgba(15, 23, 42, 0.05);
	overflow: hidden;
}

.yw-search-panel {
	padding: 18px 16px;
}

.yw-search-panel__title {
	margin: 0 0 12px;
	padding-left: 10px;
	border-left: 3px solid var(--yw-primary);
	font-size: 14px;
	font-weight: 800;
	color: #0f172a;
}

.yw-search-panel__stat {
	padding: 14px;
	border-radius: 12px;
	background: #f8fafc;
	border: 1px solid #eef2f6;
	text-align: center;
}

.yw-search-panel__stat strong {
	display: block;
	font-size: 28px;
	font-weight: 800;
	color: var(--yw-primary);
	line-height: 1.1;
}

.yw-search-panel__stat span {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: #94a3b8;
	font-weight: 600;
}

.yw-search-panel__keyword {
	margin: 12px 0 0;
	font-size: 13px;
	line-height: 1.45;
	color: #64748b;
	word-break: break-word;
}

.yw-search-tips {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 8px;
}

.yw-search-tips li {
	position: relative;
	padding-left: 18px;
	font-size: 13px;
	line-height: 1.45;
	color: #475569;
}

.yw-search-tips li::before {
	content: "•";
	position: absolute;
	left: 4px;
	color: var(--yw-primary);
	font-weight: 800;
}

.yw-search-panel--cta {
	background: linear-gradient(180deg, #f8fbff 0%, #eef2ff 100%);
}

.yw-search-panel__cta-text {
	margin: 0 0 12px;
	font-size: 13px;
	line-height: 1.5;
	color: #475569;
}

.yw-search-panel__cta-actions {
	display: grid;
	gap: 8px;
}

@media (max-width: 1080px) {
	.yw-search-sidebar--right {
		position: static;
	}

	.yw-search-sidebar__stack {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px;
		background: transparent;
		border: none;
		box-shadow: none;
		overflow: visible;
	}

	.yw-search-sidebar__stack > .yw-search-panel + .yw-search-panel {
		border-top: none;
	}

	.yw-search-sidebar__stack .yw-search-panel {
		border-radius: 16px;
		background: #fff;
		border: 1px solid var(--yw-border);
		box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
	}

	.yw-search-sidebar__stack .yw-search-panel--cta {
		grid-column: 1 / -1;
	}
}

@media (max-width: 768px) {
	.yw-search-results-card {
		padding: 16px 14px 18px;
	}

	.yw-search-result {
		grid-template-columns: 1fr;
	}

	.yw-search-result__media {
		aspect-ratio: 16 / 9;
	}

	.yw-search-sidebar__stack {
		grid-template-columns: 1fr;
	}
}
