@font-face {
	font-family: 'Wizards Manse';
	src: url('WizardsManse.otf');
}

@font-face {
	font-family: 'StarPerv';
	src: url('StarPerv.ttf');
}

html,
body {
	margin: 0;
	padding: 0;
	height: 100%;
	background: #000;
	color: #fff;
	-webkit-tap-highlight-color: rgba(0,0,0,0);
	-webkit-user-select: none;
	font-size: 16px;
	font-family: 'StarPerv', sans-serif;
	font-smooth: never;
	-webkit-font-smoothing : none;
}

h1 {
	font-family: 'Wizards Manse', sans-serif;
	margin: 0;
	margin-top: -20px;
	font-size: 400%;
	line-height: 1.5em;
	color: #000;
	text-shadow: 2px 2px 0 rgba(0, 255, 0, 1.0), 4px 0 0 rgba(0, 255, 0, 0.75), 8px 0 4px rgba(104, 0, 255, 0.75), 0 0 8px rgba(104, 0, 255, 1.0), 0 2px 16px rgba(104, 0, 255, 1.0);
}

h2 {
	margin: 0;
	font-size: 100%;
	line-height: 1em;
	color: #fff;
	text-shadow: 0 0 4px rgba(0, 255, 0, 1.0), 0 0 8px rgba(0, 255, 0, 1.0), 0 0 16px rgba(0, 255, 0, 1.0);
}

.souls {
	margin-top: 0.5em;
}

h3 {
	font-size: 200%;
}

label {
	/*text-shadow: 0 0 4px rgba(0, 0, 255, 1.0), 0 0 8px rgba(0, 0, 255, 1.0), 0 0 16px rgba(0, 0, 255, 1.0);*/
}

input {
	font-family: 'StarPerv', sans-serif;
	display: block;
	-webkit-appearance: none;
	padding: 0.5em 1em;
	border: 1px solid #fff;
	background: #000;
	color: #fff;
	font-size: 100%;
	margin: 1em auto;
	outline: none;
	width: 300px;
	border-radius: 0;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}

	::-webkit-input-placeholder {
	   color: #777;
	}

	:-moz-placeholder { /* Firefox 18- */
	   color: #777;
	}

	::-moz-placeholder {  /* Firefox 19+ */
	   color: #777;
	}

	:-ms-input-placeholder {  
	   color: #777;
	}

.btn-run {
	width: 150px;
}

.head {
	background: #000;
	position: fixed;
	left: 0;
	right: 0;
	top: 0;
	height: 130px;
	z-index: 999;
}
	.setup .head {
		position: absolute;
	}

.container {
	max-width: 320px;
	margin: 0 auto;
	text-align: center;
	padding-top: 130px;
}

@media screen and (orientation:landscape) {
	.container {
		max-width: 480px;
	}
}

.wide {
	max-width: 800px;
}

.setup {
	padding-top: 3em;
}

.mode {
	display: none;
	position: relative;
	z-index: 1;
}

.hud {
	font-size: 150%;
}

button {
	font-family: 'StarPerv', sans-serif;
	display: block;
	-webkit-appearance: none;
	padding: 0.5em 1em;
	border: 1px solid #fff;
	background: #000;
	color: #fff;
	font-size: 100%;
	margin: 1em auto;
	outline: none;
	cursor: pointer;
	width: 300px;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}

	button:active,
	input[type="submit"]:active {
		background: #fff;
		color: #000;
	}

	.busy button,
	button.busy {
		cursor: default;
		opacity: 0.33;
		pointer-events: none;
	}

	input.activeMode {
		outline: 3px solid #0c0;
	}

p.adminMsg {
	min-height: 1.5em;
	padding: 0;
	margin: 0;
}

p.running {
	color: #0c0;
	padding: 6px 0;
}

p.stopped {
	background: #c00;
	color: #000;
	padding: 6px 0;
}

.adminForm {

}

	.adminForm input[type="number"] {
		background: #232;
		border-color: #9a9;
	}

	.adminForm .half {
		float: left;
		margin-left: 10px;
		margin-right: 10px;
		width: 43%;
		margin-top: 1em;
		margin-bottom: 0;
	}

	.adminForm .quarter {
		float: left;
		width: 30%;
		margin-left: 10px;
		margin-right: 10px;
		margin-top: 1em;
		margin-bottom: 0;
	}

	.adminForm .threeQuarters {
		float: left;
		width: 55%;
		margin-left: 10px;
		margin-right: 10px;
		margin-top: 1em;
		margin-bottom: 0;
	}

.summon {

}

	.summon h2,
	.summon p {
		line-height: 1.33em;
	}

