/* Styles here! */
body, input, button, pre {  /* font */
  font-family: 'Press Start 2P';
  font-weight: 400;
  -webkit-transition: all 1s ease-in;
  -moz-transition: all 1s ease-in;
}

body {
  background:#000;
  color:lime;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
}

body, html {
  width: 100%;
  height: 100%;
}

header {
  background: lime;
  color: black;
}

h1{
  margin: 0;
}

h1 a, h1 a:visited {
  color: black;
}

/* output */
  #output {
  	padding:0 20px;
    width: 50%;
    overflow-y: scroll;
    min-height: 0;
  }

  .game {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    flex-grow: 1;
    min-height: 0;
  }

  #display {
      position: relative;
      min-width: 0;
      width: 50%;
      min-height: 0;
      overflow: auto;
  }

  /* Pixel-art images shouldn't blur when scaled up, and shouldn't stretch
     even if width and height are set independently. */
  #display img {
      image-rendering: pixelated;
      image-rendering: crisp-edges;
      object-fit: contain;
  }


  #display iframe {
      width: 50%;
      height: 100%;
      position: fixed;
      left: 50%;
      top: 0;
      border: none;
      border-left: 1px solid lime;
  }

  #welcome {
    height: 50px;
    font-family: 'Press Start 2P', cursive;
    margin-bottom:3em;
    font-size: 0.8em;
  }

  pre {
    font-size: 1em;
    white-space: pre-wrap;
    white-space: -moz-pre-wrap;
    white-space: -pre-wrap;
    white-space: -o-pre-wrap;
    word-wrap: break-word;
  }

  pre.self {
    color:#f90;
  }

  pre.warn {
    opacity: 0.5;
  }

/* input area */
  #input {
    box-sizing: border-box;
    background:#333;
    padding:10px 2.5% 20px 2.5%;
  }

  #input label {
    display:block;
    font-size:16px;
    margin-bottom:10px;
  }

  #input input,
  #input button {
    font-size:21px;
    background:transparent;
    border:1px solid lime;
    color:lime;
    padding:10px 1%;
    outline: none;
  }

  #input input {
    float:left;
    width:75%;
  }

  #input button {
    float:right;
    background:#000;
    width:15%;
    cursor: pointer;
  }

  /* name modal */
  #name-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
  }
  #name-modal.modal-hidden {
    display: none;
  }
  #name-form {
    background: #333;
    padding: 30px;
    border: 1px solid lime;
    text-align: center;
    max-width: 90%;
  }
  #name-form label {
    display: block;
    color: lime;
    font-size: 21px;
    margin-bottom: 15px;
  }
  #name-form input,
  #name-form button {
    font-size: 21px;
    background: transparent;
    border: 1px solid lime;
    color: lime;
    padding: 10px;
    outline: none;
    margin: 5px;
  }
  #name-form button {
    background: #000;
    cursor: pointer;
  }

  /* kiosk welcome overlay */
  #kiosk-welcome {
    position: fixed;
    inset: 0;
    background: #000;
    color: lime;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    text-align: center;
    padding: 20px;
    cursor: none;
  }
  #kiosk-welcome.hidden {
    display: none;
  }
  #kiosk-welcome h1 {
    font-size: 48px;
    margin: 0 0 40px 0;
    color: lime;
  }
  #kiosk-welcome p {
    font-size: 24px;
    margin: 0;
  }
  #kiosk-welcome .blink {
    -webkit-animation: blinker 1.2s linear infinite;
    animation: blinker 1.2s linear infinite;
  }
  body.kiosk { cursor: none; }

  @keyframes blinker {
    50% { opacity: 0; }
  }
  @-webkit-keyframes blinker {
    from { opacity: 1.0; }
    to { opacity: 0.0; }
  }

  .error {
    -webkit-animation-name: blinker;
    -webkit-animation-iteration-count: 10;
    -webkit-animation-timing-function: cubic-bezier(1.0,0,0,1.0);
    -webkit-animation-duration: 0.5s;
  }


/* responsive */
  @media (max-width:480px) {
    header {
      padding: 10px;
    }
    h1{
      font-size:16px;
    }
    #output {
      margin: 2em 0 5em 0;
      padding:0 10px;
    }
    #welcome {
      font-size:8px;
      margin-bottom:0;
    }
    pre {
      font-size:1em;
    }
    #input {
      padding:5px 2.5% 10px 2.5%;
    }
    #input label {
      font-size:14px;
      margin-bottom:5px;
    }
    #input input,
    #input button {
      font-size:14px;
      padding:5px 1%;
    }
  }

pre.warn {
  opacity: 0.5;
}

div.room {
  width: 50px;
  height: 50px;
  background-color: red;
  /*display: inline-block;*/
  text-align: center;
  -webkit-transform: perspective(100px) rotateX(70deg);
}

div.room p.name {
  padding:0;
  margin:0;
  font-size: 12px;
  color: black;
}
