* {
	box-sizing: border-box;
	text-transform: uppercase;

	font-family: "JetBrains Mono", monospace;
	filter: grayscale(10%);

	/* make everythign fade in and out */
	animation: fadeIn 0.2s;
}

:root {
	--window-primary-color: #ffffff;
	--window-secondary-color: #000000;

	--window-background: rgba(0, 0, 0, 1);
	--window-transparent: rgba(0, 0, 0, 0);

	--window-error-color: #f00;
	--window-warning-color: #ff0;
	--window-success-color: #0f0;

	/* experimental */
	--desktop-background-image: url("/assets/img/bg.jpg");

	/* not used */
	--window-border-radius: 0rem;
}

html {
	background-image: var(--desktop-background-image);
}

html,
body {
	height: 100%;
	width: 100%;
	margin: 0;
	padding: 0;
	font-family: "JetBrains Mono", monospace;
	color: var(--window-primary-color);

	overflow: hidden;
}

body {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-items: center;

	/* design guide */
	padding: 1rem;
}

ul {
	list-style: square;
	margin: 0;
	padding: 0;
}

a {
	display: inline-block;
	color: var(--window-primary-color)
}

a:hover {
	cursor: pointer;
}

header {
	width: max-content;
	display: flex;
	flex-direction: row;
	justify-content: flex-start;
	align-items: center;
	margin-bottom: 2rem;

	user-select: none;

	/* experimental */
	background-color: var(--window-background);
	margin-right: auto;
}

header > .logo {
	display: flex;
	flex-direction: row;
	justify-content: flex-start;
	align-items: center;

	/* design guide CRT */
	background-color: var(--window-primary-color);
	color: var(--window-secondary-color);

	padding: 0.2rem 1rem;

	cursor: pointer;
}

.nav {
	display: flex;
	flex-direction: row;
	justify-content: flex-start;
	align-items: center;

	margin: 0;
	padding: 0;
}

.nav > .nav-item {
	display: flex;
	flex-direction: row;
	justify-content: flex-start;
	align-items: center;

	/* design guide CRT */
	background-color: var(--window-background);
	color: var(--window-primary-color);

	padding: 0.2rem 1rem;
}

.nav > .nav-item:hover {
	cursor: pointer;

	/* design guide CRT */
	background-color: var(--window-primary-color);
	color: var(--window-secondary-color);

	transition: 0.2s;
}

/* Hide the dropdown options by default */
.dropdown .dropdown-options {
	display: none;
}

.dropdown {
	position: relative;
}

/* Show the dropdown options when the dropdown is active */
.dropdown.active .dropdown-options {
	display: flex;
	flex-direction: column;
	position: absolute;

	left: 0;
	top: 100%;

	background-color: var(--window-background);
	color: var(--window-primary-color);
	min-width: 160px;

	/* design guide CRT */
	border-top: var(--window-primary-color) 4px solid;
	border-bottom: var(--window-primary-color) 4px solid;
	border-left: var(--window-primary-color) 2px solid;
	border-right: var(--window-primary-color) 2px solid;

	margin: 0.2rem 0 0 0;
}

/* Style the dropdown options links */
.dropdown .dropdown-options a {
	padding: 0.2rem;
	text-decoration: none;
	color: var(--window-primary-color);
	display: block;
}

/* Change the background color of the options on hover */
.dropdown .dropdown-options a:hover {
	background-color: var(--window-primary-color);
	color: var(--window-secondary-color);
}

.context-menu {
	position: absolute;
	top: 0;
	left: 0;
	width: max-content;
	height: max-content;
	z-index: 1000;

	display: none;
	flex-direction: column;
	justify-content: flex-start;
	align-items: flex-start;

	/* design guide CRT */
	background-color: var(--window-background);
	color: var(--window-primary-color);
	border-top: var(--window-primary-color) 4px solid;
	border-bottom: var(--window-primary-color) 4px solid;
	border-left: var(--window-primary-color) 2px solid;
	border-right: var(--window-primary-color) 2px solid;
}

