@font-face {
	font-family: departure;
	src: url('/assets/DepartureMono-Regular.otf');
	font-display: swap;
}

:root {
	--page-bg: #1a0f1f;
	--page-tile: url('/icons/tile4.png');
	--page-tile-opacity: 0.22;
	--panel-bg: #f4edf7;
	--dark: #2d1f33;
	--shadow: #000000;
	--light: #ffffff;
	--button-bg: #f2c5d2;
	--button-highlight: #ffffff;
	--button-inset: #ffffff;
	--link: #942f4a;
	--link-hover: #b13658;
}

html, body {
	margin: 0;
	padding: 0;
}

body {
	background-color: var(--page-bg);
	height: 100%;
	width: 100%;
	position: relative;
	cursor: url('cursors/arrow.png') 0 0, auto;
}

body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 0;
	background-image: var(--page-tile);
	background-repeat: repeat;
	background-size: 128px 128px;
	image-rendering: pixelated;
	opacity: var(--page-tile-opacity);
	pointer-events: none;
}

.content {
	position: relative;
	z-index: 1;
	line-height: calc(1ex / 0.32);
	margin: 16px auto;
	padding: 16px 32px;
	font-family: departure;
	font-size: 16px;
	background-color: var(--panel-bg);
	max-width: 1028px;
	box-sizing: border-box;
	border: 2px solid var(--dark);
	box-shadow:
		inset 2px 2px 0 0 var(--dark),
		2px 2px 0 0 var(--light);
}

.hero {
	text-align: center;
}

.hero img {
	margin: 0 auto;
}

section {
	margin-bottom: 80px;
}

h1, h2, h3 {
	color: var(--dark);
}

h1 {
	margin-top: 0;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
	image-rendering: pixelated;
}

.hero .tk-img {
	margin-bottom: 24px;
}

.version {
	font-size: 14px;
	font-weight: bold;
	color: var(--dark);
	margin: 8px 0 16px 0;
	opacity: 0.7;
	font-family: departure;
}

.tk-img {
	border: 2px solid var(--dark);
	border-right-color: var(--button-highlight);
	border-bottom-color: var(--button-highlight);
	box-shadow:
		inset 1px 1px 0 0 var(--shadow),
		1px 1px 0 0 var(--button-highlight);
}

a {
	font-family: departure;
	color: var(--link);
	text-decoration: none;
	cursor: url('cursors/sight.png') 0 0, pointer;
}

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

button {
	display: inline-block;
	color: #000000;
	font-family: departure;
	font-size: 14px;
	padding: 6px 12px;
	cursor: url('cursors/sight.png') 0 0, pointer;
	outline: none;
	background-color: var(--button-bg);
	border: 2px solid var(--button-highlight);
	border-right-color: var(--dark);
	border-bottom-color: var(--dark);
	box-shadow:
		1px 1px 0 0 var(--shadow),
		inset 1px 1px 0 0 var(--button-inset);
}

button:active {
	border-color: var(--dark);
	border-right-color: var(--button-highlight);
	border-bottom-color: var(--button-highlight);
	box-shadow:
		1px 1px 0 0 var(--button-highlight),
		inset 1px 1px 0 0 var(--shadow);
}

input[type="text"] {
	background-color: #ffffff;
	color: #000000;
	font-family: departure;
	font-size: 14px;
	padding: 6px 8px;
	outline: none;
	border: 2px solid var(--dark);
	border-right-color: var(--button-highlight);
	border-bottom-color: var(--button-highlight);
	box-shadow:
		inset 1px 1px 0 0 var(--shadow),
		1px 1px 0 0 var(--button-highlight);
	cursor: url('cursors/reading.png') 8 8, text;
}

.platform-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	justify-content: center;
	margin: 24px 0;
}

