<script lang="ts">
	import favicon from '$lib/assets/favicon.svg';

	let { children } = $props();
</script>

<svelte:head>
	<link rel="icon" href={favicon} />
</svelte:head>

<nav>
	<h1><a href="/">On the Spectrum</a></h1>
	<ul>
		<li><a href="play">Play</a></li>
		<li><a href="rules">Rules</a></li>
		<li><a href="submit">Submit</a></li>
	</ul>
</nav>

<section>
	{@render children()}
</section>

<style>
	@import '$lib/styles/cyberpunk.css';
	@import '$lib/styles/nightmare.css';
	@import '$lib/styles/nintendo.css';
	@import '$lib/styles/typewriter.css';
	@import '$lib/styles/vaporwave.css';
	@import '$lib/styles/win95.css';

	:global(body) {
		margin: 0;
		padding: 0;
	}

	:global(.container) {
		padding: 20px;
		min-height: 100vh;
	}

	:global(.window) {
		max-width: 800px;
		margin: 0 auto;
	}

	:global(.window-body) {
		padding: 20px;
	}

	:global(fieldset) {
		padding: 15px;
		margin: 15px 0;
	}

	:global(legend) {
		font-weight: bold;
		padding: 0 5px;
	}

	:global(.button-row) {
		display: flex;
		gap: 10px;
		justify-content: center;
		margin-top: 10px;
	}

	:global(button) {
		padding: 8px 24px;
		cursor: pointer;
		font-weight: bold;
	}

	nav {
		display: inline-flex;
		a {
			text-decoration: none;
			color: black;
			font-weight: 600;
			&:hover {
				color: oklch(0.6 0.186 25);
			}
		}
		ul {
			list-style: none;
			padding: none;
			display: inline-flex;
			gap: 1rem;
			align-items: end;
			font-size: 1.25rem;
		}
	}
	section {
		display: flex;
		flex-direction: column;
	}
</style>
