@font-face {
    font-family: 'HappyKiller';
    src: url('../fonts/HappyKiller.eot');
    src:
        local('☺'),
        url('../fonts/HappyKiller.woff') format('woff'),
        url('../fonts/HappyKiller.ttf') format('truetype'),
        url('../fonts/HappyKiller.svg') format('svg');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
}
html,
body {
    width: 100%;
    height: 100%;
}
body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    background: #111;
}

/*
 * -------------------
 * Shared Styles
 * -------------------
 */
#title {
    position: fixed;
    right: 10px;
    bottom: 10px;
    text-align: center;
    text-transform: uppercase;
    font-family: Consolas, monaco, Helvetica, monospace;
    font-size: 12px;
    font-weight: normal;
    color: #999;
    z-index: 100;
}

button,
.button {
    cursor: pointer;
    border: 0;
    background: #222;
    color: #0cf;
    line-height: 16px;
    font-size: 10px;
    text-transform: uppercase;
    text-decoration: none;
    padding: 5px 10px;

    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -ms-box-sizing: border-box;
    -o-box-sizing: border-box;
    box-sizing: border-box;

    -webkit-transition: 0.5s;
    -moz-transition: 0.5s;
    -ms-transition: 0.5s;
    -o-transition: 0.5s;
    transition: 0.5s;
}
button:hover,
.button:hover {
    background: #444;
    box-shadow: 0 0 3px #0cf;
}
button[disabled] {
    color: #999;
}
button[disabled]:hover {
    background: #222;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    cursor: no-drop;
}
button:active {
    background: #fff;
}

#loading {
    display: none;
    position: absolute;
    width: 50px;
    height: 50px;
    top: 30px;
    right: 30px;
    background: url(../images/loading.gif) center center no-repeat black;
}

/*
 * -------------------
 * Game Styles
 * -------------------
 */
#gameWrap {
    top: 50%;
    margin-top: -267px;
    position: relative;

    -webkit-transition: margin-top 0.5s;
}

#gameWrapInner {
    margin: 0 auto;
    position: relative;
    background: black;
    width: 880px;
    height: 535px;
    overflow: hidden;

    /*-webkit-transition: width 0.5s, height 0.5s;*/
}

#gameWrap canvas {
    display: block;
    background: #000;
}

#gameControlPanel {
    margin: 10px auto;
    width: 900px;
}

.ui {
    position: absolute;
    left: 10px;
    top: 10px;

    font-family: Consolas, monaco, Helvetica, monospace;
    font-weight: bold;
    text-transform: uppercase;
    color: white;
}
.ui input {
    background: transparent;
    border: 0;

    font-family: Consolas, monaco, Helvetica, monospace;
    font-weight: bold;
    text-transform: uppercase;
    text-align: right;
    width: 100px;
    color: white;
}

.ui-screen {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 100;

    -webkit-transition: 0.5s opacity;
    transition: 0.5s opacity;

    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}
.ui-screen.active {
    opacity: 1;
    z-index: 101;
}

.ui-headline {
    font-family: 'HappyKiller', Consolas, monaco, Helvetica, monospace;
    font-size: 30px;
    color: rgba(255, 255, 255, 0.25);
    text-shadow: rgba(153, 15, 245, 1) 0 0 10px;
}
.ui-headline.yellow {
    text-shadow: rgba(250, 250, 25, 1) 0 0 10px;
}

.ui-menu {
    font-family: Consolas, monaco, Helvetica, monospace;
    font-size: 16px;
    text-align: center;
    text-transform: uppercase;
    color: #ccc;
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.ui-menu li {
    padding-top: 10px;
}
.ui-menu li.disabled {
    opacity: 0.5;
}
.ui-menupoint {
    cursor: pointer;
    white-space: nowrap;
}
.ui-menu .active .ui-menupoint:before {
    content: '► ';
}
.ui-menu .active .ui-menupoint:after {
    content: '  .';
    color: transparent;
}

.ui-levelList {
    flex-direction: row;
    flex-wrap: wrap;
}

.ui-levelList li {
    cursor: pointer;
    display: block;
    float: left;
    width: 18.75%;
    padding: 0;
    margin: 0 3.125% 3.215%;
}
.ui-levelList img {
    display: block;
    width: 150px;
    height: 85px;
}
.ui-levelList .ui-menupoint {
    font-weight: normal;
    font-size: 12px;
    padding: 2px 5px;
}

.ui-levelList li.disabled,
li.disabled .ui-menupoint {
    cursor: no-drop;
}

.ui-counterGroup {
    float: left;
    width: 100px;
    margin: 10px;
}

.ui-counter {
    display: inline-block;
    font-family: Consolas, monaco, Helvetica, monospace;
    font-weight: bold;
    text-transform: uppercase;
    color: white;
}

/*
	 * title screen
	 */
#gameTitle {
    text-align: center;
    padding: 60px 0 180px;
    font-size: 50px;
}
#gameMenu {
    padding-top: 220px;
}

