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

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

:root {
	--bg-dark: #1D1225;
	--bg-header: #150d1a;
	--text-primary: #c579ff;
	--text-secondary: #DEB3FF;
	--text-hover: #f1deff;
	--text-muted: #8a6b99;
	--divider: #4a3258;
}

body {
	background: var(--bg-dark);
	color: var(--text-primary);
	font-family: 'Space Mono', monospace;
	font-size: 16px;
	line-height: 1.6;
	min-height: 100vh;
}

canvas {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	pointer-events: none;
}

.container {
	position: relative;
	z-index: 1;
	max-width: 800px;
	margin: 0 auto;
	padding: 2rem;
	background: rgba(29, 18, 37, 0.85);
	min-height: 100vh;
	backdrop-filter: blur(2px);
}

header {
	text-align: center;
	padding: 2rem 0;
	margin-bottom: 2rem;
	background: var(--bg-header);
	border-radius: 4px;
}

h1 {
	font-size: 2.5rem;
	font-weight: normal;
	letter-spacing: 0.2em;
	margin-bottom: 1rem;
	text-shadow: 0 0 20px rgba(197, 121, 255, 0.5);
}

nav {
	display: flex;
	justify-content: center;
	gap: 2rem;
}

nav a {
	color: var(--text-muted);
	text-decoration: none;
	padding: 0.5rem 1rem;
	transition: color 0.2s, text-shadow 0.2s;
}

nav a:hover,
nav a.active {
	color: var(--text-hover);
	text-shadow: 0 0 10px rgba(197, 121, 255, 0.5);
}

main {
	padding: 1rem 0;
}

section {
	margin-bottom: 2rem;
}

h2, h3 {
	font-weight: normal;
	margin-bottom: 1rem;
	color: var(--text-secondary);
}

h2 {
	font-size: 1.4rem;
}

h3 {
	font-size: 1.1rem;
	color: var(--text-muted);
}

pre {
	white-space: pre-wrap;
	font-family: inherit;
	font-size: 0.95rem;
	line-height: 1.8;
}

a {
	color: var(--text-primary);
	text-decoration: none;
	transition: color 0.2s;
}

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

.divider {
	color: var(--divider);
	text-align: center;
	margin: 2rem 0;
	font-size: 0.8rem;
	opacity: 0.7;
}

.hidden {
	color: var(--bg-dark);
	background: var(--bg-dark);
	transition: color 0.3s, background 0.3s;
	cursor: help;
	padding: 0 0.25rem;
}

.hidden:hover {
	color: var(--text-hover);
	background: transparent;
}

.color-sample {
	padding: 0 0.5rem;
}

.color-sample.purple {
	background: linear-gradient(90deg, #9b59b6, #c579ff);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

footer {
	text-align: center;
	padding: 2rem 0;
	margin-top: 2rem;
	color: var(--text-muted);
	font-size: 0.85rem;
	border-top: 1px solid var(--divider);
}

::selection {
	background: var(--text-primary);
	color: var(--bg-dark);
}

@media (max-width: 600px) {
	body {
		font-size: 14px;
	}

	.container {
		padding: 1rem;
	}

	header {
		padding: 1.5rem 1rem;
	}

	h1 {
		font-size: 1.6rem;
		letter-spacing: 0.1em;
		margin-bottom: 0.75rem;
	}

	h2 {
		font-size: 1.2rem;
	}

	nav {
		flex-wrap: wrap;
		gap: 0.5rem 1rem;
	}

	nav a {
		padding: 0.4rem 0.6rem;
		font-size: 0.85rem;
	}

	pre {
		font-size: 0.85rem;
		line-height: 1.6;
		overflow-x: auto;
	}

	.divider {
		font-size: 0.5rem;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	section {
		margin-bottom: 1.5rem;
	}

	footer {
		padding: 1.5rem 0;
		margin-top: 1.5rem;
		font-size: 0.8rem;
	}
}

@media (max-width: 400px) {
	h1 {
		font-size: 1.4rem;
	}

	nav {
		gap: 0.4rem 0.8rem;
	}

	nav a {
		padding: 0.3rem 0.5rem;
		font-size: 0.8rem;
	}

	pre {
		font-size: 0.8rem;
	}
}
