
:root {
	--bg: #050506;
	--bg-elevated: #0c0c0e;
	--bg-soft: #121216;
	--line: rgba(255, 255, 255, 0.08);
	--line-strong: rgba(255, 255, 255, 0.16);
	--text: #f2f2f4;
	--muted: #9a9aa3;
	--accent: #4caf50;
	--accent-bright: #63c767;
	--accent-deep: #2e8b3a;
	--accent-dim: rgba(76, 175, 80, 0.16);
	--danger: #ff7a7a;
	--radius: 14px;
	--nav-h: 72px;
	--max: 920px;
	--font-display: "Syne", "Segoe UI", sans-serif;
	--font-body: "Manrope", "Segoe UI", sans-serif;
	--font-mono: "IBM Plex Mono", ui-monospace, monospace;
	--btn-shadow-primary: 0 1px 0 rgba(255, 255, 255, 0.28) inset, 0 -1px 0 rgba(0, 0, 0, 0.18) inset, 0 8px 20px rgba(46, 139, 58, 0.35);
	--btn-shadow-primary-hover: 0 1px 0 rgba(255, 255, 255, 0.34) inset, 0 -1px 0 rgba(0, 0, 0, 0.16) inset, 0 12px 28px rgba(46, 139, 58, 0.45);
	--btn-shadow-ghost: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 8px 18px rgba(0, 0, 0, 0.28);
}

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

html { scroll-behavior: smooth; }

body {
	margin: 0;
	min-height: 100vh;
	color: var(--text);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	background:
		radial-gradient(1200px 700px at 78% -10%, rgba(76, 175, 80, 0.09), transparent 55%),
		radial-gradient(900px 500px at 8% 12%, rgba(90, 140, 255, 0.08), transparent 50%),
		linear-gradient(180deg, #08080a 0%, var(--bg) 40%, #030304 100%);
	background-attachment: fixed;
}

body::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	opacity: 0.35;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
	background-size: 64px 64px;
	mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
code { font-family: var(--font-mono); font-size: 0.9em; color: var(--muted); }

.wrap {
	width: min(var(--max), calc(100% - 32px));
	margin: 0 auto;
	position: relative;
	z-index: 1;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 40;
	height: var(--nav-h);
	backdrop-filter: blur(16px);
	background: rgba(5, 5, 6, 0.78);
	border-bottom: 1px solid var(--line);
}

.nav {
	height: var(--nav-h);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-display);
	font-weight: 700;
	letter-spacing: -0.02em;
}

.brand-mark {
	width: 28px;
	height: 28px;
	border-radius: 8px;
	object-fit: cover;
	flex-shrink: 0;
}

.brand-wordmark {
	height: 20px;
	width: auto;
}

.brand-divider {
	width: 1px;
	height: 16px;
	background: var(--line-strong);
	margin: 0 2px;
}

.brand-sub {
	font-family: var(--font-body);
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--text);
	letter-spacing: 0.02em;
}

.nav-links {
	display: flex;
	align-items: center;
	gap: 28px;
}

.nav-links a {
	color: var(--muted);
	font-size: 0.95rem;
	transition: color 0.2s ease;
}

.nav-links a:hover { color: var(--text); }

.page-main { padding: 40px 0 24px; }

.site-footer {
	padding: 36px 0 28px;
	border-top: 1px solid var(--line);
	margin-top: 24px;
	position: relative;
	z-index: 1;
}

.footer-inner { display: flex; flex-direction: column; gap: 8px; }
.footer-logo { height: 18px; width: auto; opacity: 0.95; }
.site-footer p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.hero, .recharge-page, .pay-page, .success-page { padding: 8px 0 16px; }

.eyebrow {
	font-family: var(--font-mono);
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent-bright);
	margin: 0 0 10px;
}

h1 {
	font-family: var(--font-display);
	font-size: clamp(2rem, 4vw, 2.75rem);
	line-height: 1.15;
	letter-spacing: -0.03em;
	margin: 0 0 12px;
}

.lead, .page-head p { color: var(--muted); margin: 0 0 24px; }
.page-head h1 { margin-bottom: 8px; }
.page-head h2 {
	margin: 36px 0 14px;
	font-family: var(--font-display);
	font-size: 1.25rem;
	letter-spacing: -0.02em;
}

.balance-card {
	display: inline-flex;
	flex-direction: column;
	gap: 4px;
	padding: 18px 22px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: rgba(12, 12, 14, 0.88);
	margin: 0 0 24px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}
.balance-card span, .balance-card small { color: var(--muted); font-size: 0.85rem; }
.balance-card strong {
	font-family: var(--font-display);
	font-size: 2rem;
	letter-spacing: -0.03em;
}

.btn {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 20px;
	border-radius: 12px;
	border: 1px solid transparent;
	cursor: pointer;
	font: inherit;
	font-weight: 650;
	user-select: none;
	transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn::after {
	content: "";
	position: absolute;
	top: -45%;
	left: -35%;
	width: 40%;
	height: 190%;
	pointer-events: none;
	background: linear-gradient(105deg, transparent 28%, rgba(255, 255, 255, 0.34) 50%, transparent 72%);
	transform: translateX(-160%) skewX(-18deg);
	transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
	mix-blend-mode: soft-light;
}
.btn:hover { transform: translateY(-2px); }
.btn:hover::after { transform: translateX(340%) skewX(-18deg); }
.btn-primary {
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 38%),
		linear-gradient(180deg, var(--accent-bright) 0%, var(--accent) 48%, var(--accent-deep) 100%);
	border-color: rgba(255, 255, 255, 0.14);
	color: #04140c;
	font-weight: 750;
	box-shadow: var(--btn-shadow-primary);
}
.btn-primary:hover {
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 40%),
		linear-gradient(180deg, #74d178 0%, var(--accent-bright) 46%, #3a9f46 100%);
	box-shadow: var(--btn-shadow-primary-hover);
	filter: saturate(1.05);
}
.btn-ghost {
	background: rgba(255, 255, 255, 0.03);
	border-color: var(--line-strong);
	color: var(--text);
	box-shadow: var(--btn-shadow-ghost);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); }
