:root {
	--bg: #07060a;
	--text: #f6f1ea;
	--muted: rgba(255, 255, 255, 0.58);
	--line: rgba(255, 140, 60, 0.22);
	--card: rgba(10, 9, 12, 0.78);
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	min-height: 100%;
	background:
		radial-gradient(circle at 12% -10%, rgba(255, 92, 24, 0.2), transparent 34%),
		radial-gradient(circle at 92% 8%, rgba(92, 48, 255, 0.16), transparent 28%),
		radial-gradient(circle at 70% 110%, rgba(255, 60, 80, 0.08), transparent 32%),
		#07060a;
	color: var(--text);
	font-family: Inter, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
	padding: 22px 20px 72px;
}

body::before {
	content: '';
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	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(circle at 50% 20%, #000 20%, transparent 78%);
}

body > * {
	position: relative;
	z-index: 1;
}

.nav {
	max-width: 1180px;
	margin: 0 auto 32px;
	display: flex;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	align-items: center;
}

.brand {
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	font-size: 13px;
	color: #ffb07a;
	text-decoration: none;
}

.links {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.links a,
.links button {
	color: var(--text);
	text-decoration: none;
	font-size: 13px;
	padding: 8px 13px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.03);
	font: inherit;
	cursor: pointer;
	transition:
		border-color 0.18s ease,
		background 0.18s ease;
}

.links a:hover,
.links button:hover {
	border-color: rgba(255, 160, 80, 0.55);
	background: rgba(255, 120, 30, 0.1);
}

.links a.is-current {
	background: rgba(255, 140, 60, 0.16);
	border-color: rgba(255, 140, 60, 0.45);
	color: #ffd2ad;
}

.hero {
	max-width: 1180px;
	margin: 0 auto 48px;
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
	gap: 40px 48px;
	align-items: end;
}

.kicker {
	display: inline-flex;
	margin-bottom: 16px;
	padding: 6px 11px;
	border-radius: 999px;
	border: 1px solid rgba(255, 140, 60, 0.28);
	color: #ffc49a;
	font-size: 11px;
	letter-spacing: 1.6px;
	text-transform: uppercase;
}

h1 {
	margin: 0 0 16px;
	font-size: clamp(48px, 8vw, 92px);
	line-height: 0.9;
	letter-spacing: -0.07em;
	background: linear-gradient(180deg, #fff 0%, #ffd2ad 42%, #ff7a32 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.lead {
	max-width: 640px;
	color: var(--muted);
	line-height: 1.8;
	font-size: 16px;
}

.stats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 22px;
}

.stat {
	padding: 8px 12px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(255, 255, 255, 0.03);
	color: #ffd2ad;
	font-size: 12px;
	letter-spacing: 0.04em;
}

.install {
	display: inline-flex;
	margin-top: 22px;
	padding: 12px 16px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid var(--line);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 14px;
}

.hero-aside {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.usage {
	padding: 18px 18px 16px;
	border-radius: 18px;
	background: linear-gradient(180deg, rgba(18, 12, 12, 0.88), rgba(6, 6, 8, 0.92));
	border: 1px solid var(--line);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
	overflow-x: auto;
}

.usage pre {
	margin: 0;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 13px;
	line-height: 1.7;
	color: #ffd2ad;
}

.copy-hint {
	margin: 0;
	max-width: 680px;
	color: var(--muted);
	line-height: 1.7;
	font-size: 13px;
}

.section-head {
	max-width: 1180px;
	margin: 0 auto 18px;
	display: flex;
	justify-content: space-between;
	align-items: end;
	gap: 16px;
}

.section-head h2 {
	margin: 0;
	font-size: 22px;
	letter-spacing: -0.03em;
}

.section-head p {
	margin: 0;
	color: var(--muted);
	font-size: 13px;
}

.gallery {
	max-width: 1180px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.demo-card {
	--accent: #ff8a3d;
	display: flex;
	flex-direction: column;
	min-height: 248px;
	padding: 24px 22px 22px;
	border-radius: 24px;
	text-decoration: none;
	color: inherit;
	background:
		linear-gradient(180deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent 42%),
		var(--card);
	border: 1px solid rgba(255, 255, 255, 0.07);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
	transition:
		border-color 0.2s ease,
		transform 0.2s ease,
		box-shadow 0.2s ease;
}

.demo-card:hover {
	border-color: color-mix(in srgb, var(--accent) 55%, transparent);
	transform: translateY(-3px);
	box-shadow:
		0 16px 40px rgba(0, 0, 0, 0.28),
		0 0 32px color-mix(in srgb, var(--accent) 18%, transparent);
}

.demo-card[data-accent='glow'] {
	--accent: #6ea8ff;
}
.demo-card[data-accent='border'] {
	--accent: #6ce0ff;
}
.demo-card[data-accent='fire'] {
	--accent: #ff7a32;
}
.demo-card[data-accent='burning'] {
	--accent: #ff4d1a;
}
.demo-card[data-accent='shape'] {
	--accent: #7b9cff;
}
.demo-card[data-accent='water'] {
	--accent: #4fd2ff;
}
.demo-card[data-accent='cultivation'] {
	--accent: #ffc857;
}
.demo-card[data-accent='demonic'] {
	--accent: #c86bff;
}
.demo-card[data-accent='thunder'] {
	--accent: #b9a6ff;
}
.demo-card[data-accent='void'] {
	--accent: #9b6bff;
}
.demo-card[data-accent='glitch'] {
	--accent: #ff3d7a;
}

.tag {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	padding: 6px 10px;
	border-radius: 999px;
	border: 1px solid color-mix(in srgb, var(--accent, #ffae73) 40%, transparent);
	color: var(--accent, #ffae73);
	font-size: 11px;
	letter-spacing: 1.4px;
	text-transform: uppercase;
}

.demo-card h2,
.demo-head h1 {
	margin: 16px 0 8px;
	font-size: 26px;
	letter-spacing: -0.04em;
}

.demo-card p,
.demo-head p,
.demo-intro p {
	margin: 0;
	color: var(--muted);
	line-height: 1.7;
	font-size: 14px;
}

.demo-card code {
	display: inline-flex;
	margin-top: 18px;
	color: #ffcda6;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 12px;
}

.demo-card .open {
	margin-top: auto;
	padding-top: 20px;
	color: var(--accent, #ffae73);
	font-size: 13px;
}

.demo-wrap {
	max-width: 1180px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.demo-head {
	max-width: 720px;
}

.demo-head h1 {
	margin: 10px 0 8px;
	font-size: clamp(36px, 6vw, 56px);
}

.figure-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.figure-grid.is-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.figure-hero {
	grid-column: 1 / -1;
}

.figure-stage {
	position: relative;
	min-height: 280px;
	display: grid;
	place-items: center;
	padding: 40px 24px;
	overflow: hidden;
	border-radius: 24px;
	background: rgba(8, 8, 10, 0.72);
	border: 1px solid rgba(255, 255, 255, 0.06);
}

.figure-hero.figure-stage,
.figure-hero .figure-stage {
	min-height: min(64vh, 620px);
	padding: 56px 32px;
}

.figure {
	position: relative;
	z-index: 30;
	display: grid;
	place-items: center;
	text-align: center;
	color: #f4ece4;
	background: linear-gradient(180deg, rgba(18, 12, 12, 0.94), rgba(8, 8, 9, 0.96));
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.figure-label {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.figure.is-card {
	width: min(100%, 420px);
	min-height: 168px;
	padding: 22px 24px;
	border-radius: 22px;
}

.figure.is-pill {
	min-width: 220px;
	height: 68px;
	padding: 0 28px;
	border-radius: 999px;
}

.figure.is-circle {
	width: 148px;
	height: 148px;
	border-radius: 50%;
	font-size: 18px;
	font-weight: 700;
}

.figure.is-hex {
	width: 168px;
	height: 154px;
	clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%);
	font-weight: 700;
	letter-spacing: 0.08em;
}

.figure.is-diamond {
	width: 150px;
	height: 150px;
	clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0 50%);
	font-weight: 700;
}

.figure.is-shield {
	width: 150px;
	height: 170px;
	clip-path: polygon(50% 0%, 92% 18%, 92% 62%, 50% 100%, 8% 62%, 8% 18%);
	font-weight: 700;
	font-size: 28px;
}

.figure.is-light {
	background: linear-gradient(180deg, #f7f3ee, #ece4d8);
	color: #2a2118;
	border-color: rgba(80, 50, 20, 0.12);
}

.stage {
	position: relative;
	min-height: min(68vh, 640px);
	padding: 28px 20px 32px;
	overflow: hidden;
	border-radius: 28px;
	background: rgba(8, 8, 10, 0.72);
	border: 1px solid rgba(255, 255, 255, 0.06);
}

.demo-intro {
	position: relative;
	z-index: 30;
	max-width: 520px;
	margin-bottom: 28px;
}

.card {
	position: relative;
	z-index: 30;
	min-height: 280px;
	padding: 28px 24px;
	border-radius: 22px;
	background: linear-gradient(180deg, rgba(18, 12, 12, 0.94), rgba(8, 8, 9, 0.96));
	border: 1px solid rgba(255, 120, 30, 0.45);
	box-shadow: 0 0 24px rgba(255, 80, 20, 0.12);
}

.card h2 {
	margin: 18px 0 8px;
	font-size: 28px;
}

.card p {
	margin: 0;
	color: var(--muted);
	line-height: 1.7;
	font-size: 14px;
}

.card code {
	display: inline-flex;
	margin-top: 22px;
	color: #ffcda6;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 12px;
}

.prompt-block {
	position: relative;
	z-index: 3;
	border-radius: 14px;
	border: 1px solid var(--line);
	background: rgba(0, 0, 0, 0.32);
	overflow: hidden;
}

.prompt-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	padding: 8px 12px;
	border-bottom: 1px solid var(--line);
}

.prompt-head strong {
	color: #ffd2ad;
	font-size: 12px;
	font-weight: 600;
}

.prompt-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.prompt-reset {
	padding: 7px 12px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: transparent;
	color: var(--muted);
	font: inherit;
	font-size: 12px;
	cursor: pointer;
}

.prompt-reset:hover {
	color: #ffd2ad;
	border-color: var(--line);
}

.prompt-block textarea {
	display: block;
	box-sizing: border-box;
	width: 100%;
	min-height: 180px;
	max-height: 360px;
	margin: 0;
	padding: 12px 14px 14px;
	border: 0;
	background: transparent;
	color: #e8d5c4;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 12px;
	line-height: 1.65;
	resize: vertical;
	outline: none;
}

.copy-prompt {
	display: inline-flex;
	align-items: center;
	padding: 7px 12px;
	border-radius: 999px;
	border: 1px solid rgba(255, 140, 60, 0.38);
	background: rgba(255, 120, 30, 0.1);
	color: #ffd2ad;
	font: inherit;
	font-size: 12px;
	cursor: pointer;
	white-space: nowrap;
}

.copy-prompt svg {
	width: 13px;
	height: 13px;
	margin-right: 6px;
}

.copy-prompt:hover {
	background: rgba(255, 120, 30, 0.18);
}

.copy-prompt.is-copied {
	border-color: rgba(120, 220, 140, 0.45);
	color: #b8f0c4;
}

.copy-prompt.is-copied svg {
	display: none;
}

.copy-prompt.is-copied::before {
	content: '✓';
	margin-right: 6px;
}

@media (max-width: 1080px) {
	.gallery,
	.figure-grid.is-3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 860px) {
	.hero {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 720px) {
	.gallery,
	.figure-grid,
	.figure-grid.is-3 {
		grid-template-columns: 1fr;
	}
}
