html {
  min-height: 100%;
  background-image: url("/background.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
}

a {
  color: white;
}

#new_message {
  margin-left: 2px;
  width: 590px;
}

.emoji_popup {
  position: relative;
  display: inline-block;
  margin-bottom: 25px;
}

.emoji_popup .emojis {
  visibility: hidden;
  width: 160px;
  background-color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px 0;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -80px;
  box-shadow: 1px 1px 3px rgba(0,0,0,.5);
}

.emoji_popup .show {
  visibility: visible;
  -webkit-animation: fadeIn 0.5s;
  animation: fadeIn 0.5s;
}

@-webkit-keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity:1 ; }
}

.overlay {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.5);
  transition: opacity 500ms;
  visibility: hidden;
  opacity: 0;
}

.overlay:target {
  visibility: visible;
  opacity: 1;
}

.popup {
  margin: 70px auto;
  padding: 20px;
  background: #fff;
  color: black;
  border-radius: 5px;
  min-width: 30%;
  max-width: 80%;
  width: max-content;
  max-height: calc(100vh - 180px);
  overflow: auto;
  position: relative;
  transition: all 5s ease-in-out;
}

.popup .close {
  position: absolute;
  top: 20px;
  right: 30px;
  transition: all 200ms;
  font-size: 30px;
  font-weight: bold;
  text-decoration: none;
  color: #333;
}

.popup .close:hover {
  color: orange;
}

.popup .content img {
  display: block;
}

.messages {
  display: flex;
  flex-direction: column;
  width: 700px;
}

.message {
  border: solid;
  margin: 2px;
  padding: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: none;
}

@media (max-width: 700px) {
  #new_message {
    width: calc(100vw - 140px);
  }
  
  .messages {
    width: 100%;
  }
}