* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

:root {
	--bg: #0a0a0f;
	--bg-card: #111118;
	--border: rgba(255,255,255,0.08);
	--text: #f0f0f5;
	--text-muted: #7a7a8c;
	--text-dim: #4a4a5a;
	--accent-blue: #378ADD;
	--accent-teal: #1D9E75;
	--highlight: #85B7EB;
	--radius: 12px;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	background: var(--bg);
	color: var(--text);
	line-height: 1.6;
}

/* Navbar */
.navbar {
	background: var(--bg-card);
	border-bottom: 0.5px solid var(--border);
	color: var(--text);
	padding: 16px 24px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-weight: 600;
	font-size: 14px;
}

.navbar h2 {
	font-size: 14px;
	font-weight: 600;
	color: var(--text-muted);
}

.navbar a {
	color: var(--text-muted);
	text-decoration: none;
	margin: 0 10px;
	font-size: 13px;
}

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

/* Layout */
.layout {
	display: flex;
	justify-content: flex-start;
}

/* Main content */
.content {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	background: var(--bg);
}

.content__description-container {
	max-width: 860px;
	width: 100%;
	margin: 0 auto;
	padding: 48px 24px;
}

.content__title {
	font-size: clamp(20px, 3vw, 28px);
	font-weight: 600;
	letter-spacing: -0.3px;
	margin-bottom: 16px;
	color: var(--text);
}

.content__paragraph {
	font-size: 15px;
	color: var(--text-muted);
	margin: 0 0 24px;
	line-height: 1.65;
}

.content__list {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: var(--bg-card);
	border: 0.5px solid var(--border);
	border-radius: var(--radius);
	padding: 20px 24px;
	margin-bottom: 40px;
}

.content__list-item {
	font-size: 13px;
	color: var(--text-muted);
	line-height: 1.6;
	padding-left: 12px;
	border-left: 2px solid rgba(255,255,255,0.06);
}

.content__list-item--strong {
	font-weight: 600;
	color: var(--text);
	border-left-color: var(--accent-teal);
}

.content__list-item--margin {
	margin-left: 16px;
}

.content__list-item--highlight {
	font-family: 'SF Mono', 'Fira Code', monospace;
	font-size: 11.5px;
	background: rgba(55,138,221,0.1);
	color: var(--highlight);
	padding: 1px 6px;
	border-radius: 4px;
	font-weight: 500;
}

.content__list-item--error {
	font-family: 'SF Mono', 'Fira Code', monospace;
	font-size: 11.5px;
	background: rgba(224,108,117,0.1);
	color: #e06c75;
	padding: 1px 6px;
	border-radius: 4px;
	font-weight: 500;
}

/* Button */
.content__cta-container {
	display: flex;
	justify-content: center;
	margin: 40px 0;
}

.content__cta--button {
	min-width: 215px;
	min-height: 52px;
	position: relative;
	padding: 0 32px;
	font-size: 15px;
	font-weight: 500;
	font-family: inherit;
	color: #5DCAA5;
	background: rgba(29,158,117,0.12);
	border: 0.5px solid rgba(29,158,117,0.3);
	border-radius: 26px;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
}

.content__cta--button:not(:disabled):hover {
	background: rgba(29,158,117,0.2);
	border-color: rgba(29,158,117,0.5);
}

.content__cta--button:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.content__cta--button:active {
	transform: scale(0.98);
}

.nofill {
	color: var(--text-dim);
	background: rgba(255,255,255,0.04);
	border-color: rgba(255,255,255,0.08);
}

.content__cta--loading::after {
	content: "";
	position: absolute;
	width: 16px;
	height: 16px;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	margin: auto;
	border: 3px solid transparent;
	border-top-color: #5DCAA5;
	border-radius: 50%;
	animation: button-loading-spinner 1s ease infinite;
}

@keyframes button-loading-spinner {
	from { transform: rotate(0turn); }
	to   { transform: rotate(1turn); }
}

.content__cta--loading .content__cta--text {
	visibility: hidden;
	opacity: 0;
}

pre:not(.code-block) {
	display: none;
}

/* Code section */
.code-section {
	margin-top: 32px;
	border: 0.5px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
}

.code-section__header {
	padding: 10px 16px;
	border-bottom: 0.5px solid var(--border);
	background: var(--bg-card);
}

.code-section__title {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: var(--text-dim);
}

.code-block__label {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.5px;
	color: var(--text-dim);
	padding: 10px 16px 6px;
	background: var(--bg-card);
	border-top: 0.5px solid var(--border);
}

