/* ==========================================================================
   霓虹矩阵 · 布局层：页头 / 栅格 / 页脚
   ========================================================================== */
.nm-site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.nm-main {
	flex: 1;
	padding-block: clamp(28px, 3.4vw, 52px);
}

/* ---------- 页头搜索框（设计稿：胶囊输入 + 圆形按钮） ---------- */
.nm-header__search {
	align-items: center;
	background: var(--nm-bg-0a1228-75);
	border: 1px solid rgba(0, 229, 255, 0.28);
	border-radius: 999px;
	display: flex;
	height: 36px;
	overflow: hidden;
	width: clamp(180px, 17vw, 260px);
}

.nm-header__search input[type="search"] {
	background: transparent;
	border: 0;
	box-shadow: none;
	color: var(--nm-text);
	flex: 1;
	font-size: 12px;
	height: 100%;
	min-width: 0;
	padding: 0 4px 0 16px;
}

.nm-header__search input[type="search"]:focus {
	outline: none;
}

.nm-header__search input::placeholder {
	color: var(--nm-tx-66779a);
}

.nm-header__search button {
	align-items: center;
	background: linear-gradient(140deg, #a855f7, #ff3cac);
	border: 0;
	border-radius: 50%;
	color: #fff;
	display: inline-flex;
	flex: 0 0 28px;
	height: 28px;
	justify-content: center;
	margin-right: 3px;
	padding: 0;
}

.nm-header__search button svg {
	height: 14px;
	width: 14px;
}

.nm-icon-btn--round {
	border-radius: 50%;
}

.nm-header__avatar {
	background: linear-gradient(140deg, rgba(168, 85, 247, 0.3), rgba(255, 60, 172, 0.22));
	border-color: rgba(168, 85, 247, 0.55);
	color: var(--nm-tx-e3c8ff);
}

.nm-header__actions .nm-icon-btn--mobile {
	display: none;
}

@media (max-width: 1280px) {
	.nm-header__search {
		width: 180px;
	}
}

@media (max-width: 1180px) {
	.nm-header__search {
		display: none;
	}

	.nm-header__actions .nm-icon-btn--mobile {
		display: inline-flex;
	}
}

/* ---------- 页头 ---------- */
.nm-header {
	background: var(--nm-bg-070b18-86);
	border-bottom: 1px solid var(--nm-border);
	position: sticky;
	top: 0;
	z-index: 200;
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
}

.nm-header__inner {
	align-items: center;
	display: flex;
	gap: clamp(16px, 2.4vw, 36px);
	min-height: var(--nm-header-h);
}

.nm-brand {
	align-items: center;
	display: flex;
	flex-shrink: 0;
	gap: 11px;
	text-decoration: none;
}

.nm-brand__mark {
	align-items: center;
	display: inline-flex;
	filter: drop-shadow(0 0 8px rgba(255, 60, 172, 0.45));
	height: 38px;
	justify-content: center;
	width: 36px;
}

.nm-brand__mark svg {
	height: 100%;
	width: 100%;
}

.nm-brand__text {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
}

.nm-brand__name {
	background: linear-gradient(100deg, #ffffff, #9be9ff);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	font-size: 20px;
	font-weight: 800;
	letter-spacing: 0.08em;
}

.nm-brand__name em {
	color: var(--nm-cyan);
	font-style: normal;
}

.nm-brand__tagline {
	color: var(--nm-tx-7f90b2);
	font-size: 10px;
	letter-spacing: 0.14em;
}

.nm-brand img {
	display: block;
	max-height: 44px;
	width: auto;
}

/* 主导航 */
.nm-nav {
	flex: 1;
	min-width: 0;
}

.nm-nav ul {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nm-nav li {
	margin: 0;
	position: relative;
}

.nm-nav a {
	border-radius: 8px;
	color: var(--nm-muted-strong);
	display: block;
	font-size: 15px;
	font-weight: 500;
	padding: 9px 13px;
	position: relative;
	text-decoration: none;
	white-space: nowrap;
}

.nm-nav > ul > li > a::after {
	background: linear-gradient(90deg, var(--nm-cyan), var(--nm-purple));
	border-radius: 2px;
	bottom: 3px;
	content: "";
	height: 2px;
	left: 13px;
	opacity: 0;
	position: absolute;
	right: 13px;
	transform: scaleX(0.4);
	transition: all var(--nm-dur) var(--nm-ease);
}

.nm-nav > ul > li:hover > a,
.nm-nav > ul > li.current-menu-item > a,
.nm-nav > ul > li.current-menu-ancestor > a,
.nm-nav > ul > li > a:focus-visible {
	color: var(--nm-cyan);
}

.nm-nav > ul > li:hover > a::after,
.nm-nav > ul > li.current-menu-item > a::after,
.nm-nav > ul > li.current-menu-ancestor > a::after {
	opacity: 1;
	transform: scaleX(1);
}

/* 下拉 */
.nm-nav .sub-menu {
	background: var(--nm-bg-0c1326);
	border: 1px solid var(--nm-border);
	border-radius: 12px;
	box-shadow: 0 24px 48px var(--nm-sh-000000-55);
	display: block;
	left: 0;
	min-width: 190px;
	opacity: 0;
	padding: 8px;
	pointer-events: none;
	position: absolute;
	top: calc(100% + 8px);
	transform: translateY(6px);
	transition: all var(--nm-dur) var(--nm-ease);
	visibility: hidden;
	z-index: 30;
}

.nm-nav .sub-menu::before {
	content: "";
	height: 12px;
	left: 0;
	position: absolute;
	right: 0;
	top: -12px;
}

.nm-nav li:hover > .sub-menu,
.nm-nav li:focus-within > .sub-menu {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
	visibility: visible;
}

.nm-nav .sub-menu a {
	border-radius: 7px;
	font-size: 14px;
	padding: 8px 12px;
}

.nm-nav .sub-menu a:hover {
	background: rgba(0, 229, 255, 0.08);
	color: var(--nm-cyan);
}

.nm-nav .sub-menu .sub-menu {
	left: 100%;
	top: -8px;
}

/* 页头动作区 */
.nm-header__actions {
	align-items: center;
	display: flex;
	flex-shrink: 0;
	gap: 8px;
}

.nm-icon-btn {
	align-items: center;
	background: var(--nm-bg-ffffff-03);
	border: 1px solid var(--nm-border);
	border-radius: 10px;
	color: var(--nm-muted-strong);
	display: inline-flex;
	height: 38px;
	justify-content: center;
	padding: 0;
	width: 38px;
}

.nm-icon-btn:hover {
	background: rgba(0, 229, 255, 0.08);
	border-color: var(--nm-border-strong);
	color: var(--nm-cyan);
}

.nm-icon-btn svg {
	height: 18px;
	width: 18px;
}

.nm-header__login {
	border: 1px solid var(--nm-border);
	border-radius: 999px;
	color: var(--nm-text);
	font-size: var(--nm-fs-sm);
	padding: 8px 16px;
}

.nm-header__login:hover {
	border-color: var(--nm-border-strong);
	color: var(--nm-cyan);
}

.nm-menu-toggle {
	display: none;
}

/* 顶部主题切换按钮占用右侧空间：微调间距，保证桌面端 8 项导航仍在一行 */
@media (max-width: 1520px) {
	.nm-header__inner {
		gap: clamp(14px, 1.8vw, 26px);
	}

	.nm-nav > ul > li > a {
		padding: 9px 10px;
	}
}

@media (max-width: 1290px) {
	.nm-nav > ul > li > a {
		font-size: 14px;
		padding: 8px 7px;
	}
}

@media (max-width: 1180px) {
	.nm-nav > ul > li > a {
		font-size: 13.5px;
		padding: 8px 7px;
	}

	.nm-header__login {
		display: none;
	}
}

@media (max-width: 1000px) {
	.nm-nav > ul > li > a {
		font-size: 13px;
		padding: 7px 5px;
	}

	.nm-header__search,
	.nm-header__search-form {
		max-width: 150px;
	}
}

@media (max-width: 860px) {
	.nm-nav {
		display: none;
	}

	.nm-menu-toggle {
		display: inline-flex;
	}

	.nm-header__inner {
		justify-content: space-between;
	}
}

/* 移动抽屉 */
.nm-drawer {
	background: var(--nm-bg-080d1c);
	border-left: 1px solid var(--nm-border);
	bottom: 0;
	display: flex;
	flex-direction: column;
	max-width: 360px;
	position: fixed;
	right: 0;
	top: 0;
	transform: translateX(102%);
	transition: transform 0.34s var(--nm-ease);
	width: 88vw;
	z-index: 500;
	overflow-y: auto;
	padding: 22px;
}

.nm-drawer.is-open {
	transform: translateX(0);
}

.nm-drawer__head {
	align-items: center;
	display: flex;
	justify-content: space-between;
	margin-bottom: 20px;
}

.nm-drawer__close {
	background: var(--nm-bg-ffffff-04);
	border: 1px solid var(--nm-border);
	border-radius: 10px;
	color: var(--nm-text);
	font-size: 22px;
	height: 38px;
	line-height: 1;
	padding: 0;
	width: 38px;
}

.nm-drawer__nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nm-drawer__nav li {
	border-bottom: 1px solid var(--nm-border-soft);
	margin: 0;
}

.nm-drawer__nav a {
	color: var(--nm-muted-strong);
	display: flex;
	font-size: 16px;
	justify-content: space-between;
	padding: 13px 4px;
}

.nm-drawer__nav a:hover {
	color: var(--nm-cyan);
}

.nm-drawer__nav .sub-menu {
	padding-left: 16px;
}

.nm-drawer__nav .sub-menu a {
	font-size: 14px;
	padding-block: 9px;
}

.nm-drawer__foot {
	display: grid;
	gap: 10px;
	margin-top: auto;
	padding-top: 26px;
}

.nm-drawer__search {
	margin-bottom: 18px;
}

.nm-overlay {
	background: var(--nm-bg-02040a-66);
	inset: 0;
	opacity: 0;
	pointer-events: none;
	position: fixed;
	transition: opacity var(--nm-dur) var(--nm-ease);
	z-index: 400;
	backdrop-filter: blur(2px);
}

.nm-overlay.is-active {
	opacity: 1;
	pointer-events: auto;
}

/* 搜索层 */
.nm-search-panel {
	background: var(--nm-bg-0a1020);
	border-bottom: 1px solid var(--nm-border);
	box-shadow: 0 30px 60px var(--nm-sh-000000-50);
	display: none;
	left: 0;
	padding: 22px 0;
	position: fixed;
	right: 0;
	top: 0;
	z-index: 450;
}

.nm-search-panel.is-open {
	display: block;
}

.nm-search-panel form {
	align-items: center;
	display: flex;
	gap: 10px;
}

.nm-search-panel input[type="search"] {
	background: var(--nm-bg-050a16-80);
	border-radius: 10px;
	font-size: 16px;
	height: 46px;
}

.nm-search-panel__hint {
	color: var(--nm-muted);
	font-size: var(--nm-fs-xs);
	margin-top: 10px;
}

/* ---------- 页面头部 / 面包屑 ---------- */
.nm-breadcrumbs {
	align-items: center;
	color: var(--nm-muted);
	display: flex;
	flex-wrap: wrap;
	font-size: var(--nm-fs-xs);
	gap: 6px;
	margin-bottom: 18px;
}

.nm-breadcrumbs a {
	color: var(--nm-muted);
}

.nm-breadcrumbs a:hover {
	color: var(--nm-cyan);
}

.nm-breadcrumbs__sep {
	color: #53627b;
}

.nm-breadcrumbs__current {
	color: var(--nm-muted-strong);
}

.nm-page-head {
	margin-bottom: clamp(22px, 3vw, 36px);
}

.nm-page-head__eyebrow {
	color: var(--nm-cyan);
	font-family: var(--nm-font-mono);
	font-size: var(--nm-fs-xs);
	letter-spacing: 0.24em;
	margin-bottom: 10px;
	text-transform: uppercase;
}

.nm-page-head h1 {
	font-size: var(--nm-fs-2xl);
	margin-bottom: 10px;
}

.nm-page-head__desc {
	color: var(--nm-muted);
	font-size: var(--nm-fs-base);
	max-width: 780px;
}

.nm-page-head__desc p:last-child {
	margin-bottom: 0;
}

/* ---------- 内容栅格 ---------- */
.nm-layout {
	display: grid;
	gap: clamp(24px, 2.6vw, 40px);
	grid-template-columns: minmax(0, 1fr) 320px;
}

.nm-layout--full {
	grid-template-columns: minmax(0, 1fr);
}

.nm-main-col {
	min-width: 0;
}

.nm-sidebar {
	display: flex;
	flex-direction: column;
	gap: 22px;
	min-width: 0;
}

@media (max-width: 1080px) {
	.nm-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.nm-sidebar {
		display: grid;
		gap: 20px;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 680px) {
	.nm-sidebar {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---------- 页脚 ---------- */
.nm-footer {
	background: var(--nm-city-grad);
	border-top: 1px solid var(--nm-border);
	margin-top: clamp(40px, 5vw, 76px);
	padding-block: clamp(36px, 4vw, 56px) 26px;
	position: relative;
	overflow: hidden;
}

.nm-footer::before {
	background: linear-gradient(90deg, transparent, var(--nm-cyan), var(--nm-purple), var(--nm-magenta), transparent);
	content: "";
	height: 1px;
	left: 0;
	opacity: 0.6;
	position: absolute;
	right: 0;
	top: -1px;
}

/* 页脚城市天际线剪影 */
.nm-footer::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 180px;
	background: linear-gradient(180deg, transparent, var(--nm-bg-070b18-70) 60%, var(--nm-bg-050812)),
		repeating-linear-gradient(90deg,
			transparent 0 30px,
			rgba(0, 229, 255, 0.04) 30px 31px,
			transparent 31px 70px,
			rgba(168, 85, 247, 0.03) 70px 71px,
			transparent 71px 120px
		);
	pointer-events: none;
	z-index: 0;
}

.nm-footer > .nm-container {
	position: relative;
	z-index: 1;
}

.nm-footer__row {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 18px 32px;
	justify-content: space-between;
}

.nm-footer__nav {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0;
}

.nm-footer__nav a {
	color: var(--nm-tx-9fb0d0);
	font-size: 12px;
	padding: 4px 18px;
	position: relative;
}

.nm-footer__nav a + a::before {
	background: rgba(120, 150, 220, 0.3);
	content: "";
	height: 12px;
	left: 0;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 1px;
}

.nm-footer__nav a:hover {
	color: var(--nm-cyan);
}

.nm-footer__copy {
	color: var(--nm-tx-7c8db1);
	font-size: 11px;
	line-height: 1.9;
	margin: 18px 0 0;
	text-align: center;
}

.nm-footer__legal-note {
	color: #5d6d8f;
	font-size: 10px;
	line-height: 1.8;
	margin: 6px 0 0;
	text-align: center;
}

/* 安全交易保障 */
.nm-security-grid {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin-top: 16px;
}

.nm-security-item {
	align-items: center;
	background: linear-gradient(160deg, var(--nm-bg-111b32-70), var(--nm-bg-0a1020-70));
	border: 1px solid var(--nm-border);
	border-radius: 10px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 14px 8px;
	text-align: center;
}

.nm-security-item__icon {
	align-items: center;
	background: color-mix(in srgb, var(--nm-cyan) 12%, transparent);
	border: 1px solid color-mix(in srgb, var(--nm-cyan) 32%, transparent);
	border-radius: 50%;
	color: var(--nm-cyan);
	display: inline-flex;
	height: 38px;
	justify-content: center;
	margin-bottom: 4px;
	width: 38px;
}

.nm-security-item__icon svg {
	height: 18px;
	width: 18px;
}

.nm-security-item__title {
	color: var(--nm-text);
	font-size: 12px;
	font-weight: 600;
}

.nm-security-item__desc {
	color: var(--nm-muted);
	font-size: 10px;
}

@media (max-width: 480px) {
	.nm-security-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 900px) {
	.nm-footer__row {
		flex-direction: column;
		text-align: center;
	}

	.nm-footer__nav {
		justify-content: center;
	}

	.nm-footer__nav a {
		padding: 4px 12px;
	}
}