.tracknfield {

}

	.tracknfield .btns p {
		display: none;
	}

		.tracknfield.loading .btns p {
			display: block;
		}

	.tracknfield button {
		padding-top: 2em;
		padding-bottom: 2em;
	}

		.tracknfield.loading button {
			display: none;
		}

		.tracknfield.red button {
			color: #e40058;
			border-color: #e40058;
		}

			.tracknfield.red button:active {
				color: #000;
				background: #e40058;
			}

		.tracknfield.blue button {
			color: #0070ec;
			border-color: #0070ec;
		}

			.tracknfield.blue button:active {
				color: #000;
				background: #0070ec;
			}

h3.blue {
	color: #0070ec;
}

h3.red {
	color: #e40058;
}

.logName {
	font-weight: bold;
	text-shadow: 0 0 4px rgba(0, 0, 255, 1.0), 0 0 8px rgba(0, 0, 255, 1.0), 0 0 16px rgba(0, 0, 255, 1.0);
}

.money {
	padding: 8px 0 0 36px;
	background: url(flame2x.gif) left center no-repeat;
}

.cost {
	padding-left: 20px;
	background: url(flame.gif) left center no-repeat;
}

.foot {
	margin: 0;
	padding-top: 25px;
	padding-bottom: 25px;
}

	.foot a {
		text-decoration: none;
		color: #444;
	}

		.foot a:hover {
			color: #fff;
		}

.foot-log {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: #000;
}

	.wiggle {
		animation: wiggle 1s infinite alternate;
	}

	.foot-log .instruction {
		margin: 0;
		padding-top: 25px;
	}

	.foot-log .uri {
		margin: 0.33em 0 0 0;
	}

		.foot-log .uri a {
			text-decoration: none;
			color: #fff;
			font-size: 200%;
		}

	.foot-log .foot a {
		color: #666;
	}

table.parsed {
	font-family: monospace;
	font-size: 12px;
	color: #ccc;
	margin-top: 60px;
}

table.parsed th {
	color: #fff;
	background: #222;
}

.error404 a {
	font-size: 150%;
	color: #fff;
}

.horses canvas {
	border: 1px solid #fff;
}

.foulAlert {
	display: none;
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background: #f00;
	z-index: 99999;
}

	.foulAlert h2 {
		position: absolute;
		left: 0;
		right: 0;
		top: 0;
		bottom: 0;
		margin: auto;
		height: 1em;
		padding-left: 0.25em;
		font-size: 80px;
		color: #fff;
		text-shadow: 0 0 4px rgba(255, 255, 255, 1.0), 0 0 8px rgba(255, 255, 255, 1.0), 0 0 16px rgba(255, 255, 255, 1.0);
	}

	.foul .foulAlert {
		display: block;
	}

	.foul.flash .foulAlert {
		background: #000;
	}

.standings {

}

	.standings h3 {
		margin-bottom: 0.5em;
	}

	.standings ol {
		text-align: left;
	}

		.standings ol li {
			position: relative;
			margin: 10px 125px 10px 0;
		}

			.standings ol li:first-child {
				font-size: 125%;
			}

			.standings ol li:nth-child(4n),
			.standings ol li:nth-child(5n) {
				font-size: 90%;
			}

	.standings span.hz {
		position: absolute;
		right: -125px;
		top: 0;
		padding-bottom: 3px;
		background: #000;
		width: 125px;
		text-align: right;
	}

		.standings span.hz span {
			font-size: 110%;
			text-shadow: 0 0 4px rgba(104, 0, 255, 1.0), 0 0 8px rgba(104, 0, 255, 1.0), 0 0 16px rgba(104, 0, 255, 1.0);
		}

.tetris button {
	position: relative;
	float: left;
	margin: 10px;
	width: 43%;
	height: 100px;
	overflow: hidden;
	text-indent: -999px;
	background: url(tetrominos.png) center 0 no-repeat;
}

span.tetromino {
	position: relative;
	display: inline-block;
	width: 75px;
	height: 50px;
	top: 10px;
	overflow: hidden;
}

	span.tetromino:after {
		content: " ";
		position: absolute;
		width: 75px;
		height: 75px;
		left: 0;
		top: -20px;
		background: url(tetrominos.png) center 0 no-repeat;
	}

span.tetromino.B0:after {
	background-position: center -0px;
}

span.tetromino.B1:after {
	background-position: center -100px;
}

span.tetromino.B2:after {
	background-position: center -200px;
}

span.tetromino.B3:after {
	background-position: center -300px;
}

span.tetromino.B4:after {
	background-position: center -400px;
}

span.tetromino.B5:after {
	background-position: center -500px;
}

span.tetromino.B6:after {
	background-position: center -600px;
}

span.tetromino.B7:after {
	background-position: center -700px;
}

