html,
body {
  margin: 0;
  padding: 0;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-style: normal;
  background-color: #000;
  color: #fff;
  height: 100%;
  width: 100%;
}

h1 {
  margin: 0;
  text-shadow: 0 0 4px #ea2fb5, 0 0 8px #2b65ff;
  text-align: center;
  font-size: 2em;
  color: blanchedalmond;
}

h2 {
  text-align: center;
  color: blanchedalmond;
  font-size: 1.5em;
}

p {
  color: #aaa;
  text-align: center;
}

#game_message {
  font-size: 1.8em;
  color: blanchedalmond;
  margin: 0 8px;
  text-shadow: 0 0 4px #ea2fb5, 0 0 8px #2b65ff;
}

#info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 2px solid #fff;
  padding: 12px;
  margin: 16px;
  border-radius: 8px;
}

input[type="text"] {
  width: 100%;
  padding: 9px 15px;
  margin: 8px 0;
  display: inline-block;
  border-radius: 8px;
  box-sizing: border-box;
  text-align: center;
  font-size: large;
  max-width: 300px;
}

input {
  border: 1px solid #777;
  background-color: #111;
  color: #fff;
}

input[type="text"]:focus {
  outline: none;
  border: 1px solid blueviolet;
  background-color: #333;
}

button {
  background-color: blueviolet;
  border: none;
  color: white;
  padding: 10px 16px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  cursor: pointer;
  border-radius: 8px;
  width: 100%;
  max-width: 300px;
}

.error {
  color: red;
  font-size: 14px;
}

.loader {
  border: 16px solid #f3f3f3;
  border-top: 16px solid blueviolet;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 2s linear infinite;
  margin: 24px auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.message-container {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 4px;
}

.send-button {
  padding: 8px;
  font-size: medium;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 2;
}

#game_chat {
  display: flex;
  height: 100%;
  gap: 8px;
  box-sizing: border-box;
  align-items: stretch;
}

#chat_feature {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
  background-color: #333;
  border-radius: 8px;
  flex: 3;
  box-sizing: border-box;
  border: 2px solid #fff;
  height: 100%;
}

#messages {
  padding: 4px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  margin-top: auto;
  width: 100%;
}

.sender {
  font-size: 12px;
  color: #aaa;
}

.message {
  max-width: 70%;
  margin: 4px 0;
  padding: 6px 8px;
  word-wrap: break-word;
}

.message.self {
  align-self: flex-end;
  background-color: blueviolet;
  color: white;
  border-radius: 8px 8px 0 8px;
}

.message.other {
  align-self: flex-start;
  background-color: #aaa;
  color: black;
  border-radius: 8px 8px 8px 0;
}

.reaction {
  display: flex;
  gap: 4px;
  padding: 4px 8px;
  margin: 0;
  flex-wrap: wrap;
  justify-content: space-between;
}

.reaction p {
  margin: 0;
  background-color: #555;
  border-radius: 6px;
  padding: 5px 8px;
  color: white;
  cursor: pointer;
}

.bubble {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: blueviolet;
  color: white;
  padding: 8px 16px;
  border-radius: 16px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
  animation: fadeOut 3s ease-in-out forwards;
  opacity: 1;
  z-index: 9999;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  40% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 14px;
  }

  h2 span {
    font-size: 1.2em;
  }

  h2 {
    font-size: 1.2em;
  }

  h1 {
    font-size: 1.6em;
  }

  #chat_feature {
    width: 100%;
    min-height: 300px;
    max-height: 50%;
  }

  #chat_feature h2 {
    padding: 4px;
  }

  #game_chat {
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
  }

  .bottom {
    display: none;
  }

  .top {
    display: flex !important;
  }
}
