/* 全站页头布局变量 */
:root {
	--index-layout-max: min(2200px, 95%);
	--index-layout-px: clamp(14px, 2.5vw, 38px);
}

/* 旧页头：保留 DOM 供 common.js，视觉隐藏 */
.legacy-header-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
	min-height: 0 !important;
}

.site-header-wrap {
	width: 100%;
	background: #fff;
}

body.has-site-header .header.legacy-header-hidden {
	display: block !important;
}

.index-util-item-active {
	color: #2cb67d !important;
	font-weight: 600;
}

.index-home-top {
	width: 100%;
	background: #fff;
}

.index-header-bar {
	width: 100%;
	border-bottom: 1px solid #f0f0f0;
	box-sizing: border-box;
}

.index-header-inner {
	width: 100%;
	max-width: var(--index-layout-max);
	margin-left: auto;
	margin-right: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px var(--index-layout-px);
	min-height: 64px;
	box-sizing: border-box;
}

.index-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	flex-shrink: 0;
}

.index-logo img {
	width: 48px;
	height: 48px;
	object-fit: contain;
}

.index-logo-text {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}

.index-logo-name {
	font-size: 20px;
	font-weight: 700;
	color: #1a1a1a;
}

.index-logo-url {
	font-size: 12px;
	color: #999;
	margin-top: 2px;
}

.index-main-nav {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px 20px;
	flex: 1;
	justify-content: center;
	min-width: 0;
}

.index-main-nav a {
	font-size: 14px;
	color: #333;
	text-decoration: none;
	white-space: nowrap;
	position: relative;
	padding: 4px 0;
}

.index-main-nav a:hover {
	color: #2cb67d;
}

.index-main-nav a.is-active {
	color: #2cb67d;
	font-weight: 600;
}

/* 出哈夫币：独立强调样式，不影响其他导航选中态 */
.index-main-nav a[data-nav="coin"] {
	color: #ff7d19;
	font-size: 17px;
	font-weight: 700;
}

.index-main-nav a[data-nav="coin"]:hover,
.index-main-nav a[data-nav="coin"].is-active {
	color: #ff7d19;
	font-size: 17px;
	font-weight: 700;
}

.index-nav-hot {
	display: inline-block;
	margin-left: 4px;
	padding: 0 5px;
	font-size: 10px;
	line-height: 16px;
	color: #fff;
	background: #ff4d4f;
	border-radius: 3px;
	vertical-align: middle;
	font-weight: 600;
}

.index-header-utils {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	gap: 18px;
}

.index-util-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	color: #666;
	cursor: pointer;
	text-decoration: none;
	position: relative;
	min-width: 48px;
}

.index-util-item:hover {
	color: #2cb67d;
}

.index-util-icon {
	width: 22px;
	height: 22px;
	background: #f5f5f5;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	color: #888;
}

.index-util-icon img {
	width: 18px;
	height: 18px;
	object-fit: contain;
}

.index-util-badge {
	position: absolute;
	top: -2px;
	right: 2px;
	min-width: 14px;
	height: 14px;
	padding: 0 4px;
	font-size: 10px;
	line-height: 14px;
	text-align: center;
	color: #fff;
	background: #ff4d4f;
	border-radius: 8px;
}

.index-header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: 8px;
}

.index-btn-login {
	padding: 8px 20px;
	font-size: 13px;
	color: #fff;
	background: #161a23;
	border-radius: 20px;
	cursor: pointer;
	white-space: nowrap;
	border: none;
}

.index-btn-fav {
	padding: 8px 16px;
	font-size: 13px;
	color: #fff;
	background: #2cb67d;
	border-radius: 20px;
	cursor: pointer;
	white-space: nowrap;
	border: none;
}

/* 横幅区：宽度与下方 container-top / 搜索栏一致 */
.index-banner-wrap {
	max-width: min(1400px, 96%);
	margin: 0 auto;
	padding: 16px 0 20px;
	/*width: 100%;
	max-width: var(--index-layout-max);
	margin-left: auto;
	margin-right: auto;
	padding: 16px var(--index-layout-px) 20px;*/
	box-sizing: border-box;
}

