* {
	box-sizing: border-box;
}

html, body {
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
}

body {
	display: flex;
	background-color: #303030;
	font-family: "Noto Sans UI";
	padding-top: 50px;
}


/* Topbar */

#topbar {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 50px;
	line-height: 50px;
	background-color: #303030;

	transition: background-color .5s;
	z-index: 10000;
}

#topbar[data-view="code"] {
	background-color: #424242;
}

#topbar .button {
	display: inline-flex;
	height: 50px;
	line-height: 50px;
	font-size: 20px;
	cursor: pointer;
	text-align: center;
	color: rgba(255, 255, 255, .6);
	transition: background-color .2s;
}

#topbar .button:hover {
	background-color: rgba(0, 0, 0, .15);
	color: rgba(255, 255, 255, .9);
	transition: background-color .1s;
}

#topbar .button .icon {
	flex: 0 0 auto;
	width: 50px;
}

#topbar .button .label {
	flex: 1 1 auto;

	font-size: 18px;
	text-align: left;

	overflow: hidden;

	border-top-right-radius: 3px;
	border-bottom-right-radius: 3px;
}

#topbar .scriptButton {
	float: right;
	padding: 0 12px;
	text-decoration: none;
}

#topbar .disconnectButton .label {
	opacity: 0;
	width: 0;
	transition: width .1s, opacity .01s .1s;
}

#topbar .disconnectButton:hover .label {
	opacity: 1;
	width: 104px;

	transition: width .1s, opacity .01s;
}


/* Content */

#content {
	display: flex;
	position: relative;
	width: 100%;

	flex-direction: column;
	justify-content: center;
	align-items: center;
	
	overflow: hidden;
}


/* Page view */

.pageview {
	display: flex;
	width: 360px;

	flex-direction: column;
	background-color: #424242;

	border-radius: 6px;
	overflow: hidden;
}

.pageview .header {
	display: flex;
	height: 100px;
	padding: 20px;
	background: #0288D1;

	justify-content: center;
}

.pageview .header .title {
	font-size: 40px;
	font-weight: 900;
	color: rgba(255, 255, 255, 1);
}

.pageview .content {
	display: flex;
	flex-direction: column;
	padding: 16px 20px;
	padding-top: 24px;

	justify-content: center;
	text-align: center;
}

.pageview .content label {
	color: rgba(255, 255, 255, 1);
	font-size: 14px;
	clear: both;
}

.pageview .content .select {
	position: relative;
	display: flex;
	flex-direction: column;

	justify-content: center;
	text-align: center;
}

.pageview .content .select:after {
	content: " ";
	position: absolute;
	right: 12px;
	bottom: 16px;
	width: 0;
	height: 0;
	border: 3px solid transparent;
	border-top: 6px solid #9D9D9D;
}

.pageview .content .select select {
	background: #3B3B3B;
	padding: 11px 18px 10px;
	margin-top: 6px;

	border: 2px solid #505050;
	border-radius: 3px;

	outline: none;

	color: rgba(255, 255, 255, .5);
	font-size: 16px;

	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

.pageview .content .select select:hover {
	background: #424242;
}

.pageview .footer {
	display: flex;
	padding: 20px 0;
	margin-top: 10px;

	justify-content: center;
	text-align: center;
}

.pageview .btn-primary {
	display: block;
	background: #039BE5;
	padding: 12px 16px;
	color: rgba(255, 255, 255, 1);
	font-size: 18px;

	border: 1px solid #0288D1;
	border-radius: 3px;

	outline: none;
	cursor: pointer;
}

.pageview .btn-primary:hover {
	background: #0288D1;
}


/* Main page */

#mainpage .connectButton {
	width: 80%;
}


/* Load page */

#loadpage .pageview {
	opacity: 0;
	max-height: 0;
	margin-bottom: 0;

	transition: max-height .5s, margin-bottom .5s, opacity .5s .5s;
}

#loadpage.loaded .pageview {
	opacity: 1;
	max-height: 400px;
	margin-bottom: 10px;
}

#loadpage .codebutton {
	width: 100%;
	padding: 30px 30px;

	margin-top: 6px;

	color: rgba(255, 255, 255, .7);
	font-size: 30px;
	font-weight: 700;
	text-align: center;

	background-color: #303030;
	border: 1px solid #606060;
	border-radius: 2px;

	outline: none;
	cursor: pointer;
}

#loadpage .codebutton:active {
	animation: clicky .1s 1 ease-out normal;
}

#loadpage.loaded .loadercontainer {
	transform: scale(.5);
	transition: transform .75s;
}

#loadpage.loaded .loader .text:before {
	content: "Waiting"
}

/* Loader */

.loader {
	display: flex;
	position: relative;
	height: 72px;
	line-height: 60px;

	justify-content: center;
	text-align: center;

	-webkit-user-select: none;
	user-select: none;

	animation: loading 12s infinite ease-in-out normal;
	cursor: default;
}

.loader > div {
	display: flex;
}

