body {
	overflow: hidden;
	font-family: sans-serif;
}

#mainarea {
	background: black;
	position: absolute;
	width: 100%;
	height: 100%;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	overflow: hidden;
}

#canvas {
	display: block;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	/*image-resolution: 2dppx;*/
	background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNTAiIGhlaWdodD0iNTAiPjx0ZXh0IHN0eWxlPSJmb250OiAzMHB4IHNhbnMtc2VyaWY7IiBmaWxsPSJ3aGl0ZSIgeD0iNTAlIiB5PSI1MCUiIGRvbWluYW50LWJhc2VsaW5lPSJtaWRkbGUiIHRleHQtYW5jaG9yPSJtaWRkbGUiPkxvYWRpbmc8L3RleHQ+PC9zdmc+");
	background-repeat: no-repeat;
	background-position: center;
	z-index: 4;
	height: 100vh !important;
	width: auto !important;
}

#canvasmask {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translateX(-100vw) translate(-50%, -50%);
	z-index: 5;
}

@media (min-height: 75vw) {
	#canvas {
		height: auto !important;
		width: 100vw !important;
	}
}

#canvasmask>* {
	transform: translateX(100vw);
}

#canvas.textureSmooth {
	image-rendering: auto;
}

#canvas.texturePixelated {
	image-rendering: crisp-edges;
	image-rendering: pixelated;
}

.window {
	resize: both;
	overflow: hidden;
	position: absolute;
	border: 2px solid darkgrey;
	margin: 0;
	background-color: #DDD;
	cursor: default;
	min-width: 20px;
	min-height: 20px;
	padding: 0;
	z-index: 1000;
}

.windowbar {
	user-select: none;
	width: calc(100% - 4px);
	padding: 2px;
	height: 16px;
	line-height: 16px;
	color: black;
	background-color: lightblue;
	background-image: url("bar.png");
	font-size: 12px;
	border-bottom: 2px solid darkgrey;
	overflow: hidden;
}

.windowicon, .windowtitle, .windowclose {
	display: inline-block;
}

.windowicon {
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	width: 16px;
	height: 16px;
	position: absolute;
	top: 2px;
	left: 2px;
}

.windowtitle {
	position: relative;
}

.windowicon+.windowtitle {
	left: 18px;
}

.windowclose {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 14px;
	height: 14px;
	line-height: 14px;
	text-align: center;
	background-color: tomato;
	border: 1px outset lightgray;
}

.windowclose:active {
	border-style: inset;
}

.windowcontent {
	width: 100%;
	height: calc(100% - 22px);
	overflow: auto;
}

.console, .consolemarker, .consoleinput {
	display: block;
	outline: none;
	appearance: none;
	margin: 0;
	padding: 2px;
	border: none;
	background-color: black;
	color: #EEE;
	font-family: monospace;
}

.console {
	width: calc(100% - 4px);
	height: calc(100% - 24px);
	resize: none;
	overflow: auto;
	white-space: pre;
}

.console::selection, .consoleinput::selection {
	background-color: #f3f3f3;
	color: black;
}

.consolemarker {
	width: 16px;
	height: 16px;
	float: left;
	user-select: none;
	text-align: center;
	font-weight: bold;
	color: #367cf1;
}

.consolemarker::after {
	content: ">";
}

.consoleinput {
	width: calc(100% - 24px);
	height: 16px;
	float: right;
}

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

#menu {
	position: fixed;
	display: none;
	background: #ffffff;
	transition: opacity 0.3s ease;
	z-index: 20;
	opacity: 0;
}

#menu:hover, #menu.show {
	opacity: 0.9;
}

#menuindicator {
	position: absolute;
	display: none;
	left: 50%;
	transform: translateX(-50%);
	top: 50px;
	background-color: black;
	border-radius: 2px;
	color: white;
	text-align: center;
	padding: 20px;
	font-size: 20px;
}

#menuindicator.show {
	display: block;
}

#menuindicator h1, #menuindicator h2 {
	margin: 0;
}

#menu li {
	white-space: nowrap;
	max-width: 250px;
	position: relative;
}

#menu>li {
	padding: 12px 16px;
	cursor: pointer;
	display: inline-block;
}

#menu li:not(.disabled):hover {
	background: rgba(0, 0, 0, .1);
}

#menu li input {
	transform: scale(1.5);
	cursor: pointer;
	margin: 0 12px 0 0;
}

#menu li a {
	text-decoration: underline;
	color: black;
}

/* both opacity AND visibility are important in this case */
#menu li:hover>ul {
	visibility: visible;
	opacity: 1;
}

#menu ul {
	visibility: hidden;
	opacity: 0;
	position: absolute;
	top: 100%;
	left: 0;
	background-color: rgb(245, 245, 245);
	transition: opacity 0.3s ease;
}

#menu ul li {
	padding: 4px 12px;
	cursor: default;
}

#menu ul li.pointer {
	cursor: pointer;
}

#menu li.disabled {
	color: #666;
	cursor: not-allowed !important;
}

input[disabled] {
	cursor: not-allowed !important;
}

#ffd {
	height: 200px;
	width: 400px;
	position: absolute;
	background-color: #dddddd;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	text-align: center;
	border-radius: 2px;
	overflow: auto;
	z-index: 8;
}

#ffd::before {
	opacity: 0;
	width: 100%;
	height: 0;
	background-color: #333333;
	content: "Drop File Here";
	position: absolute;
	top: 0;
	left: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 30px;
	font-weight: bold;
	color: white;
}

#ffd.filehover::before {
	opacity: 1;
	height: 100%;
}

#ffd.filehover {
	border: 2px dashed #dddddd;
	background-color: #333333;
}

#ffd ul {
	margin: 10px;
}

#ffd ul li {
	margin-bottom: 3px;
}

#ffd ul li a {
	text-decoration: none;
	color: black;
}

input[type="file"] {
	display: none;
}

#upload+label {
	border: 1px solid rgb(118, 118, 118);
	border-radius: 2px;
	padding: 4px;
	margin: 10px;
	font-size: 13px;
	background-color: white;
	display: inline-block;
	transition: ease .1s;
	user-select: none;
	cursor: pointer;
}

#upload+label:hover {
	background-color: #eee;
}

#ffd .source {
	position: absolute;
	bottom: 0;
	width: 100%;
}

#ffd .source * {
	text-decoration: none;
	color: black;
	font-size: 10px;
	margin: 0 5px;
	vertical-align: top;
}

#ffd .source span {
	position: absolute;
	right: 5px;
	font-weight: bold;
}

#resume {
	z-index: 10;
	position: absolute;
	height: 100%;
	width: 100%;
	user-select: none;
	display: none;
}

body.paused #canvas {
	filter: blur(10px);
}

body.paused #resume {
	display: block;
}

#resume div {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background-color: black;
	color: white;
	padding: 20px;
	text-align: center;
	border-radius: 2px;
}

#resume div h1 {
	margin-top: 0;
}

#resume div h3 {
	margin-bottom: 0;
}

#sidealertholder {
	position: absolute;
	right: 0;
	bottom: 0;
	width: 200px;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}

.sidealert {
	background-color: rgb(49, 113, 152);
	color: white;
	margin: 0 10px 10px;
	padding: 5px 8px;
	opacity: 0;
	transition: opacity 0.1s ease-in;
	position: relative;
}

.sidealert.on {
	opacity: 1;
}