.index-banner-row {
	display: flex;
	gap: 12px;
	align-items: stretch;
}

.index-banner-carousel {
	flex: 1 1 66%;
	min-width: 0;
	position: relative;
	/*width: 100%;
	min-width: 0;
	aspect-ratio: 16 / 5;
	min-height: clamp(150px, 16vw, 280px);
	max-height: clamp(200px, 26vw, 340px);*/
	border-radius: 8px;
	overflow: hidden;
	background: linear-gradient(135deg, #e8f8ef 0%, #d4efe0 100%);
	min-height: 280px;
	/*background: #f0f0f0;*/
}

.index-banner-slide {
	display: none;
	width: 100%;
	height: 100%;
	min-height: 280px;
	position: relative;
}

.index-banner-slide.is-active {
	display: block;
}

.index-banner-slide img {
	width: 100%;
	height: 100%;
	min-height: 280px;
	object-fit: cover;
	display: block;
}

.index-banner-slide-placeholder {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	padding: 40px 48px;
	min-height: 280px;
	box-sizing: border-box;
}

.index-banner-slide-placeholder h2 {
	margin: 0 0 12px;
	font-size: 28px;
	font-weight: 700;
	color: #1a1a1a;
	max-width: 420px;
	line-height: 1.35;
}

.index-banner-slide-placeholder p {
	margin: 0 0 20px;
	font-size: 14px;
	color: #666;
}

.index-banner-slide-btn {
	display: inline-block;
	padding: 10px 24px;
	background: #fff;
	color: #2cb67d;
	border-radius: 4px;
	font-size: 14px;
	cursor: pointer;
	text-decoration: none;
	border: 1px solid #2cb67d;
}

.index-banner-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	border: none;
	background: rgba(255, 255, 255, 0.75);
	border-radius: 50%;
	cursor: pointer;
	font-size: 22px;
	line-height: 1;
	color: #333;
	z-index: 2;
}

.index-banner-arrow.prev {
	left: 12px;
}

.index-banner-arrow.next {
	right: 12px;
}

.index-banner-dots {
	position: absolute;
	bottom: 12px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 8px;
	z-index: 2;
}

.index-banner-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.6);
	border: none;
	padding: 0;
	cursor: pointer;
}

.index-banner-dot.is-active {
	background: #2cb67d;
}

.index-banner-side {
	flex: 0 0 32%;
	min-width: 240px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: 1fr 1fr;
	gap: 10px;
}

.index-side-card {
	background: #f8f9fa;
	border-radius: 8px;
	padding: 14px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 0;
	border: 1px solid #eee;
}

.index-side-card h4 {
	margin: 0 0 6px;
	font-size: 14px;
	font-weight: 600;
	color: #333;
}

.index-side-card p {
	margin: 0;
	font-size: 12px;
	color: #888;
	line-height: 1.4;
}

.index-side-card a {
	font-size: 12px;
	color: #2cb67d;
	margin-top: 6px;
	text-decoration: none;
	cursor: pointer;
}

.index-side-card-qr {
	align-items: center;
	text-align: center;
	padding: 10px;
}

.index-side-card-qr img {
	width: 72px;
	height: 72px;
	object-fit: contain;
	background: #fff;
	border: 1px solid #eee;
	margin-bottom: 6px;
}

.index-side-card-app {
	background: linear-gradient(160deg, #eef6f1 0%, #f8f9fa 100%);
}

/* common.js 兼容：保留但不可见 */
.index-compat-header {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 1100px) {
	.index-main-nav {
		display: none;
	}

	.index-banner-row {
		flex-direction: column;
	}

	.index-banner-carousel {
		flex: none;
		width: 100%;
	}

	.index-banner-side {
		flex: none;
		width: 100%;
		min-width: 0;
	}
}
