@import url('/tokens.css');

/* A standalone surface: it loads no nav and no /style.css, so before this import
   it resolved none of the platform vocabulary and had forked its own
   --panel/--text palette. Importing the token sheet also brings the platform
   floors (focus ring, disabled affordance, reduced motion) to this page. */

[hidden] {
	display: none !important;
}

/* Dark-only theme layer. This page has no theme switcher, so it pins the
   canonical primitives to their dark values (the [data-theme='light'] half of
   the selector keeps a globally-chosen light theme from half-flipping a surface
   whose remaining literals are dark) and then aliases its local names to them,
   rather than forking a second palette (B02). */
:root,
/* Doubled :root is a deliberate specificity bump (0,3,0): the token sheet's own
   [data-theme='light'] block would otherwise win on document order and half-flip
   this dark-only surface. */
:root:root[data-theme='light'] {
	color-scheme: dark;
	--accent: #ffffff;
	--bg-0: #0a0a0a;
	--bg-1: #1a1a1a;
	--ink: #e8e8e8;
	--ink-dim: #888888;

	--border: var(--bg-1);
	--bg: #000000;
	--panel: var(--bg-0);
	--text: var(--ink);
	--text-dim: #555555;
	--radius: var(--radius-lg);
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font:
		15px/1.6 -apple-system,
		system-ui,
		Segoe UI,
		Roboto,
		sans-serif;
	min-height: 100vh;
	overflow-x: hidden;
}

header {
	display: flex;
	align-items: center;
	padding: 18px 32px;
	border-bottom: 1px solid var(--border);
	position: sticky;
	top: 0;
	background: rgba(8, 8, 20, 0.85);
	z-index: 10;
}

.logo {
	font-size: 17px;
	font-weight: 700;
	letter-spacing: -0.3px;
	color: var(--accent);
}

.header-logo {
	width: 20px;
	height: 20px;
	vertical-align: middle;
	margin-right: 6px;
}

main {
	display: grid;
	grid-template-columns: 1fr 440px;
	min-height: calc(100vh - 57px);
}

.agent-wrap {
	position: relative;
	background: radial-gradient(ellipse 80% 70% at 50% 40%, var(--bg-1) 0%, var(--bg) 75%);
}

agent-3d {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 520px;
}

.claim-panel {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 56px 40px;
	border-left: 1px solid var(--border);
	background: var(--panel);
	gap: 0;
}

h1 {
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 36px;
	letter-spacing: -0.5px;
}

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

.step.hidden {
	display: none;
}

.btn-primary {
	padding: 14px 28px;
	background: var(--accent);
	color: #000;
	border: none;
	border-radius: var(--radius);
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: opacity var(--duration-fast);
	align-self: flex-start;
}

.btn-primary:hover:not(:disabled) {
	opacity: 0.85;
}

.btn-primary:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.btn-secondary {
	padding: 12px 22px;
	background: transparent;
	color: var(--text);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	font-size: 14px;
	cursor: pointer;
	align-self: flex-start;
	transition: border-color var(--duration-fast);
}

.btn-secondary:hover {
	border-color: #44445a;
}

.wallet-addr {
	font-size: 12px;
	color: var(--text-dim);
	font-family: ui-monospace, 'Cascadia Code', 'Courier New', monospace;
	margin: 0;
	word-break: break-all;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 8px 12px;
}

.success-msg {
	font-size: 16px;
	margin: 0;
	color: #7ee787;
	line-height: 1.5;
}

.snippet-wrap {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 4px;
}

pre {
	margin: 0;
	padding: 10px 12px;
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid var(--border);
	border-radius: 8px;
	font-size: 11px;
	line-height: 1.5;
	color: #cccccc;
	overflow-x: auto;
	white-space: pre-wrap;
	word-break: break-all;
	font-family: ui-monospace, 'Cascadia Code', 'Courier New', monospace;
}

.error-msg {
	color: var(--danger);
	margin: 0;
	font-size: 14px;
}

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

	.claim-panel {
		border-left: none;
		border-top: 1px solid var(--border);
		padding: 40px 24px;
	}

	agent-3d {
		min-height: 300px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.btn-primary,
	.btn-secondary {
		transition: none;
	}
}