.louiji {
	width: 480px;
	margin-top: -100px;
}

	.louiji h2 {
		position: absolute;
		right: 50px;
		top: 30px;
		font-family: 'Wizards Manse', sans-serif;
		margin: 0;
		font-size: 400%;
		line-height: 1.5em;
		color: #000;
		text-shadow: 0 0 4px rgba(255, 0, 0, 1.0), 0 0 8px rgba(255, 0, 0, 1.0), 0 0 16px rgba(255, 0, 0, 1.0);
	}

		.louiji h2 span:nth-child(1) {
			position: relative;
			top: 7px;
		}

		.louiji h2 span:nth-child(2) {
			position: relative;
			top: 3px;
		}

		.louiji h2 span:nth-child(5) {
			position: relative;
			top: 3px;
		}

		.louiji h2 span:nth-child(6) {
			position: relative;
			top: 7px;
		}

	.louiji .controls {
		height: 260px;
		background: #111;
		border: 10px solid #999;
		border-top-width: 30px;
	}

	.louiji .btn {
		position: absolute;
	}

	.louiji .btn.btnarrows {
		left: 20px;
		top: 60px;
		width: 200px;
		height: 200px;
		background: url(dpad@2x.png) 0 0 no-repeat;
		background-size: 1000px;
	}

		.louiji .btn.btnarrows span {
		}

			.louiji .btn.btnarrows.down.child_up {
				background-position: -200px 0;
			}

			.louiji .btn.btnarrows.down.child_down {
				background-position: -400px 0;
			}

			.louiji .btn.btnarrows.down.child_left {
				background-position: -600px 0;
			}

			.louiji .btn.btnarrows.down.child_right {
				background-position: -800px 0;
			}

		.louiji .btn.btnarrows span.btnup,
		.louiji .btn.btnarrows span.btndown,
		.louiji .btn.btnarrows span.btnleft,
		.louiji .btn.btnarrows span.btnright {
			position: absolute;
			left: 0;
			top: 0;
			width: 40%;
			height: 40%;
			background-image: none;
		}

			.louiji .btn.btnarrows span.btnup {
				left: 30%;
				height: 40%;
			}

			.louiji .btn.btnarrows span.btndown {
				left: 30%;
				top: 64%;
				height: 36%;
			}

			.louiji .btn.btnarrows span.btnleft {
				width: 38%;
				top: 30%;
			}

			.louiji .btn.btnarrows span.btnright {
				width: 38%;
				left: 62%;
				top: 30%;
			}

	.louiji .btn.btnA,
	.louiji .btn.btnB {
		left: 250px;
		bottom: 50px;
		width: 100px;
		height: 100px;
		background: #999;
	}

		.louiji .btn.btnA span,
		.louiji .btn.btnB span {
			position: relative;
			display: block;
			width: 80px;
			height: 80px;
			margin: 10px;
			background: #c00;
			border-radius: 100%;
		}

			.louiji .btn.btnA span:after,
			.louiji .btn.btnB span:after {
				content: " ";
				position: absolute;
				left: 0;
				top: -5px;	
				width: 100%;
				height: 100%;
				background: #f00;
				border-radius: 100%;
			}

				.louiji .btn.btnA.down span:after,
				.louiji .btn.btnB.down span:after {
					top: 0;
				}

	.louiji .btn.btnB {
		left: 360px;
	}

.satan h1 {
	text-shadow: 2px 2px 0 rgba(255, 0, 0, 1.0), 4px 0 0 rgba(255, 0, 0, 0.75), 8px 0 4px rgba(104, 0, 255, 0.75), 0 0 8px rgba(104, 0, 255, 1.0), 0 2px 16px rgba(104, 0, 255, 1.0);
}

.satan button {
	text-indent: -5999px;
	width: 200px;
	height: 100px;
	background: url(satan.gif) 0 0 no-repeat;
	border: none;
}

	.busy .satan button {
		background-position: -200px 0;
		opacity: 1;
	}



/**
 * Wiggle
888       888d8b                888
888   o   888Y8P                888
888  d8b  888                   888
888 d888b 888888 .d88b.  .d88b. 888 .d88b.
888d88888b888888d88P"88bd88P"88b888d8P  Y8b
88888P Y88888888888  888888  88888888888888
8888P   Y8888888Y88b 888Y88b 888888Y8b.
888P     Y888888 "Y88888 "Y88888888 "Y8888
                     888     888
                Y8b d88PY8b d88P
                 "Y88P"  "Y88P
**/

@keyframes wiggle {
  0% {
    transform: rotate(-2deg) scale(1.05, 1.05);
  }

  50% {
    transform: rotate(2deg) scale(0.95, 0.95);
  }

  100% {
    transform: rotate(-2deg) scale(1.05, 1.05);
  }
}