:root {
	--bg: #0a0e14;
	--bg-card: #121820;
	--bg-card-hover: #161d28;
	--text: #eef2f7;
	--text-muted: #8b95a5;
	--accent: #22c55e;
	--accent-hover: #16a34a;
	--danger: #ef4444;
	--danger-bg: rgba(239, 68, 68, 0.12);
	--success-bg: rgba(34, 197, 94, 0.12);
	--border: rgba(255, 255, 255, 0.08);
	--radius: 16px;
	--font: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; }
body {
	font-family: var(--font);
	background: var(--bg);
	color: var(--text);
	min-height: 100vh;
	line-height: 1.5;
	padding-bottom: calc(84px + env(safe-area-inset-bottom));
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 420px; margin: 0 auto; padding: 0 20px 48px; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 20px 0 12px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; }
.logo-mark {
	width: 36px; height: 36px; border-radius: 10px;
	background: linear-gradient(135deg, #22c55e, #059669);
	display: grid; place-items: center; font-size: 1.1rem;
}
.link-muted { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; cursor: pointer; }
.link-muted:hover { color: var(--text); }
.form-footer { text-align: center; margin-top: 16px; font-size: 0.9rem; }
.hero { text-align: center; padding: 32px 0 28px; }
.hero h1 { font-size: 1.75rem; font-weight: 800; line-height: 1.2; margin-bottom: 12px; }
.hero p { color: var(--text-muted); font-size: 1rem; max-width: 320px; margin: 0 auto 28px; }
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	width: 100%; min-height: 52px; padding: 14px 20px; border: none; border-radius: 14px;
	font-family: inherit; font-size: 1rem; font-weight: 600; cursor: pointer;
	transition: transform 0.15s, background 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #041008; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--bg-card-hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-trial {
	background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
	color: #041008;
	font-size: 1.05rem;
	font-weight: 700;
	box-shadow: 0 4px 24px rgba(34, 197, 94, 0.4);
	border: 2px solid rgba(255, 255, 255, 0.12);
}
.btn-trial:hover:not(:disabled) {
	background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
	box-shadow: 0 6px 28px rgba(34, 197, 94, 0.5);
}
.btn-paid {
	border-color: rgba(255, 255, 255, 0.14);
}
.card-trial {
	border-color: rgba(34, 197, 94, 0.55);
	background: linear-gradient(180deg, rgba(34, 197, 94, 0.14), var(--bg-card));
	box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2), 0 8px 32px rgba(34, 197, 94, 0.12);
	position: relative;
}
.card-paid { border-color: var(--border); }
.plan-badge {
	display: inline-block;
	margin-bottom: 8px;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--accent);
	color: #041008;
	font-size: 0.72rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.btn-hint {
	margin-top: 12px;
	font-size: 0.8rem;
	color: var(--text-muted);
	line-height: 1.4;
}
.card-trial .btn-hint { color: rgba(238, 242, 247, 0.75); }
.features { list-style: none; margin: 28px 0 32px; display: flex; flex-direction: column; gap: 14px; }
.features li { display: flex; align-items: flex-start; gap: 12px; color: var(--text-muted); font-size: 0.92rem; }
.features li span:first-child { color: var(--accent); font-weight: 700; flex-shrink: 0; }
.download-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.download-section { margin: 32px 0 28px; }
.download-heading {
	text-align: center;
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--text-muted);
	margin-bottom: 14px;
}
.download-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}
.download-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-height: 96px;
	padding: 14px 8px;
	border-radius: 14px;
	border: 1px solid var(--border);
	background: var(--bg-card);
	transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.download-card:hover {
	background: var(--bg-card-hover);
	border-color: rgba(34, 197, 94, 0.35);
	transform: translateY(-1px);
}
.download-card:active { transform: scale(0.98); }
.download-card__icon { font-size: 1.5rem; line-height: 1; }
.download-card__title { font-size: 0.88rem; font-weight: 700; color: var(--text); }
.download-card__sub { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }
.legal-nav {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid var(--border);
}
.legal-nav a {
	font-size: 0.88rem;
	color: var(--text-muted);
	font-weight: 500;
}
.legal-nav a:hover { color: var(--accent); }
.legal-page .wrap { max-width: 640px; padding-bottom: 64px; }
.legal-body {
	text-align: left;
	color: var(--text-muted);
	font-size: 0.9rem;
	line-height: 1.65;
}
.legal-body h2 {
	color: var(--text);
	font-size: 1.05rem;
	font-weight: 700;
	margin: 28px 0 10px;
}
.legal-body h2:first-child { margin-top: 8px; }
.legal-body p { margin-bottom: 12px; }
.legal-body ul { margin: 0 0 12px 1.2rem; }
.legal-body li { margin-bottom: 6px; }
.legal-updated { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 20px; }
.card {
	background: var(--bg-card); border: 1px solid var(--border);
	border-radius: var(--radius); padding: 28px 22px; text-align: center; margin-top: 24px;
}
.card.status-active { border-color: rgba(34, 197, 94, 0.35); background: linear-gradient(180deg, var(--success-bg), var(--bg-card)); }
.card.status-expired { border-color: rgba(239, 68, 68, 0.35); background: linear-gradient(180deg, var(--danger-bg), var(--bg-card)); }
.status-dot { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; font-size: 1.5rem; }
.status-dot.ok { background: var(--success-bg); box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15); }
.status-dot.bad { background: var(--danger-bg); box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15); }
.card h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.card .meta { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 22px; }
.card .hint { color: var(--text-muted); font-size: 0.82rem; margin-top: 16px; line-height: 1.45; }
.card .btn + .btn { margin-top: 10px; }
.home-card { position: relative; }
.home-step-tag {
	display: none;
	font-size: 0.72rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--accent);
	text-align: left;
	margin: 12px 0 6px;
}
.home-card.show-download-onboard .home-step-tag { display: block; }
.home-card.show-download-onboard #btn-open-app {
	opacity: 0.72;
	border: 1px dashed rgba(34, 197, 94, 0.45);
}
.home-onboard {
	display: none;
	position: relative;
	margin: 6px 0 4px;
	padding: 8px 28px 0 8px;
}
.home-onboard.is-visible { display: block; }
.home-onboard__label {
	font-size: 0.88rem;
	font-weight: 700;
	color: var(--accent);
	text-align: center;
	line-height: 1.35;
	margin-bottom: 2px;
}
.home-onboard__arrow {
	display: block;
	width: min(220px, 88%);
	height: 56px;
	margin: 0 auto;
	color: var(--accent);
	filter: drop-shadow(0 2px 8px rgba(34, 197, 94, 0.35));
}
.home-onboard__dismiss {
	position: absolute;
	top: 0;
	right: 0;
	width: 28px;
	height: 28px;
	border: none;
	border-radius: 8px;
	background: transparent;
	color: var(--text-muted);
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
}
.home-onboard__dismiss:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.home-download-highlight {
	position: relative;
	z-index: 2;
	border-color: rgba(34, 197, 94, 0.75) !important;
	background: linear-gradient(180deg, rgba(34, 197, 94, 0.18), var(--bg-card)) !important;
	box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.35), 0 10px 32px rgba(34, 197, 94, 0.2);
	animation: home-download-pulse 1.8s ease-in-out infinite;
}
@keyframes home-download-pulse {
	0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3), 0 8px 24px rgba(34, 197, 94, 0.15); }
	50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.45), 0 12px 36px rgba(34, 197, 94, 0.28); }
}
.screen { display: none; }
.screen.active { display: block; }
.form-group { margin-bottom: 16px; text-align: left; }
.form-group label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; }
.form-group input {
	width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px;
	border: 1px solid var(--border); background: var(--bg); color: var(--text);
	font-family: inherit; font-size: 1rem;
}
.form-group input:focus { outline: none; border-color: var(--accent); }
.page-title { font-size: 1.35rem; font-weight: 700; margin-bottom: 8px; }
.page-sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 24px; }
.price-tag { font-size: 2rem; font-weight: 800; margin: 16px 0 4px; }
.price-tag small { font-size: 1rem; font-weight: 500; color: var(--text-muted); }
.footer-note { text-align: center; color: var(--text-muted); font-size: 0.75rem; margin-top: 40px; opacity: 0.7; }
.toast {
	position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
	background: var(--bg-card); border: 1px solid var(--border); padding: 12px 20px;
	border-radius: 12px; font-size: 0.9rem; z-index: 200; display: none;
}
.toast.show { display: block; }
.steps {
	list-style: none;
	counter-reset: step;
	display: flex;
	flex-direction: column;
	gap: 12px;
	text-align: left;
	margin-bottom: 20px;
	font-size: 0.92rem;
	color: var(--text-muted);
}
.steps li {
	counter-increment: step;
	padding-left: 36px;
	position: relative;
}
.steps li::before {
	content: counter(step);
	position: absolute;
	left: 0;
	top: 0;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--accent);
	color: #041008;
	font-weight: 700;
	font-size: 0.8rem;
	display: grid;
	place-items: center;
}
.token-box { margin-top: 12px; text-align: left; }
.token-box input {
	width: 100%;
	padding: 12px 14px;
	border-radius: 12px;
	border: 1px solid var(--border);
	background: var(--bg);
	color: var(--text);
	font-size: 0.75rem;
	margin-bottom: 8px;
	word-break: break-all;
}

