/* 聚合页美化：疏朗留白 + 主题蓝圆角风格 */
#discoveryPage {
	--zn-disc-gap: 1.1rem;
	--zn-disc-radius: var(--border-radius, .75rem);
	--zn-disc-border: var(--color-border, rgba(148, 163, 184, .16));
	--zn-disc-muted: var(--color-muted, var(--color-text-light, #94a3b8));
	--zn-disc-text: var(--color-text, #333333);
	--zn-disc-title: var(--color-text, #0f172a);
	--zn-disc-surface: var(--color-surface, #fff);
}

#discoveryPage > .row {
	align-items: flex-start;
}

#discoveryPage .main {
	padding-bottom: 1.5rem;
}

/* 顶部数据条 */
#discoveryPage .zn-disc-stats-card {
	border: 1px solid var(--zn-disc-border);
	border-radius: var(--zn-disc-radius);
	box-shadow: none;
	background: linear-gradient(135deg, rgba(var(--color-primary-rgb, 59, 130, 246), .06), color-mix(in srgb, var(--zn-disc-surface) 95%, transparent));
	margin-bottom: var(--zn-disc-gap);
}

#discoveryPage .zn-disc-stats {
	display: flex;
	flex-wrap: nowrap;
	gap: 6px;
	align-items: center;
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
#discoveryPage .zn-disc-stats::-webkit-scrollbar { display: none; }

#discoveryPage .zn-disc-stat {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	flex: 1 1 0;
	min-width: 0;
	padding: 6px 8px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--zn-disc-surface) 85%, transparent);
	border: 1px solid var(--zn-disc-border);
	font-size: 12px;
	color: var(--zn-disc-muted);
	line-height: 1.2;
	white-space: nowrap;
}

#discoveryPage .zn-disc-stat b {
	color: var(--zn-disc-title);
	font-weight: 600;
	font-size: 13px;
	font-variant-numeric: tabular-nums;
}

#discoveryPage .zn-disc-brief {
	margin-left: auto;
	max-width: 38%;
	font-size: 12px;
	color: var(--zn-disc-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* 三栏速览：独立卡片 + 间距 */
#discoveryPage .zn-disc-triple {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--zn-disc-gap);
	margin-bottom: var(--zn-disc-gap);
	background: transparent;
	border: 0;
}

#discoveryPage .zn-disc-triple-col {
	min-width: 0;
	background: var(--zn-disc-surface);
	border: 1px solid var(--zn-disc-border);
	border-radius: var(--zn-disc-radius);
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}

#discoveryPage .zn-disc-col-hd {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 14px 16px 12px;
	font-size: 14px;
	font-weight: 600;
	color: var(--zn-disc-title);
	border-bottom: 1px solid var(--zn-disc-border);
	background: var(--zn-disc-surface);
	position: relative;
}

#discoveryPage .zn-disc-col-hd::after {
	content: "";
	position: absolute;
	left: 16px;
	bottom: -1px;
	width: 28px;
	height: 2px;
	border-radius: 2px;
	background: linear-gradient(to right, var(--primary, #3b82f6), transparent);
}

#discoveryPage .zn-disc-col-hd i {
	color: var(--primary, #3b82f6);
	font-size: 13px;
}

#discoveryPage .zn-disc-col-bd {
	padding: 8px 8px 10px;
}

#discoveryPage .zn-disc-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

#discoveryPage .zn-disc-list > li {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 10px;
	border-bottom: 0;
	border-radius: 8px;
	line-height: 1.4;
	min-width: 0;
	transition: background .15s ease;
}

#discoveryPage .zn-disc-list > li:hover {
	background: rgba(var(--color-primary-rgb, 59, 130, 246), .06);
}

#discoveryPage .zn-disc-list > li + li {
	margin-top: 1px;
}

#discoveryPage .zn-disc-idx {
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	border-radius: 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 600;
	color: var(--zn-disc-muted);
	background: var(--gray-100, #f1f5f9);
	line-height: 1;
}

#discoveryPage .zn-disc-list > li:nth-child(-n+3) .zn-disc-idx {
	color: #fff;
	background: var(--primary, #3b82f6);
}

#discoveryPage .zn-disc-date {
	flex: 0 0 auto;
	margin-left: auto;
	font-size: 11px;
	color: var(--zn-disc-muted);
	white-space: nowrap;
	opacity: .9;
}

#discoveryPage .zn-disc-link {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--zn-disc-text);
	font-size: 13px;
	text-decoration: none !important;
}

#discoveryPage .zn-disc-list > li:hover .zn-disc-link {
	color: var(--primary, #3b82f6);
}

/* 通用区块卡片 */
#discoveryPage .zn-disc-section,
#discoveryPage .zn-disc-forum-card,
#discoveryPage .zn-disc-boards {
	border: 1px solid var(--zn-disc-border);
	border-radius: var(--zn-disc-radius);
	box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
	overflow: hidden;
	margin-bottom: var(--zn-disc-gap);
}

#discoveryPage .zn-disc-section .card-header,
#discoveryPage .zn-disc-forum-card .card-header,
#discoveryPage .zn-disc-boards .card-header {
	background: var(--zn-disc-surface);
	border-bottom: 1px solid var(--zn-disc-border);
	padding: 12px 16px 0;
}