.btn-block { width: 100%; }

.recharge-form, .pay-card, .success-card {
	padding: 22px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: rgba(12, 12, 14, 0.9);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.form-section { margin-bottom: 20px; }
.form-label {
	font-size: 0.9rem;
	color: var(--muted);
	margin-bottom: 10px;
	font-weight: 600;
}

.payway-grid, .amount-grid {
	display: grid;
	gap: 12px;
	margin-bottom: 4px;
}
.payway-grid { grid-template-columns: 1fr 1fr; }
.amount-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.payway-item, .amount-item {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 64px;
	padding: 12px 14px;
	border: 1px solid var(--line);
	border-radius: 12px;
	cursor: pointer;
	background: rgba(255, 255, 255, 0.02);
	user-select: none;
	transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.amount-item { min-height: 72px; }
.payway-item input, .amount-item input { position: absolute; opacity: 0; pointer-events: none; }

.payway-item.is-active, .payway-item:has(input:checked),
.amount-item.is-active, .amount-item:has(input:checked) {
	border-color: rgba(76, 175, 80, 0.7);
	box-shadow: inset 0 0 0 1px rgba(76, 175, 80, 0.45);
	background: var(--accent-dim);
}

.payway-item[data-payway="1"].is-active,
.payway-item[data-payway="1"]:has(input:checked) {
	border-color: #1677ff;
	box-shadow: inset 0 0 0 1px #1677ff;
	background: rgba(22, 119, 255, 0.12);
}
.payway-item[data-payway="3"].is-active,
.payway-item[data-payway="3"]:has(input:checked) {
	border-color: #07c160;
	box-shadow: inset 0 0 0 1px #07c160;
	background: rgba(7, 193, 96, 0.12);
}

.payway-icon {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	flex-shrink: 0;
	display: block;
	object-fit: cover;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.payway-name { font-weight: 700; font-size: 1.05rem; }
.amount-value {
	font-family: var(--font-display);
	font-size: 1.4rem;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.custom-row { margin-top: 14px; margin-bottom: 6px; }
.custom-row label { display: block; color: var(--muted); margin-bottom: 8px; font-size: 0.9rem; }
.custom-row input {
	width: 100%;
	padding: 12px 14px;
	border-radius: 10px;
	border: 1px solid var(--line);
	background: #08080a;
	color: var(--text);
	font: inherit;
}
.custom-row input:focus {
	outline: none;
	border-color: rgba(76, 175, 80, 0.55);
	box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
}

.alert {
	padding: 12px 14px;
	border-radius: 10px;
	margin-bottom: 16px;
}
.alert-error {
	background: rgba(255, 122, 122, 0.1);
	border: 1px solid rgba(255, 122, 122, 0.3);
	color: #ffb4b4;
}

.order-history { margin-top: 8px; }
.table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.92rem;
}
.table th, .table td {
	text-align: left;
	padding: 12px 8px;
	border-bottom: 1px solid var(--line);
}
.table th { color: var(--muted); font-weight: 500; }
.table a { color: var(--accent-bright); }
.table a:hover { text-decoration: underline; }
.muted { color: var(--muted); }

.status {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 0.8rem;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid var(--line);
}
.status-paid { color: var(--accent-bright); border-color: rgba(76, 175, 80, 0.35); background: var(--accent-dim); }
.status-paying, .status-pending { color: #ffd27a; border-color: rgba(240, 138, 36, 0.35); background: rgba(240, 138, 36, 0.12); }
.status-failed, .status-closed { color: var(--danger); border-color: rgba(255, 122, 122, 0.3); background: rgba(255, 122, 122, 0.1); }

.pay-card, .success-card { max-width: 420px; margin: 0 auto; text-align: center; }
.pay-amount {
	font-family: var(--font-display);
	font-size: 2.4rem;
	font-weight: 800;
	letter-spacing: -0.03em;
	margin: 0 0 8px;
}
.qr-image {
	display: block;
	margin: 18px auto;
	border-radius: 12px;
	background: #fff;
	padding: 10px;
}
.pay-status { color: var(--muted); min-height: 1.5em; }
.pay-method-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 600;
	margin: 0 0 10px;
}
.pay-method-alipay {
	color: #9ec5ff;
	background: rgba(22, 119, 255, 0.16);
	border: 1px solid rgba(22, 119, 255, 0.35);
}
.pay-method-wechat {
	color: #8dffc0;
	background: rgba(7, 193, 96, 0.16);
	border: 1px solid rgba(7, 193, 96, 0.35);
}
.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

@media (max-width: 640px) {
	.brand-wordmark { display: none; }
	.amount-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.table { display: block; overflow-x: auto; }
	.nav-links { gap: 16px; }
}