.bottom-nav {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 160;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
	background: rgba(10, 14, 20, 0.94);
	border-top: 1px solid var(--border);
	backdrop-filter: blur(10px);
}

.bottom-nav__item {
	min-height: 42px;
	border-radius: 12px;
	border: 1px solid var(--border);
	background: var(--bg-card);
	color: var(--text-muted);
	font-family: inherit;
	font-size: 0.86rem;
	font-weight: 600;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 8px 8px;
}

.bottom-nav__item.is-active {
	color: var(--text);
	border-color: rgba(34, 197, 94, 0.5);
	background: rgba(34, 197, 94, 0.16);
}

.bottom-nav__item:active {
	transform: scale(0.98);
}

.bottom-nav__icon {
	font-size: 1rem;
	line-height: 1;
	opacity: 0.92;
}

.bottom-nav__text {
	line-height: 1;
}

@media (max-width: 360px) {
	.bottom-nav {
		gap: 6px;
		padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
	}
	.bottom-nav__item {
		min-height: 38px;
		font-size: 0.8rem;
		gap: 5px;
		border-radius: 10px;
	}
	.bottom-nav__icon {
		font-size: 0.92rem;
	}
}

@media (min-width: 960px) {
	.bottom-nav {
		left: 50%;
		right: auto;
		transform: translateX(-50%);
		width: min(420px, calc(100vw - 20px));
		border: 1px solid var(--border);
		border-bottom: none;
		border-top-left-radius: 14px;
		border-top-right-radius: 14px;
	}
}

