html, body {
	height: 100%;
	margin: 0;
	overflow: hidden;
	padding: 0;
	width: 100%;
}

body {
  background-color: #444;
}

#dialogs {
  position: absolute;
  width: 100%;
  height: 100%;
}

#dialogs[hidden] {
  display: none;
}

#dialogs .dialog[hidden] {
  display: none;
}

#gameinfo .dialog,
#dialogs .dialog {
  background-color: rgb(40,40,40);
  border: 1px solid #aaa;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  border-radius: 10px;
  color: white;
}

#dialogs .dialog {
  background-color: rgba(40,40,40,0.6);
  margin-top: 20px;
  margin-left: auto;
  margin-right: auto;
  width: 500px;
}

#dialogs .dialog > div {
  margin: 15px;
}

#dialogs .dialog > .tabs {
  border-bottom: 1px solid #ccc;
  display: -webkit-box;
  display: -moz-box;
  display: box;
  margin: 3px 0 0 0;
}

.tabs > div {
  border: 1px solid #ccc;
  cursor: default;
  margin-left: 3px;
  margin-bottom: -1px;
  padding: 3px;
}

.tabs > div[active] {
  border-bottom: 1px solid #555;
}

.tabs > div[disabled] {
  display: none;
}

h1, h2 {
  margin-top: 0;
}

h1 {
  font-size: 20px;
}

h2 {
  font-size: 18px;
}

.table {
  display: table;
}

.table > * {
  display: table-row;
}

.table > * > * {
  display: table-cell;
}

.controls > * > * {
  text-align: center;
  width: 125px;
}

.table > .header > * {
  font-weight: bold;
  padding-bottom: 10px;
}

.controls > * > *:first-child {
  text-align: left;
}

/* Direction key styling */
.directionkeys {
  margin-left: auto;
  margin-right: auto;
}

.directionkeys > tbody > tr > td {
  border: 1px solid white;
  -webkit-border-radius: 3px;
  -moz-border-radius: 3px;
  border-radius: 3px;
  border-spacing: 2px;
  text-align: center;
  width: 25px;
}

.directionkeys .empty {
  border: none;
}

#templates {
  display: none;
}

.fill {
  width: 100%;
}

.progress {
  border: 1px solid #888;
  -webkit-border-radius: 3px;
  -moz-border-radius: 3px;
  border-radius: 3px;
  background-color: black;
}

.progress > div {
  position: relative;
}

.progress > div > * {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  position: absolute;
  width: 0;
}

.progress > div > .bar {
  background-color: red;
  -webkit-border-radius: 3px;
  -moz-border-radius: 3px;
  border-radius: 3px;
  height: 8px;
  margin-top: -4px;
}

.progress > div > .energy-bar {
  background-color: white;
  -webkit-border-radius: 1px;
  -moz-border-radius: 1px;
  border-radius: 1px;
  border: 1px solid black;
  height: 4px;
  margin-top: -2px;
}

.player span {
  white-space: nowrap;
}

#dpad-overlay {
  bottom: 50px;
  position: absolute;
  right: 50px;
  display: none;
  height: 180px;
  width: 180px;
  -webkit-transform: rotate(45deg);
  -moz-transform: rotate(45deg);
  transform: rotate(45deg);
  z-index: 3;
}

#dpad-overlay > .power {
  border: 3px solid rgba(0, 0, 0, 0.4);
  bottom: 60px;
  left: 60px;
  position: absolute;
  right: 60px;
  top: 60px;
  -webkit-transform: rotate(-45deg);
  -moz-transform: rotate(-45deg);
  transform: rotate(-45deg);
}

#dpad {
  display: table;
  height: 180px;
  position: absolute;
  width: 180px;
}

body.touch #dpad-overlay {
  display: block;
}

body.touch .keyboard {
  display: none;
}

body .touch {
  display: none;
}

body.touch .touch {
  display: block;
}

#dpad > div {
  display: table-row;
}

#dpad > div > div {
  border: 3px solid rgba(0, 0, 0, 0.4);
  display: table-cell;
  vertical-align: middle;
}

#dpad-overlay div[active] {
  background-color: rgba(200, 200, 200, 0.4);
}

#dpad > div > div > div {
  width: 40px;
  height: 40px;
  margin: auto;
  border: 5px solid rgba(240, 240, 240, 0.5);
}

#dpad .up > div {
  border-bottom: none;
  border-right: none;
}
#dpad .right > div {
  border-bottom: none;
  border-left: none;
}
#dpad .left > div {
  border-right: none;
  border-top: none;
}
#dpad .down > div {
  border-left: none;
  border-top: none;
}

#dpad-overlay.left {
  left: 50px;
  right: auto;
}

#gameinfo .dialog {
  margin-left: auto;
  margin-right: auto;
  margin-top: 5px;
  overflow: hidden;
  padding: 5px;
  width: 80%;
}

#wormy-game-list .game-list-name-column {
  display: none;
}

#wormy-game-list > div:first-child {
  display: none;
}

.game-entry-header > * {
  border-bottom: 1px solid #ccc !important;
}

input, button {
  background: none;
  color: white;
}

.game-entry + .game-entry{
  cursor: pointer;
}

.game-entry + .game-entry:hover {
  font-weight: normal !important;
}
