@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600&family=Geist+Mono:wght@400;500&display=swap');

:root {
	--bg: #0f0f0f;
	--surface: #1a1a1a;
	--surface2: #242424;
	--border: #2e2e2e;
	--border-hover: #3e3e3e;
	--text: #ededed;
	--text-muted: #888;
	--text-dim: #555;
	--accent: #7c3aed;
	--accent-light: #a78bfa;
	--accent-bg: rgba(124, 58, 237, 0.1);
	--green: #22c55e;
	--green-bg: rgba(34, 197, 94, 0.1);
	--red: #ef4444;
	--red-bg: rgba(239, 68, 68, 0.1);
	--yellow: #f59e0b;
	--yellow-bg: rgba(245, 158, 11, 0.1);
	--radius: 8px;
	--radius-lg: 12px;
}

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

body {
	background: var(--bg);
	color: var(--text);
	font-family: 'Geist', sans-serif;
	font-size: 14px;
	min-height: 100vh;
}

nav {
	border-bottom: 1px solid var(--border);
	padding: 0 32px;
	display: flex;
	align-items: center;
	gap: 4px;
	background: var(--bg);
	position: sticky;
	top: 0;
	z-index: 10;
}

.nav-logo {
	font-size: 15px;
	font-weight: 600;
	color: var(--text);
	padding: 14px 0;
	margin-right: 16px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.nav-logo .logo-icon {
	width: 24px;
	height: 24px;
	background: var(--accent);
	border-radius: 6px;
	font-size: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
}

nav a {
	color: var(--text-muted);
	text-decoration: none;
	padding: 14px 12px;
	font-size: 13px;
	border-bottom: 2px solid transparent;
	transition: all 0.15s;
}

nav a:hover { color: var(--text); }
nav a.active {
	color: var(--text);
	border-bottom-color: var(--accent-light);
}

main {
	max-width: 900px;
	margin: 0 auto;
	padding: 48px 32px;
}

.page-header {
	margin-bottom: 48px;
}

.page-header h1 {
	font-size: 28px;
	font-weight: 600;
	letter-spacing: -0.5px;
	margin-bottom: 8px;
}

.page-header p {
	color: var(--text-muted);
	font-size: 15px;
	line-height: 1.6;
}

.badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 8px;
	border-radius: 99px;
	font-size: 11px;
	font-weight: 500;
	background: var(--accent-bg);
	color: var(--accent-light);
	border: 1px solid rgba(124, 58, 237, 0.2);
	margin-bottom: 12px;
}

.section {
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background: var(--surface);
	margin-bottom: 24px;
	overflow: hidden;
}

.section-header {
	padding: 20px 24px 16px;
	border-bottom: 1px solid var(--border);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.section-title {
	font-size: 14px;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 8px;
}

.section-title .icon {
	width: 20px;
	height: 20px;
	border-radius: 5px;
	background: var(--accent-bg);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
}

.section-desc {
	font-size: 12px;
	color: var(--text-muted);
	margin-top: 2px;
}

.section-body {
	padding: 24px;
}

/* === Inputs & Buttons === */
input[type="text"],
input[type="number"] {
	background: var(--surface2);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--text);
	padding: 8px 12px;
	font-size: 13px;
	font-family: 'Geist', sans-serif;
	width: 100%;
	max-width: 280px;
	transition: border-color 0.15s, box-shadow 0.15s;
	outline: none;
}

input[type="text"]:focus,
input[type="number"]:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-bg);
}

button {
	background: var(--accent);
	color: white;
	border: none;
	border-radius: var(--radius);
	padding: 8px 16px;
	font-size: 13px;
	font-family: 'Geist', sans-serif;
	font-weight: 500;
	cursor: pointer;
	transition: opacity 0.15s;
}

button:hover { opacity: 0.85; }

button.secondary {
	background: var(--surface2);
	color: var(--text);
	border: 1px solid var(--border);
}

button.secondary:hover { border-color: var(--border-hover); }

button.hint-btn {
	background: var(--surface2);
	color: var(--text-muted);
	border: 1px solid var(--border);
	padding: 6px 10px;
	font-size: 11px;
}

.input-row {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}

label {
	font-size: 12px;
	color: var(--text-muted);
	margin-bottom: 4px;
	display: block;
}

.output {
	margin-top: 16px;
	padding: 14px 16px;
	border-radius: var(--radius);
	background: var(--surface2);
	border: 1px solid var(--border);
	font-size: 13px;
	color: var(--text);
	line-height: 1.7;
	min-height: 44px;
}

.output:empty { display: none; }

.output.success {
	background: var(--green-bg);
	border-color: rgba(34, 197, 94, 0.2);
	color: var(--green);
}

.output.error {
	background: var(--red-bg);
	border-color: rgba(239, 68, 68, 0.2);
	color: var(--red);
}

.output.info {
	background: var(--accent-bg);
	border-color: rgba(124, 58, 237, 0.2);
	color: var(--accent-light);
}

.output.mono {
	font-family: 'Geist Mono', monospace;
	font-size: 12px;
	white-space: pre-wrap;
	line-height: 1.6;
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	margin-bottom: 20px;
}

.stat-card {
	background: var(--surface2);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 16px;
}

.stat-label {
	font-size: 11px;
	color: var(--text-dim);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 6px;
}

.stat-value {
	font-size: 22px;
	font-weight: 600;
	font-family: 'Geist Mono', monospace;
}

.progress-track {
	height: 8px;
	background: var(--surface2);
	border-radius: 99px;
	overflow: hidden;
	margin: 8px 0;
}

.progress-fill {
	height: 100%;
	border-radius: 99px;
	background: var(--accent);
	transition: width 0.4s ease;
}

.quiz-question {
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--border);
}

.quiz-question:last-of-type { border-bottom: none; margin-bottom: 16px; }

.quiz-q {
	font-weight: 500;
	margin-bottom: 8px;
}

.quiz-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.quiz-row input { max-width: 300px; }

.hint-text {
	display: none;
	font-size: 12px;
	color: var(--yellow);
	background: var(--yellow-bg);
	border: 1px solid rgba(245,158,11,0.2);
	border-radius: var(--radius);
	padding: 8px 12px;
	margin-top: 8px;
}
