html {
  font-family: lores-21-serif, sans-serif;
}

body {
  margin: 0;
  background: #002144;
  height: 100vh;
  overflow: hidden;
}

main {
  display: grid;
  grid-template-rows: 85vh 15vh;
  height: 100vh;
  color: #222;
}

form {
  padding: 2%;
}

textarea {
  background: none;
  border: 1px solid #FFF;
  border-radius: 10px;
  color: #FFF;
  font-family: lores-21-serif, sans-serif;
  font-size: 1.5em;
}

button {
    font-family: lores-21-serif, sans-serif;
}

form > textarea, form > button {
  width: 95%;
  display: block;
  margin: 1% auto;
}

form > input {
  width: 100%;
}

#chatLogin {
  position: relative;
  top: 50%;
  width: 50vw;
  height: inherit;
  margin: 0 auto;
  background: #222;
  border-radius: 10px;
  color: #FFF;
  padding: 2%;
  transform: translateY(-50%);
}

#chatLogin form > button {
  font-size: 2em;
  background: #F00;
  border: 0;
  color: #FFF;
  width: 20%;
  border-radius: 10px;
}

#chatLogin form > input {
  border: 0;
  border-bottom: 1px solid #FFF;
  background: none;
  font-size:2em;
  font-family: lores-21-serif, sans-serif;
  color: #FFF;
}

#chat-mgmt form {
  display: grid;
  grid-template-columns: 90% 10%;
}

#chat-mgmt form > button {
  border: none;
  font-size: 2em;
  color: #FFF;
  background: #222;
  border-radius: 10px;
  width: 50%;
  height: 50%;
  position: relative;
  transform: translateY(-50%);
  top: 50%;
  background: #F00;
}

#chat-window {
  color: #FFF;
  margin: 2.5%;
  overflow-y: scroll;
  animation: .15s;
  width: 95vw;
  padding-right: 5%;
}

#chat-window > p {
  margin: .5%;
  font-size: 2rem;
}

#chat-window > p:first-child {
  margin: 0 0 5% 0;
}

#chat-window > p > .chat-msg {
  border-radius: 5px;
  text-shadow: 1px 1px #222;
  word-wrap: break-word;
}

#version {
  position: absolute;
  top: 0;
  right: 0;
  color: #FFF;
}

@media only screen and (max-width: 1024px) {

  main {
    grid-template-columns: auto;
    font-size: 1.5rem;
    grid-template-rows: 15vh 85vh;
  }

  #chat-mgmt {
    order: 1;
  }

  #chat-mgmt form {
    display: grid;
    grid-template-columns: 90% 10%;
    grid-template-rows: 100% 100%;
    height: 85%;
  }

  #chat-mgmt textarea {
    font-size: 2rem;
  }

  #chat-mgmt form > button {
    font-size: 2em;
    bottom: 0;
    width: 75%;
    position: relative;
  }

  #chat-window {
    order: 2
  }

  #chatLogin, #chatLogin input, #chatLogin button {
    font-size: 1em;
  }

  #chatLogin {
    width: 75vw;
  }
}