.platform-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 16px 12px;
	background-color: var(--button-bg);
	border: 2px solid var(--button-highlight);
	border-right-color: var(--dark);
	border-bottom-color: var(--dark);
	box-shadow:
		1px 1px 0 0 var(--shadow),
		inset 1px 1px 0 0 var(--button-inset);
	text-decoration: none;
	color: var(--dark);
	border-radius: 8px;
	transition: transform 0.1s, box-shadow 0.1s;
	width: 110px;
	cursor: url('cursors/sight.png') 0 0, pointer;
}

.platform-btn img {
	width: 32px;
	height: 32px;
}

.platform-btn span {
	font-family: departure;
	font-size: 14px;
	font-weight: bold;
}

.platform-btn:active {
	border-color: var(--dark);
	border-right-color: var(--button-highlight);
	border-bottom-color: var(--button-highlight);
	box-shadow:
		1px 1px 0 0 var(--button-highlight),
		inset 1px 1px 0 0 var(--shadow);
	transform: translate(1px, 1px);
}

.platform-btn.web:hover {
	background-color: #ffffff;
}

.platform-btn.android:hover {
	background-color: #ddffdd;
}

.platform-btn.windows:hover {
	background-color: #ffe0e8;
}

.platform-btn.linux:hover {
	background-color: #e8f5df;
}

.platform-section {
	margin-bottom: 32px;
}

.platform-header {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 16px;
}

.platform-header img {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
}

.platform-header p {
	margin: 4px 0 0 0;
	font-size: 13px;
}

.platform-header strong {
	display: block;
}

.downloads-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
	gap: 8px;
}

.download-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 8px 12px;
	background-color: var(--button-bg);
	border: 2px solid var(--button-highlight);
	border-right-color: var(--dark);
	border-bottom-color: var(--dark);
	box-shadow:
		1px 1px 0 0 var(--shadow),
		inset 1px 1px 0 0 var(--button-inset);
	text-decoration: none;
	color: var(--dark);
	border-radius: 8px;
	transition: transform 0.1s, box-shadow 0.1s;
	text-align: center;
	font-size: 13px;
	min-height: 40px;
	cursor: url('cursors/sight.png') 0 0, pointer;
}

.download-item:active {
	border-color: var(--dark);
	border-right-color: var(--button-highlight);
	border-bottom-color: var(--button-highlight);
	box-shadow:
		1px 1px 0 0 var(--button-highlight),
		inset 1px 1px 0 0 var(--shadow);
	transform: translate(1px, 1px);
}

.download-item:hover {
	background-color: var(--button-highlight);
}

details {
	text-align: center;
}

.donation-buttons {
	display: flex;
	justify-content: space-around;
}

footer {
	text-align: center;
	font-size: 14px;
}

/* Uxn emulator styles */
#display {
	image-rendering: pixelated;
	image-rendering: crisp-edges;
	touch-action: none;
	display: block;
	margin: 0 auto;
	cursor: none;
}

#metadata {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: space-around;
	align-content: start;
}

#metadata ul {
	margin-left: 25px;
	padding: 0;
	float: left;
	line-height: 24px;
	margin-bottom: 45px;
}

#metadata ul li {
	list-style-type: none;
}

#metadata button {
	display: inline-block;
	border: 0;
	font-size: 12px;
	border-radius: 30px;
	padding: 2px 10px;
	line-height: 20px;
	margin-bottom: 1px;
	vertical-align: center;
}

#metadata kbd {
	border: 0;
	font-size: 11px;
	font-weight: bold;
	padding: 2px 2px;
	border-radius: 30px;
}

#console {
	position: relative;
}

#console > * {
	border: 0;
	font-family: mono;
	font-size: 12px;
	line-height: 20px;
	margin: 0;
	padding: 0;
	width: 100%;
}

div.noscript {
	display: block;
	padding: 15px;
	margin: 30px auto;
	max-width: 400px;
}

div.noscript img {
	float: left;
	margin-right: 15px;
}