.loader .bracket {
	font-size: 60px;
	color: rgba(255, 255, 255, 1);
}

.loader .text {
	box-sizing: content-box;
	display: flex;
	font-size: 36px;
	overflow: hidden;

	justify-content: center;
	text-align: center;
	color: rgba(255, 255, 255, .9);
	padding: 4px 0;

	margin: 0 4px;

	animation: loadingtext 12s infinite ease-in-out normal;
}

.loader .text:before {
	display: block;
	content: "Loading";
}


/* Code page */

.console {
	position: relative;
	width: 100%;
	height: 100%;
	background-color: #000000;

	padding: 0;
	margin: 0;

	font-family: "Noto Mono";
	color: rgba(255, 255, 255, 1);
}

.console .inner {
	position: absolute;
	width: auto;
	height: auto;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	font-size: 14px;

	padding: 4px;
	margin: 2px;

	overflow: auto;
}

.console .inner>.line {
	list-style-type: none;
	padding: 1px 0;
	white-space: pre;
}

.console .inner>.line.type-print {
	color: rgba(255, 255, 255, 1);
}

.console .inner>.line.type-warn {
	color: rgba(255, 153, 255, 1);
}

.console .inner>.line.type-error {
	color: rgba(204, 43, 18, 1);
}

.console .inner>.line.type-stack {
	color: rgba(77, 128, 230, 1);
}

.console .inner>.line.type-run {
	color: rgba(26, 115, 255, 1);
}

.console .inner>.line.type-notice {
	color: rgba(0, 204, 0, 1);
}

.console .inner>.line.type-cmd {
	color: rgba(255, 179, 51, 1);
}

.console .inner>.line.type-get {
	color: rgba(26, 255, 0, 1);
}

.console .inner .line .prefix {
	user-select: none;
}


.console .inner::-webkit-scrollbar {
	background: transparent;
	width: 8px;
	height: 8px;
}

.console .inner::-webkit-scrollbar-button,
.console .inner::-webkit-scrollbar-corner,
.console .inner::-webkit-scrollbar-track-piece  {
	display: none;
}

.console .inner::-webkit-scrollbar-thumb {
	background: black;
	border: 1px solid #404040;
}

.console .input {
	position: absolute;
	left: 0;
	bottom: 0;
	right: 0;

	border-top: 1px solid #303030;
}

.console .input .arrow {
	float: left;
	width: 28px;
	height: 100%;

	line-height: 28px;
	text-align: center;

	-webkit-user-select: none;
	user-select: none;
	cursor: default;
}

.console .input textarea,
.console .input .fakeDiv {
	background: none;
	float: left;
	width: calc(100% - 28px);
	height: calc(100% + 1px);

	font-size: 14px;
	line-height: 18px;

	padding: 5px 0;
	margin: 0;

	white-space: pre-wrap;
	word-wrap: break-word;

	color: rgba(255, 255, 255, 1);

	border: none;
	outline: none;
	overflow-y: scroll;
	overflow-x: hidden;
	resize: none;
}

.console .input textarea::-webkit-scrollbar {
	display: none;
}

.console .input .fakeDiv {
	position: absolute;
	padding: 0;
	opacity: 0;
	pointer-events: none;
	overflow: hidden;
}

.console .input .fakeDiv span {
	display: inline-block;
	width: 0;
	height: 0;
	overflow: hidden;
}


/* Error message */

#errormessage {
	position: absolute;
	z-index: 9000;
	top: 0;
	left: 25%;
	width: 50%;
	height: 50px;
	line-height: 50px;

	background: rgb(200, 0, 0);
	font-size: 14px;
	text-align: center;

	color: rgba(255, 255, 255, .9);

	transition: top .25s;
}

#errormessage.visible {
	top: 50px;
}

#errormessage .closeError {
	position: absolute;
	top: 0px;
	right: 0px;
	width: 18px;
	height: 18px;
	line-height: 18px;

	padding: 0;
	margin: 0;

	color: rgba(255, 255, 255, .8);
	font-size: 10px;
	font-weight: 700;
	text-align: center;

	background: none;
	border: none;
	outline: none;

	cursor: pointer;
}

#errormessage .closeError:hover {
	color: rgba(255, 255, 255, .7);
}


/* Animations */

@keyframes clicky {
	0% { transform: scale(1); }
	50% { transform: scale(1.01); }
	0% { transform: scale(1); }
}

@keyframes loading {
	20% { transform: rotate(0); }
	30% { transform: rotate(180deg); }
	70% { transform: rotate(180deg); }
	80% { transform: rotate(360deg); }
	80.001% { transform: rotate(0); }
}

@keyframes loadingtext {
	5% { max-width: 180px; }
	15% { max-width: 0; transform: rotate(0); }
	35% { max-width: 0; transform: rotate(-180deg); }
	45% { max-width: 180px; }
	55% { max-width: 180px; }
	65% { max-width: 0; transform: rotate(-180deg); }
	85% { max-width: 0; transform: rotate(0); }
	95% { max-width: 180px; }
}