.code-section > .code-block__label:first-of-type {
	border-top: none;
}

.code-block {
	margin: 0;
	padding: 14px 18px;
	background: #0d0d14;
	font-family: 'SF Mono', 'Fira Code', monospace;
	font-size: 12px;
	line-height: 1.75;
	color: #abb2bf;
	overflow-x: auto;
	white-space: pre;
}

.hl-comment { color: #4a5568; font-style: italic; }
.hl-str     { color: #98c379; }
.hl-kw      { color: #85B7EB; }
.hl-fn      { color: #5DCAA5; }
.hl-bool    { color: #c792ea; }
.hl-num     { color: #f78c6c; }

/* Notice block */
.content__notice {
	margin-top: 16px;
	padding: 14px 18px;
	background: rgba(249,168,38,0.06);
	border-left: 3px solid rgba(249,168,38,0.4);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	font-size: 13px;
	color: var(--text-muted);
	line-height: 1.65;
}

.content__notice strong {
	color: #FAC775;
	font-weight: 600;
}

/* Event log */
.event-log {
	margin-top: 32px;
	background: var(--bg-card);
	border: 0.5px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
}

.event-log__header {
	padding: 10px 16px;
	border-bottom: 0.5px solid var(--border);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.event-log__title {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: var(--text-dim);
}

.event-log__clear {
	font-family: inherit;
	font-size: 11px;
	color: var(--text-dim);
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
}

.event-log__clear:hover { color: var(--text-muted); }

.event-log__list {
	list-style: none;
	min-height: 80px;
	max-height: 200px;
	overflow-y: auto;
	padding: 4px 0;
	font-family: 'SF Mono', 'Fira Code', monospace;
}

.event-log__empty {
	padding: 20px 16px;
	font-size: 12px;
	color: var(--text-dim);
}

.event-log__entry {
	display: flex;
	gap: 12px;
	padding: 5px 16px;
	border-bottom: 0.5px solid rgba(255,255,255,0.03);
	font-size: 11.5px;
}

.event-log__entry:last-child { border-bottom: none; }

.event-log__time { color: var(--text-dim); flex-shrink: 0; }
.event-log__name { flex-shrink: 0; }
.event-log__desc { color: var(--text-dim); font-size: 11px; }

.event-log__name.green  { color: #5DCAA5; }
.event-log__name.amber  { color: #FAC775; }
.event-log__name.blue   { color: #85B7EB; }
.event-log__name.gray   { color: #7a7a8c; }
.event-log__name.red    { color: #e06c75; }

/* Reward counter */
#reward-counter {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin: 32px auto 0;
	width: fit-content;
}

.counter-label {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--text-dim);
}

.counter-value {
	font-size: 64px;
	font-weight: 700;
	letter-spacing: -2px;
	color: var(--text-dim);
	line-height: 1;
	transition: color 0.3s ease;
}

.counter-value.counter-pop {
	color: #5DCAA5;
	animation: pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pop {
	0%   { transform: scale(1); }
	40%  { transform: scale(1.4); }
	100% { transform: scale(1); }
}

/* No-fill modal */
#nofill-modal {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	animation: fade-in 0.15s ease;
}

@keyframes fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.modal-box {
	background: #16161f;
	border: 0.5px solid rgba(255,255,255,0.12);
	border-radius: var(--radius);
	padding: 28px 32px;
	max-width: 340px;
	width: 90%;
	text-align: center;
	animation: slide-up 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slide-up {
	from { transform: translateY(12px); opacity: 0; }
	to   { transform: translateY(0);    opacity: 1; }
}

.modal-title {
	font-size: 16px;
	font-weight: 600;
	color: var(--text);
	margin-bottom: 10px;
}

.modal-body {
	font-size: 13px;
	color: var(--text-muted);
	line-height: 1.65;
	margin-bottom: 24px;
}

.modal-close {
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	color: var(--text-muted);
	background: rgba(255,255,255,0.06);
	border: 0.5px solid rgba(255,255,255,0.1);
	border-radius: 20px;
	padding: 8px 24px;
	cursor: pointer;
	transition: background 0.15s;
}

.modal-close:hover {
	background: rgba(255,255,255,0.1);
	color: var(--text);
}

/* Reward message */
#rv-message {
	margin-top: 24px;
	padding: 14px 20px;
	background: rgba(29,158,117,0.08);
	border: 0.5px solid rgba(29,158,117,0.25);
	border-radius: var(--radius);
	font-size: 13px;
	color: #5DCAA5;
	text-align: center;
}