/*
	 * level select screen
	 */
#selectLevelTitle {
    padding: 60px 0 40px;
    text-align: center;
}

/*
	 * game screen
	 */
#gameScreen.active {
    z-index: 99;
}

/*
	 * win screen
	 */
#winScreen {
    background: rgba(0, 0, 0, 0.5);
}
#winTitle {
    padding-left: 40%;
    padding-top: 25%;
    padding-bottom: 10px;
    text-shadow: rgba(15, 245, 43, 1) 0 0 10px;
}
#winMenu {
    padding-left: 40%;
    text-align: left;
}
#winStats {
    padding-left: 50%;
    overflow: hidden;
}
.winStat {
    float: left;
    width: 50%;
}
.winStat u {
    display: block;
    font-family: Consolas, monaco, Helvetica, monospace;
    text-transform: uppercase;
    text-decoration: none;
    color: #ccc;
}
.winStat i {
    font-size: 18px;
    font-style: normal;
}

/*
	 * pause screen
	 */

#pauseScreen {
    background: rgba(0, 0, 0, 0.8);
}
#pauseTitle {
    padding: 80px 0 160px;
    text-align: center;
}

#consoleLoading {
    position: absolute;
    top: 24px;
    left: 28px;
    margin: -15px 0 0 -15px;

    width: 20px;
    height: 20px;
    border: 1px solid rgba(153, 15, 245, 1);

    opacity: 0;

    -webkit-animation: loading 1s infinite;
    animation: loading 1s infinite;

    -webkit-transition: 0.5s ease-out;
    transition: 0.5s ease-out;

    -webkit-transform: scale(0.2);
    transform: scale(0.2);
}
#consoleLoading.full {
    opacity: 1;
    -webkit-transform: scale(1);
    transform: scale(1);
}
@-webkit-keyframes loading {
    from {
        -webkit-transform: rotate(0);
        background: rgba(255, 255, 255, 0.5);
    }
    to {
        -webkit-transform: rotate(90deg);
        background: rgba(255, 255, 255, 0);
    }
}
@keyframes loading {
    from {
        transform: rotate(0);
        background: rgba(255, 255, 255, 0.5);
    }
    to {
        transform: rotate(90deg);
        background: rgba(255, 255, 255, 0);
    }
}

#consoleScreen {
    font-family: Consolas, monaco, Helvetica, monospace;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: bold;
    line-height: 16px;
    color: #999;
    padding: 5px 5px 5px 50px;

    opacity: 1;
}
.console-msg {
    position: relative;
    opacity: 0;
    top: -10px;
    overflow: hidden;
    height: 16px;
    margin-bottom: 1px;
    transition: 0.5s;
}
.console-fadein {
    opacity: 1;
    top: 0;
}
.console-fadeout {
    opacity: 0;
    height: 0;
    margin-bottom: 0;
}
.console-highlight {
    color: rgba(153, 15, 245, 1);
}
.console-error {
    color: rgba(245, 15, 153, 1);
}

#message {
    position: absolute;
    left: 50%;
    margin-left: -250px;
    bottom: 20px;
    width: 480px;
    height: 80px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #333;
    padding: 10px;
}
#message img {
    float: left;
    width: 80px;
    height: 80px;
}
#message p {
    color: #999;
    font-family: Consolas, monaco, Helvetica, monospace;
    font-size: 15px;
    line-height: 26px;
    text-transform: uppercase;
    padding-left: 100px;
}

/*
 * -------------------
 * Editor Styles
 * -------------------
 */

#editorWrap {
    position: relative;
    width: 100%;
    height: 90%;
    overflow: scroll;
}
#editorWrap canvas {
    position: absolute;
    left: 0;
    top: 0;
    display: block;
    background: #000;
}

/*
 * Top Navigation
 */
#topNav {
    width: 100%;
    list-style: none;
    background: #333;
    padding: 1px;

    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -ms-box-sizing: border-box;
    -o-box-sizing: border-box;
    box-sizing: border-box;
}
#topNav ul {
    list-style: none;
}
#topNav > li {
    float: left;
    width: 150px;
    position: relative;
}
.topNavPoint {
    display: block;
    padding: 5px 10px;
    text-transform: uppercase;
    font-size: 12px;
    line-height: 16px;
    font-weight: bold;
    color: #ccc;
    cursor: pointer;
    border-bottom: 1px solid transparent;
}
.topNavPoint:hover {
    color: #0cf;
    border-color: #ccc;
}

