img {
  image-rendering: crisp-edges;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-optimize-contrast;
}

body {
  background-image: url(assets/bg.png);
  background-position: center;
  font-family: "Trebuchet MS", sans-serif;
}
#main {
  width: 768px;
  height: 432px;
  margin: 64px auto 0;
  padding: 10px;
  background: #000;
  border: 8px solid #333;
}
#main > * {
  display: none
}

.g-splash {
  width: 100%;
  height: 100%;
  background: #555;
  color: #999;
  text-align: center;
}

.g-splash h1 {
  font-family: Tahoma;
  font-weight: normal;
  color: #ccd;
  margin-top: 0;
  padding-top: 1em;
}

.g-splash :link {
  color: #ddd;
  font-weight: bold;
  text-decoration: none;
}

.menu {
  position: relative;
  color: #666;
  height: 100%;
}

.menu input[type='text'] {
  border: none;
  background: #434;
  color: #aab;
  padding-left: 4px;
}

.menu input[type='submit'], button {
  background: #224;
  color: #aab;
}

/* lobby */

.g-lobby > div {
  margin: 5px;
  padding: 5px;
}

.g-lobby .s-player {
}

.g-lobby .s-games {
  position: absolute;
  top: 32px;
  bottom: 32px;
  left: 0;
  right: 0;
  border: 1px dotted #444;
  border-width: 1px 0;
}

.g-lobby .s-host {
  position: absolute;
  bottom: 0px;
}

.g-lobby .game {
  cursor: pointer;
  margin: 5px 0;
}

.g-lobby .game:hover {
  background: #111;
}

.g-lobby .flag {
  display: inline-block;
  width: 32px;
}

/* pregame */

.s-game {
  width: 100%;
  border-bottom: 1px dotted #444;
}

.g-pregame .s-players {
  position: absolute;
  left: 0;
  top: 32px;
  width: 256px;
  bottom: 0;
  border-right: 1px dotted #444;
}

.g-pregame .s-co-players {
  position: absolute;
  left: 261px;
  right: 0;
  top: 32px;
  bottom: 0;
}

.g-pregame .s-co-players > * + * {
  border-top: 1px dotted #444;
  margin: 10px 0;
}

.g-pregame .s-chat-line {
  position: absolute;
  bottom: 0px;
  width: 100%;
  border-top: 1px dotted #444;
  padding-top: 5px;
}

.g-pregame .s-chat-log {
  height: 300px;
  overflow-y: auto;
}

.g-pregame .i-chat {
  width: 400px;
}

.g-pregame .i-say {
  width: 64px;
}

.g-pregame .name {
  color: white;
  margin-right: 1em;
}

/* win */
.g-end .s-end {
  text-align: center;
  margin-top: 3em;
  font-size: 2em;
}

/* wait */
.g-wait .s-message {
  font-size: large;
  text-align: center;
  margin-top: 6em;
}


/* error */

.g-error {
  padding-left: 10px;
}

.g-error .s-error {
  font-family: monospace;
}

#controls {
  text-align: center;
  margin: 10px auto;
  color: rgba(0,0,0,0.5);
  padding: 5px;
}
