/* 解忧热点 · 前端公共样式（防主题侵入 + 响应式卡片网格） */

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

.jyh {
	--jyh-radius: 14px;
	--jyh-gap: 18px;
	--jyh-card-bg: rgba(255,255,255,.85);
	--jyh-card-border: rgba(127,127,127,.12);
	--jyh-shadow: 0 4px 20px rgba(0,0,0,.06);
	--jyh-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;

	position: relative;
	max-width: 1200px;
	margin: 0 auto;
	padding: 22px;
	font-family: var(--jyh-font);
	font-size: 15px;
	line-height: 1.6;
	color: #1f2937;
	background: transparent;
}

/* 标题：强制去除主题下划线/边框/外边距 */
.jyh .jyh-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 18px;
	padding-bottom: 12px;
	border-bottom: 1px solid rgba(127,127,127,.15);
}

.jyh .jyh-title {
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	border-bottom: none !important;
	font-size: 24px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	background: none !important;
	box-shadow: none !important;
	color: inherit;
}

.jyh .jyh-updated {
	font-size: 12px;
	opacity: .55;
	white-space: nowrap;
}

/* 平台筛选 tabs */
.jyh .jyh-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 20px;
	padding: 2px;
}

.jyh .jyh-tab {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 16px;
	border: 1px solid rgba(127,127,127,.2);
	border-radius: 999px;
	background: rgba(255,255,255,.7);
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	transition: .2s ease;
	white-space: nowrap;
	box-shadow: 0 1px 2px rgba(0,0,0,.03);
}

.jyh .jyh-tab:hover {
	background: rgba(255,255,255,.95);
	transform: translateY(-1px);
	box-shadow: 0 4px 10px rgba(0,0,0,.06);
}

.jyh .jyh-tab.active {
	border-color: transparent;
	color: #fff;
}

.jyh .jyh-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex: 0 0 8px;
}

/* 内容区：响应式卡片网格 */
.jyh .jyh-body {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: var(--jyh-gap);
	align-items: start;
}

.jyh .jyh-platform {
	position: relative;
	background: var(--jyh-card-bg);
	border: 1px solid var(--jyh-card-border);
	border-radius: var(--jyh-radius);
	padding: 16px;
	box-shadow: var(--jyh-shadow);
	transition: .2s ease;
	backdrop-filter: blur(4px);
}

.jyh .jyh-platform:hover {
	box-shadow: 0 8px 28px rgba(0,0,0,.1);
	transform: translateY(-2px);
}

.jyh .jyh-platform-head {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	font-size: 16px;
	margin-bottom: 12px;
	padding-bottom: 10px;
	border-bottom: 1px solid rgba(127,127,127,.1);
}

.jyh .jyh-stale {
	font-size: 12px;
	font-weight: 400;
	opacity: .55;
	margin-left: auto;
}

/* 列表 reset */
.jyh .jyh-list {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.jyh .jyh-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 8px;
	border-radius: 8px;
	transition: .15s ease;
}

.jyh .jyh-item:hover {
	background: rgba(127,127,127,.06);
}

.jyh .jyh-rank {
	width: 24px;
	height: 24px;
	flex: 0 0 24px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	background: rgba(127,127,127,.12);
	color: #4b5563;
}

.jyh .jyh-item:nth-child(1) .jyh-rank { background: #ef4444; color: #fff; }
.jyh .jyh-item:nth-child(2) .jyh-rank { background: #f97316; color: #fff; }
.jyh .jyh-item:nth-child(3) .jyh-rank { background: #f59e0b; color: #fff; }

.jyh .jyh-title {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: inherit;
	text-decoration: none !important;
}

.jyh .jyh-title:hover {
	text-decoration: underline !important;
}

.jyh .jyh-hot {
	font-size: 12px;
	opacity: .55;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.jyh .jyh-empty {
	opacity: .55;
	padding: 12px 8px;
	font-size: 13px;
}

.jyh .jyh-watermark {
	position: absolute;
	top: 0;
	right: 0;
	background: rgba(244,63,94,.12);
	color: #f43f5e;
	font-size: 12px;
	padding: 5px 12px;
	border-radius: 0 0 0 12px;
	z-index: 10;
}

/* 筛选隐藏（保留布局） */
.jyh .jyh-platform { display: block; }

/* 根据平台数量显式控制列数（覆盖 auto-fill，保证不同数量都美观）
   注意：特异性保持 0,2,0（仅 .jyh-body.jyh-count-N），
   以便主题文件（后加载、同为 0,2,0）可正常覆盖自身网格。 */
.jyh-body.jyh-count-1 { grid-template-columns: minmax(300px, 720px); justify-content: center; }
.jyh-body.jyh-count-2 { grid-template-columns: repeat(2, 1fr); }
.jyh-body.jyh-count-3 { grid-template-columns: repeat(3, 1fr); }
.jyh-body.jyh-count-4 { grid-template-columns: repeat(4, 1fr); }

/* 适配单个平台展开时单列居中 */
.jyh .jyh-body:has(> .jyh-platform:only-child) {
	grid-template-columns: minmax(300px, 720px);
	justify-content: center;
}

/* 响应式 */
@media (max-width: 1024px) {
	.jyh-body.jyh-count-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
	.jyh-body.jyh-count-3,
	.jyh-body.jyh-count-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
	.jyh { padding: 14px; }
	.jyh-body,
	.jyh-body.jyh-count-1,
	.jyh-body.jyh-count-2,
	.jyh-body.jyh-count-3,
	.jyh-body.jyh-count-4 { grid-template-columns: 1fr; }
	.jyh .jyh-header { flex-direction: column; align-items: flex-start; }
	.jyh .jyh-title { font-size: 20px !important; }
	.jyh .jyh-tab { padding: 6px 12px; font-size: 12px; }
}
