html {
  pointer-events: auto;
}
body {
  font: 14px "Helvetica Neue", "Helvetica", "Arial", sans-serif;

  background: black;
  margin: 0;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
  pointer-events: none;
}

#glRoom {
  display: block;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
}

#glPlayerView {
  display: block;
  position: absolute;
  top: 0;
  right: 0;
  width: 25vh;
  height: 25vh;
  border-bottom-right-radius: 1em;
  transform: scale(-1, 1);
}

#chat {
  position: absolute;
  bottom: 2em;
  left: 1em;
  top: 0;
  width: calc(100% - 2em);
  max-width: 30em;
  color: white;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

#chat > ul {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow: auto;
  flex: 1;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
}

#chat > ul > li {
  padding: 0.5em 0.75em;;
  border-radius: 1em;
  margin: 0.25em;
  background: rgba(100, 100, 100, 0.6);
  pointer-events: auto;
}

#chat > ul > li.self {
  align-self: flex-end;
}

#chatForm {
  margin-top: 0.5em;
  pointer-events: auto;
}

#chatForm > input {
  background: none;
  font: inherit;
  color: inherit;
  outline: none;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 0.75em;
  width: 100%;
  box-sizing: border-box;
  padding: 0.5em;
}

#chatForm > input:focus {
  border-color: white;
}

#touchmove {
  height: 25%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  margin-top: 1em;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25em;
  text-align: center;
  padding: 1em;
  pointer-events: auto;
}

body:not(.chatEnabled) #chat > ul {
  display: none;
}

body:not(.chatEnabled) #chatForm {
  display: none;
}

#buttons {
  position: absolute;
  top: 1.5em;
  right: calc(25vh + 1.5em);
  display: flex;
}

#buttons > button:not(:last-child) {
  margin-right: 1.5em;
}

#buttons > button {
  display: block;
  outline: none;
  cursor: pointer;
  pointer-events: auto;
  width: 3.25em;
  height: 3.25em;
  font: inherit;
  background: none;
  color: white;
  border: 0.15em solid white;
  border-radius: 1em;

}

#videoMutedEl, #audioMutedEl {
  color: #cc0000;
  font-weight: bold;
  background: rgba(0, 0, 0, 0.3);
  text-align: center;
  margin: 0.5em 0;
  padding: 0.25em 0.5em;
  border-radius: 0.125em;
}