.context-menu > .context-menu-item {
	width: 100%;
	position: relative;
	display: flex;
	flex-direction: row;
	justify-content: flex-start;
	align-items: center;

	/* design guide CRT */
	background-color: var(--window-background);
	color: var(--window-primary-color);

	padding: 0.2rem;
	margin-right: 1rem;
}

.context-menu > .context-menu-item:hover {
	cursor: pointer;

	/* design guide CRT */
	background-color: var(--window-primary-color);
	color: var(--window-secondary-color);

	transition: 0.2s;
}

main {
	width: 100%;
	margin-bottom: auto;
	margin-top: auto;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

/* aka taskbar */
footer {
	width: 100%;
	min-height: 3rem;
	max-height: max-content;
	display: flex;
	flex-direction: row;
	justify-content: flex-start;
	align-items: center;
	margin-top: 2rem;

	background-color: var(--window-transparent);

	z-index: -100;

	flex-wrap: wrap;
	gap: 0.5rem 1rem;

	user-select: none;
}

footer > .taskbar-item {
	width: max-content;
	height: max-content;

	display: flex;
	flex-direction: row;
	justify-content: flex-start;
	align-items: center;

	/* design guide CRT */
	border-top: var(--window-primary-color) 4px solid;
	border-bottom: var(--window-primary-color) 4px solid;
	border-left: var(--window-primary-color) 2px solid;
	border-right: var(--window-primary-color) 2px solid;
	padding: 0.2rem;
	white-space: nowrap;
}

footer > .taskbar-item:hover {
	cursor: pointer;

	/* design guide CRT */
	background-color: var(--window-primary-color);
	color: var(--window-secondary-color);

	transition: 0.2s;
}

footer > .taskbar-item.minimized {
	/* design guide CRT */
	--window-primary-color: #777;

	color: var(--window-primary-color);

	transition: 0.2s;
}

footer > .taskbar-item.minimized:hover {
	/* design guide CRT */
	background-color: #777;

	color: var(--window-secondary-color);

	transition: 0.2s;
}

footer > .taskbar-item.important {
	/* design guide CRT */
	--window-primary-color: var(--window-warning-color);

	color: var(--window-primary-color);

	transition: 0.2s;

	/* strobe slow */
	animation: strobe 1s infinite;
}

footer > .taskbar-item.error {
	/* design guide CRT */
	--window-primary-color: var(--window-error-color);

	color: var(--window-primary-color);

	transition: 0.2s;

	/* strobe slow */
	animation: strobe 1s infinite;
}

@keyframes strobe {
	0% {
		border-top: var(--window-primary-color) 4px solid;
		border-bottom: var(--window-primary-color) 4px solid;
		border-left: var(--window-primary-color) 2px solid;
		border-right: var(--window-primary-color) 2px solid;
	}
	50% {
		border-top: #fff 4px solid;
		border-bottom: #fff 4px solid;
		border-left: #fff 2px solid;
		border-right: #fff 2px solid;

		color: #fff;
	}
	100% {
		border-top: var(--window-primary-color) 4px solid;
		border-bottom: var(--window-primary-color) 4px solid;
		border-left: var(--window-primary-color) 2px solid;
		border-right: var(--window-primary-color) 2px solid;
	}
}

footer > .taskbar-item.important:hover,
footer > .taskbar-item.error:hover {
	/* do not strobe on hover */
	animation: none;

	/* design guide CRT */
	background-color: var(--window-primary-color);
	color: var(--window-secondary-color);
}

@keyframes fadeOut {
	0% {
		opacity: 1;
	}
	100% {
		opacity: 0;
	}
}

@keyframes fadeIn {
	0% {
		opacity: 0;
	}
	100% {
		opacity: 1;
	}
}
