* {
  box-sizing: border-box;
  font-family: "Microsoft YaHei","PingFangSC-Regular","Heiti SC",Arial,Helvetica,sans-serif,"宋体";
}

html {
	height: 100%;
  font-size: 62.5%; /* 1em = 10px */
	background: rgb(255, 0, 0);/*DEBUG*/
	background: #fff;
  overflow: hidden;
}

body {
	margin: 0;
	padding: 0;
	height: 100%;
  font-size: 1.5em;
	background: rgb(0, 0, 255);/*DEBUG*/
	background: #fff;
  overflow: hidden;
}

textarea::-webkit-input-placeholder{
  transform: translateY(50%);
}

#top-banner {
  position: fixed;
  z-index: 5;
  width: 100%;
  height: 1.5em;
  /* margin: 0 auto; */
  padding: 0.2em;
  line-height: 1em;
  font-size: 5em;
  text-align: center;
  color: #ffffff;
  background-color: #b7eeff;
}

#top-links {
  padding: 1em;
  position: fixed;
  z-index: 6;
  top: 0;
  right: 0;
  color: #bb9167;
}

#top-links a,a:link,a:visited {
  text-decoration: none;
  color: #b7eeff;
  /* color: #000; */
}

#chat-form {
  height: 100%;
  overflow: hidden;
}

#roster {
  padding: 1em;
  position: fixed;
  z-index: 6;
  top: 0;
  height: 10em;
  /* border-left: none; */
  font-weight: bold;
  color: #67bba6;
}

#spacer {
  top: 0;
  /* height: 120px; */
}

#chatlog {
  height: 100%;
  border: solid #fff;
  border-width: 8em 1em 3em;
  overflow-y: auto;
  overflow-wrap: break-word;
}

#chatlog span.username {
  font-weight: bold;
}

#chatlog p.nonename {
  color: #67bba6;
}

p {
  margin-top: 0;
  margin-bottom: 8px;
}
p:last-of-type {
  margin: 0;
}

::-webkit-scrollbar {
  display: none;
}

@media(max-width:600px) {
  /* #roster { display: none; } */
  /* #chatlog { right: 0; } */
}

#chat-input {
  font-size: 1em;
  position: fixed;
  width: 100%;
  height: 3em;
  bottom: 0;
  left: 0;
  border: none;
  border-top: none;
  padding-left: 3em;
  outline: none;
  background: #0000001a;
}

#chat-form::before {
  z-index: 1;
  display: block;
  content: ">";
  position: fixed;
  bottom: 0;
  left: 0;
  width: 3em;
  height: 3em;
  line-height: 3em;
  text-align: center;
  font-weight: bold;
  color: #888;
  -webkit-text-stroke-width: 0.1em;
}

#user-form {
  position: fixed;
  z-index: 10;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin:0 auto;
  background-color: white;
}

#user-form p {
  position: fixed;
  top: calc(50% - 11em);
  width: 100%;
  text-align: center;
}

#user-form-name {
  position: fixed;
  font-size: 2em;
  top: calc(50% - 4em);
  left: calc(50% - 8em);
  width: 16em;
  height: 2em;
  text-align: center;
  border: 1px solid #bbb;
}

#user-form-pass {
  position: fixed;
  font-size: 2em;
  top: calc(50% - 1em);
  left: calc(50% - 8em);
  width: 16em;
  height: 2em;
  resize: none;
  text-align: center;
  vertical-align: middle;
  border: 1px solid #bbb;
}

#user-form-submit {
  position: fixed;
  font-size: 2em;
  top: calc(50% + 2em);
  left: calc(50% - 8em);
  width: 16em;
  height: 2em;
  text-align: center;
}

#room-form {
  position: fixed;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: white;
  font-size: 200%;
  margin-top: calc(50vh - 3em);
  text-align: center;
}

#room-name {
  font-size: inherit;
  border: 1px solid #bbb;
  height: 2em;
  width: 16em;
  padding-left: 1em;
}

#room-form button {
  font-size: inherit;
  border: 1px solid #bbb;
  background-color: #eee;
  height: 2em;
}

@media(max-width:660px) {
  #user-form, #room-form  { font-size: 150%; }
  #user-form input { font-size: 1.5em; }
  #user-form p { font-size: 75%; }
}
@media(max-width:500px) {
  #user-form, #room-form { font-size: 100%; }
  #user-form input { font-size: 1em; }
  #user-form p { font-size: 50%; }
}

#go-public {
  width: 4em;
}
#go-private {
  width: 20em;
}