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

#mainarea {
	background-color: black;
	position: absolute;
	width: 100%;
	height: 100%;
	left: 0px;
	right: 0px;
	top: 0px;
	bottom: 0px;
	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;
}

.console, .consolemarker, .consoleinput {
	display: block;
	outline: none;
	appearance: none;
	margin: 0px;
	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-color: #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: 0px;
}

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

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

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

#menu .menu-long {
	white-space: normal;
}

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

#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;
}

#menu ul.disabled li:hover, #menu ul.menu-nohover li:hover {
	background-color: rgb(245, 245, 245);
}

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

#menu ul.xlmenu li {
	max-width: none;
}

#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: 0px;
	background-color: #333333;
	content: "Drop File";
	position: absolute;
	top: 0px;
	left: 0px;
	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 li {
	margin-bottom: 3px;
}

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

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

.uploadbutton {
	margin: 8px 10px;
	display: inline-block;
	user-select: none;
	cursor: pointer;
}

.upload+.uploadlabel {
	border: 1px solid rgb(118, 118, 118);
	border-radius: 2px;
	padding: 4px;
	font-size: 13px;
	background-color: white;
	transition: ease .1s;
}

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

.uploadimage {
	width: 20px;
	vertical-align: middle;
}

#ffdcontent {
	height: calc(100% - 45px);
	padding: 10px;
	overflow: auto;
}

#ffd .source {
	width: calc(100% - 10px);
	height: 15px;
	padding: 5px;
}

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

#versionindicator {
	font-weight: bold;
	position: absolute;
	right: 5px;
	cursor: help;
}

.greyer {
	color: #404040 !important;
}

#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: 0px;
}

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

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

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

.sidealert.on {
	opacity: 1;
	margin-bottom: 10px;
}

#startbutton {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 40px;
	padding: 10px 20px;
	z-index: 100;
	outline: none;
	border-radius: 4px;
	cursor: pointer;
	display: none;
}

#updatenotice {
	position: absolute;
	top: calc(50% + 120px);
	left: 50%;
	transform: translateX(-50%);
	max-height: calc(50% - 140px);
	max-width: 400px;
	overflow-y: auto;
	margin: 0px;
	padding: 0px 10px;
	color: white;
	white-space: pre-wrap;
	z-index: 8;
	display: none;
}