#discoveryPage .zn-disc-section .card-header-tabs .nav-link,
#discoveryPage .zn-disc-forum-card .card-header-tabs .nav-link {
	border: 0;
	padding: .55rem .15rem .85rem;
	color: var(--zn-disc-title);
	font-size: 14px;
}

#discoveryPage .zn-disc-section .card-body,
#discoveryPage .zn-disc-forum-card .card-body {
	padding: 10px 12px 12px;
}

#discoveryPage .zn-disc-digest-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 2px 18px;
}

#discoveryPage .zn-disc-digest-list > li {
	padding: 10px 8px;
}

#discoveryPage .zn-disc-forum-grid .row {
	margin-left: -8px;
	margin-right: -8px;
}

#discoveryPage .zn-disc-forum-grid .col-md-6 {
	padding-left: 8px;
	padding-right: 8px;
}

#discoveryPage .zn-disc-forum-card .card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

#discoveryPage .zn-disc-forum-card .zn-disc-more {
	font-size: 12px;
	color: var(--zn-disc-muted);
	white-space: nowrap;
	padding-bottom: 10px;
	text-decoration: none !important;
}

#discoveryPage .zn-disc-forum-card .zn-disc-more:hover {
	color: var(--primary, #3b82f6);
}

#discoveryPage .zn-disc-forum-card .zn-disc-list > li {
	padding: 9px 8px;
}

/* 所有版块 */
#discoveryPage .zn-disc-boards .card-header {
	padding: 14px 16px;
	font-size: 14px;
	font-weight: 600;
	color: var(--zn-disc-title);
}

#discoveryPage .zn-disc-boards .card-body {
	padding: 8px 12px 14px;
}

#discoveryPage .zn-disc-board-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

#discoveryPage .zn-disc-board-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	min-width: 0;
	max-width: 100%;
	padding: 14px 12px;
	border-radius: 12px;
	border: 1px solid transparent;
	text-decoration: none !important;
	color: inherit;
	transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

#discoveryPage .zn-disc-board-item:hover {
	background: rgba(59, 130, 246, .05);
	border-color: rgba(59, 130, 246, .18);
}

#discoveryPage .zn-disc-board-icon {
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	object-fit: cover;
	box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
}

#discoveryPage .zn-disc-board-body {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
}

#discoveryPage .zn-disc-board-name {
	display: flex;
	align-items: baseline;
	gap: 8px;
	min-width: 0;
}

#discoveryPage .zn-disc-board-title {
	font-weight: 600;
	color: var(--zn-disc-title);
	font-size: 14px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

#discoveryPage .zn-disc-board-count {
	flex: 0 0 auto;
	font-size: 11px;
	color: var(--zn-disc-muted);
	white-space: nowrap;
}

#discoveryPage .zn-disc-board-meta {
	font-size: 12px;
	color: #64748b;
	margin-top: 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

#discoveryPage .zn-disc-board-brief {
	font-size: 12px;
	color: var(--zn-disc-muted);
	margin-top: 3px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

@media (max-width: 1199.98px) {
	#discoveryPage .zn-disc-triple {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 991.98px) {
	#discoveryPage .zn-disc-board-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	#discoveryPage .zn-disc-digest-list {
		grid-template-columns: minmax(0, 1fr);
	}

	#discoveryPage .zn-disc-date {
		display: none;
	}

	#discoveryPage .zn-disc-brief {
		display: none;
	}
}

@media (max-width: 575.98px) {
	#discoveryPage .zn-disc-board-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	#discoveryPage .zn-disc-stats-card .card-body {
		padding: .85rem !important;
	}
}

/* ========== 最新注册 · 欢迎仪式 ========== */
#discoveryPage .zn-welcome-card {
	border: 1px solid var(--zn-disc-border);
	border-radius: var(--zn-disc-radius);
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
	background:
		radial-gradient(120% 80% at 100% 0%, rgba(59, 130, 246, .10), transparent 55%),
		#fff;
}

#discoveryPage .zn-welcome-hd {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 16px;
	border-bottom: 1px solid var(--zn-disc-border);
	background: transparent;
}

#discoveryPage .zn-welcome-hd-left {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

#discoveryPage .zn-welcome-badge {
	width: 36px;
	height: 36px;
	border-radius: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	background: linear-gradient(135deg, #60a5fa, #3b82f6);
	box-shadow: 0 6px 16px rgba(59, 130, 246, .28);
	flex: 0 0 auto;
}

#discoveryPage .zn-welcome-title {
	font-size: 15px;
	font-weight: 700;
	color: var(--zn-disc-title);
	line-height: 1.2;
}

#discoveryPage .zn-welcome-sub {
	font-size: 12px;
	color: var(--zn-disc-muted);
	margin-top: 2px;
}

#discoveryPage .zn-welcome-hero {
	align-items: center;
	gap: 12px;
	padding: 6px 10px 6px 6px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--zn-disc-surface) 72%, transparent);
	border: 1px solid rgba(var(--color-primary-rgb, 59, 130, 246), .18);
	box-shadow: 0 4px 14px rgba(59, 130, 246, .08);
}

