@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

#main {
  width: 100vw;
  height: 95vh;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

#chatsListGroup {
  background: linear-gradient(135deg, #ed3876 0%, #e5a5e3 100%);
  border-radius: 10px;
  width: 30vw;
  height: 90vh;
  min-width: 400px;
  display: flex;
  flex-direction: column;
}

#chatSelectorContainer {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chatDiv {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 7%;
  align-items: center;
}

.chatBtn {
  background: linear-gradient(163deg, #ffffff 0%, #ffa2fc 100%);
  border-color: #852085;
  width: 95%;
  height: 90%;
  border-radius: 5px;
}

.chatContainer {
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  width: 50vw;
  height: 90vh;
  min-width: 330px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

h1 {
  padding: 20px;
  border-bottom: 2px solid #667eea;
  color: #333;
  text-align: center;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message {
  padding: 10px 15px;
  border-radius: 5px;
  word-wrap: break-word;
  animation: slideIn 0.3s ease;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.join {
  padding: 10px 15px;
  border-radius: 20px;
  word-wrap: break-word;
  animation: slideIn 0.3s ease;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.icon {
  width: 35px;
  height: 35px;
}

.input-group {
  display: flex;
  gap: 10px;
  padding: 20px;
  border-top: 2px solid #f0f0f0;
  width: 100%;
}

.textInput {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s;
  width: 30%;
}

#messageInput:focus {
  border-color: #667eea;
}

.sendBtn {
  padding: 10px 20px;
  background: #735aa3;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.sendBtn:hover {
  background: #764ba2;
}

.sendBtn:active {
  transform: scale(0.98);
}

/**/

#loginTitle {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.menuInput {
  flex: 1;
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  outline: none;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.menuInput::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.logContainer {
  background: linear-gradient(135deg, #7b61ff 0%, #ff5eaa 100%);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  border-radius: 14px;
  width: 100%;
  height: 36vh;
  max-width: 420px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  color: #efc7fff5;
  text-align: center;
}

.logContainer button.menuBtn {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  transition:
    background 0.15s ease,
    transform 0.08s ease;
}

.logContainer button.menuBtn:hover {
  background: rgba(255, 255, 255, 0.18);
}

/*para celular*/
@media (max-width: 768px) {
  #main {
    flex-direction: column;
  }

  #chatsListGroup {
    width: 90vw;
    height: 30vh;
  }
  #chatsListGroup .chatBtn {
    height: 15vh;
  }

  .chatContainer {
    width: 90vw;
    height: 60vh;
  }

  #chatSelectorContainer {
    display: flex;
  }

  .chatDiv {
    height: 50%;
  }
}