.media-modal {
	position: fixed;
	inset: 0;
	display: none;
	z-index: 220;
}

.media-modal.show {
	display: block;
}

.media-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.72);
}

.media-modal__dialog {
	position: relative;
	width: min(92vw, 640px);
	margin: 6vh auto 0;
	background: #0b1119;
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 14px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.media-modal__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 1px solid var(--border);
	background: rgba(18, 24, 32, 0.95);
	color: var(--text);
	cursor: pointer;
}

.media-modal__video {
	width: 100%;
	max-height: 70vh;
	border-radius: 10px;
	background: #000;
	display: block;
}

.media-modal__fallback-link {
	display: inline-block;
	margin-top: 10px;
	font-size: 0.88rem;
	color: var(--accent);
	text-decoration: underline;
}

.profile-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 8px;
}

.profile-actions .btn + .btn {
	margin-top: 0;
}

.plan-pay-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 4px;
}

.plan-pay-actions .btn-usdt {
	border-color: rgba(38, 161, 123, 0.45);
}

.usdt-modal {
	position: fixed;
	inset: 0;
	display: none;
	z-index: 230;
}

.usdt-modal.show {
	display: block;
}

.usdt-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.72);
}

.usdt-modal__panel {
	position: relative;
	width: min(92vw, 480px);
	margin: 8vh auto 0;
	background: #0b1119;
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 18px 16px 20px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.usdt-modal__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 1px solid var(--border);
	background: rgba(18, 24, 32, 0.95);
	color: var(--text);
	cursor: pointer;
}

.usdt-modal__box {
	margin-top: 12px;
	padding: 12px;
	border-radius: 10px;
	border: 1px solid var(--border);
	background: rgba(255, 255, 255, 0.02);
}

.usdt-modal__wallet {
	margin-top: 6px;
	padding: 10px;
	border-radius: 8px;
	background: var(--bg);
	border: 1px dashed var(--border);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.82rem;
	word-break: break-all;
	line-height: 1.45;
}