#discoveryPage .zn-welcome-hero-avatar {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--zn-disc-surface);
	box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb, 59, 130, 246), .35);
}

#discoveryPage .zn-welcome-hero-label {
	font-size: 11px;
	color: var(--primary, #3b82f6);
	font-weight: 600;
	letter-spacing: .04em;
}

#discoveryPage .zn-welcome-hero-name {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 700;
	color: var(--zn-disc-title);
}

#discoveryPage .zn-welcome-hero-name a {
	color: inherit;
	text-decoration: none;
}

#discoveryPage .zn-welcome-hero-meta {
	font-size: 11px;
	color: var(--zn-disc-muted);
}

#discoveryPage .zn-welcome-tag {
	display: inline-flex;
	align-items: center;
	padding: 1px 7px;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 700;
	color: #fff;
	background: linear-gradient(135deg, #f59e0b, #f97316);
	line-height: 1.5;
}

#discoveryPage .zn-welcome-stage {
	padding: 16px 16px 4px;
}

#discoveryPage .zn-welcome-stage-inner {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px;
	border-radius: 14px;
	background: linear-gradient(135deg, rgba(var(--color-primary-rgb, 59, 130, 246), .08), color-mix(in srgb, var(--zn-disc-surface) 90%, transparent));
	border: 1px solid rgba(var(--color-primary-rgb, 59, 130, 246), .14);
	overflow: hidden;
}

#discoveryPage .zn-welcome-ring {
	position: absolute;
	width: 120px;
	height: 120px;
	border-radius: 50%;
	left: -20px;
	top: -30px;
	background: radial-gradient(circle, rgba(59, 130, 246, .18), transparent 68%);
	animation: znWelcomePulse 2.8s ease-in-out infinite;
	pointer-events: none;
}

#discoveryPage .zn-welcome-stage-avatar {
	position: relative;
	z-index: 1;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid var(--zn-disc-surface);
	box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb, 59, 130, 246), .28);
}

#discoveryPage .zn-welcome-stage-copy {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

#discoveryPage .zn-welcome-stage-name {
	font-size: 15px;
	font-weight: 700;
	color: var(--zn-disc-title);
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

#discoveryPage .zn-welcome-stage-meta {
	font-size: 12px;
	color: var(--zn-disc-muted);
}

#discoveryPage .zn-welcome-scroll {
	padding: 14px 10px 18px !important;
}

#discoveryPage .zn-welcome-user-card {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	width: 108px;
	margin: 0 8px;
	padding: 12px 8px;
	border-radius: 14px;
	text-align: center;
	text-decoration: none !important;
	color: inherit;
	transition: transform .2s ease, background .2s ease;
	vertical-align: top;
}

#discoveryPage .zn-welcome-user-card:hover {
	transform: translateY(-4px);
	background: rgba(59, 130, 246, .05);
}

#discoveryPage .zn-welcome-avatar-wrap {
	position: relative;
	width: 64px;
	height: 64px;
	margin-bottom: 10px;
}

#discoveryPage .zn-welcome-glow {
	position: absolute;
	inset: -4px;
	border-radius: 50%;
	background: conic-gradient(from 180deg, rgba(59, 130, 246, .0), rgba(59, 130, 246, .45), rgba(96, 165, 250, .0));
	opacity: 0;
	transition: opacity .2s ease;
	animation: znWelcomeSpin 6s linear infinite;
}

#discoveryPage .zn-welcome-user-card.is-fresh .zn-welcome-glow,
#discoveryPage .zn-welcome-user-card.is-newest .zn-welcome-glow {
	opacity: 1;
}

#discoveryPage .zn-welcome-avatar {
	position: relative;
	z-index: 1;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid var(--zn-disc-surface);
	box-shadow: 0 4px 12px rgba(15, 23, 42, .12);
	background: var(--gray-50, #f8fafc);
}

#discoveryPage .zn-welcome-ribbon {
	position: absolute;
	z-index: 2;
	left: 50%;
	bottom: -4px;
	transform: translateX(-50%);
	padding: 1px 8px;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 700;
	color: #fff;
	background: linear-gradient(135deg, #3b82f6, #2563eb);
	box-shadow: 0 4px 10px rgba(37, 99, 235, .28);
	white-space: nowrap;
}

#discoveryPage .zn-welcome-user-card.is-newest .zn-welcome-ribbon {
	background: linear-gradient(135deg, #f59e0b, #f97316);
}

#discoveryPage .zn-welcome-name {
	font-size: 13px;
	font-weight: 600;
	color: var(--zn-disc-title);
	width: 100%;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-bottom: 3px;
}

#discoveryPage .zn-welcome-meta {
	font-size: 11px;
	color: var(--zn-disc-muted);
	white-space: nowrap;
}

@keyframes znWelcomePulse {
	0%, 100% { transform: scale(1); opacity: .7; }
	50% { transform: scale(1.12); opacity: 1; }
}

@keyframes znWelcomeSpin {
	to { transform: rotate(360deg); }
}