.topNavList {
    display: none;
    position: absolute;
    left: 0;
    top: 27px;
    width: 300px;
    border-top: 1px solid #0cf;
    background: #333;
    z-index: 100;

    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}
.topNavList li {
    margin-bottom: 1px;
}
.topNavList button,
.topNavList .button {
    display: block;
    width: 100%;
    text-align: left;
}

.active .topNavPoint {
    color: #333;
    background: #0cf;
    border-color: transparent;
}
.active .topNavList {
    display: block;
}

.topNavList .inputList {
    padding: 10px;
}

/*
 * Input List
 */
.inputList {
    overflow: hidden;
}
.inputList * {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -ms-box-sizing: border-box;
    -o-box-sizing: border-box;
    box-sizing: border-box;
}

.inputList dt,
.inputList dd {
    padding: 2px;
}

.inputList dt {
    color: #ccc;
    float: left;
    clear: left;
    width: 50%;
    border-bottom: 1px solid #666;
}
.inputList dt:last-of-type {
    border: 0;
}
.inputList dd {
    float: left;
    width: 50%;
}
.inputList label {
    cursor: pointer;
    display: block;
}
.inputList input {
    border: 0;
    background: #000;
    color: #ccc;
    font-size: 12px;
    text-align: left;
    font-style: italic;
}

.inputList dt:hover {
    color: #fff;
    background: #222;
}

.inputList input[type='text'],
.inputList input[type='number'] {
    width: 100%;
    padding: 0 5px;
}

.inputList input[type='number'] {
    text-align: right;
}

.inputList input[disabled] {
    background: transparent;
}

/*
 * Entity Definition Window
 */
#entityDefinition {
    display: none;
    width: 300px;
    right: 40px;
    top: 60px;
}

#propertyList {
    list-style: none;
    overflow-y: scroll;
    border-bottom: 1px solid #000;
    padding: 10px 10px 0;
    height: 265px;
}
#propertyList li {
    padding-bottom: 10px;
    border-bottom: 1px solid #666;
    margin-bottom: 10px;
}

#propertyList .inputList {
    margin-left: 10px;
    padding-top: 5px;
}

.componentTitle {
    display: block;
    padding: 2px;
    color: #ccc;
    text-transform: uppercase;
    font-weight: bold;
}
.componentTitle button {
    width: 16px;
    padding: 0;
}
.componentTitle .toggle {
    float: left;
    margin-right: 5px;
}
.componentTitle .remove {
    float: right;
}

/*
 * Component List
 */
#addComponent {
    margin: 10px;
}

#componentList {
    display: none;
    position: absolute;
    left: 0;
    top: 0;
    background: rgba(0, 0, 0, 0.9);
    width: 100%;
    height: 100%;
    padding: 15px 20px;
    z-index: 10;

    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -ms-box-sizing: border-box;
    -o-box-sizing: border-box;
    box-sizing: border-box;
}
#componentList .close {
    float: right;
    width: 16px;
}
#componentList ul {
    margin-top: 15px;
    list-style: none;
}
#componentList li {
    float: left;
    width: 50%;
    margin-bottom: 10px;
}
#componentList li button {
    display: block;
    margin: 0 auto;
    width: 95%;
    text-align: center;
}

/*
 * Windows
 */
.window {
    position: absolute;
    border: 1px solid #999;
    background: rgba(51, 51, 51, 0.8);

    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.windowTitle {
    display: block;
    padding: 5px 10px;
    color: #ccc;
    text-transform: uppercase;
    font-weight: bold;
    background: #222;
    cursor: move;
}
.windowTitle .close {
    float: right;
    width: 16px;
    padding: 0;
}

#toolBox {
    width: 100px;
    left: 20px;
    top: 60px;
}
#toolBox select {
    width: 100%;
    background: #000;
    color: #ccc;
}

#levelCodeWindow {
    display: none;
    width: 300px;
    height: 150px;
    left: 100px;
    top: 100px;
}
#levelCodeWindow textarea {
    border: 0;
    background: black;
    font-family: Consolas, monaco, Helvetica, monospace;
    font-size: 11px;
    color: #ccc;
    width: 100%;
    height: 125px;
    padding: 5px;

    resize: none;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -ms-box-sizing: border-box;
    -o-box-sizing: border-box;
    box-sizing: border-box;
}

#levelLoadWindow {
    display: none;
    left: 50px;
    top: 50px;
    width: 400px;
    height: 250px;
}

.levelListWrap {
    width: 50%;
    height: 225px;
    float: left;
}
.levelListTitle {
    border-right: 1px solid #111;
    border-bottom: 1px solid #111;
    background: #333;
    cursor: default;
}
.levelList {
    height: 200px;
    overflow-y: scroll;
}
.levelList button {
    width: 100%;
}