div.noscript a {
	text-decoration: underline;
	font-weight: bold;
}

/* Features section styling - retro tk look */
.features-section {
	margin: 32px 0;
}

.features-section h2 {
	margin-bottom: 16px;
	color: var(--dark);
	font-size: 16px;
}

.features-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 12px;
}

.feature-item {
	padding: 12px;
	background-color: var(--panel-bg);
	border: 2px solid var(--button-highlight);
	border-right-color: var(--dark);
	border-bottom-color: var(--dark);
	box-shadow:
		1px 1px 0 0 var(--shadow),
		inset 1px 1px 0 0 var(--button-inset);
	font-family: departure;
}

.feature-item h3 {
	margin: 0 0 8px 0;
	font-size: 14px;
	color: var(--dark);
	font-weight: bold;
}

.feature-item p {
	margin: 0;
	font-size: 13px;
	line-height: 1.3;
	color: var(--dark);
}

/* About section - retro tk look */
.about-section {
	margin: 32px 0;
}

.about-section h2 {
	margin-bottom: 12px;
	color: var(--dark);
	font-size: 16px;
}

.about-section p {
	margin: 12px 0;
	line-height: 1.3;
}

.benefits-list {
	padding-left: 20px;
	margin: 12px 0;
}

.benefits-list li {
	margin-bottom: 6px;
	line-height: 1.3;
	font-size: 14px;
}

.safety-note {
	font-size: 12px;
	opacity: 0.7;
	margin-top: 12px;
	font-style: italic;
}

/* Info section with dropdowns - retro tk look */
.info-section {
	margin: 32px 0;
}

.dropdown {
	margin-bottom: 12px;
}

.dropdown summary {
	cursor: url('cursors/sight.png') 0 0, pointer;
	font-weight: bold;
	padding: 8px 12px;
	background-color: var(--button-bg);
	border: 2px solid var(--button-highlight);
	border-right-color: var(--dark);
	border-bottom-color: var(--dark);
	box-shadow:
		1px 1px 0 0 var(--shadow),
		inset 1px 1px 0 0 var(--button-inset);
	font-family: departure;
}

.dropdown[open] summary {
	border-color: var(--dark);
	border-right-color: var(--button-highlight);
	border-bottom-color: var(--button-highlight);
	box-shadow:
		1px 1px 0 0 var(--button-highlight),
		inset 1px 1px 0 0 var(--shadow);
}

.dropdown-content {
	padding: 12px;
	background-color: var(--panel-bg);
	border: 2px solid var(--dark);
	border-right-color: var(--button-highlight);
	border-bottom-color: var(--button-highlight);
	margin-top: 8px;
	box-shadow:
		1px 1px 0 0 var(--shadow),
		inset 1px 1px 0 0 var(--button-inset);
}

.dropdown-content p {
	margin-bottom: 12px;
	font-size: 13px;
	line-height: 1.3;
}

.dropdown-links {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 12px;
}

.dropdown-links a {
	color: var(--link);
	text-decoration: none;
	padding: 6px 12px;
	background-color: var(--button-bg);
	border: 1px solid var(--dark);
	font-family: departure;
	font-size: 13px;
	cursor: url('cursors/sight.png') 0 0, pointer;
}

.dropdown-links a:hover {
	background-color: var(--button-highlight);
}

section h2 {
	margin-top: 32px;
	margin-bottom: 16px;
	color: var(--dark);
	font-size: 18px;
}

section ul {
	padding-left: 20px;
}

section ul li {
	margin-bottom: 8px;
	line-height: 1.4;
}

/* Improved responsive design */
@media (max-width: 768px) {
	.content {
		padding: 12px 16px;
		margin: 8px auto;
	}

	.platform-buttons {
		gap: 12px;
	}

	.platform-btn {
		width: 100px;
		padding: 12px 8px;
	}

	.features-list li {
		padding: 10px 12px;
	}
}
