/* Base styles */
body {
  font-family: Arial, sans-serif;
  background-color: #f8f9fa;
  margin: 0;
  padding: 0;
  font-size: 1rem; /* base font */
}

h2, h3 {
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.75rem;
}

/* Users list */
ul#users li {
  cursor: pointer;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background-color: #fff;
  border-radius: 0.5rem;
  border: 1px solid #dee2e6;
  font-size: 1rem;
  transition: background-color 0.2s;
}
ul#users li:hover {
  background-color: #e9ecef;
}

/* Chat container */
#messages {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 1rem;
  background-color: #ffffff;
  border-radius: 0.75rem;
  border: 1px solid #dee2e6;
}

/* Chat bubble */
.message {
  max-width: 80%;
  padding: 0.7rem 1rem;
  margin: 0.5rem 0;
  border-radius: 1rem;
  word-wrap: break-word;
  font-size: 1rem;
}
.message.sent {
  align-self: flex-end;
  background-color: #0d6efd;
  color: white;
  border-bottom-right-radius: 0.5rem;
}
.message.received {
  align-self: flex-start;
  background-color: #e9ecef;
  color: black;
  border-bottom-left-radius: 0.5rem;
}

/* Message Input */
.input-group input {
  padding: 0.75rem;
  font-size: 1rem;
}

/* Buttons */
.btn {
  font-size: 1rem;
  padding: 0.6rem 1rem;
}

/* Responsive rules for mobile screens */
@media (max-width: 576px) {

  body {
    font-size: 1.1rem; /* slightly bigger on phones */
  }

  h2, h3 {
    font-size: 1.4rem;
  }

  ul#users li {
    font-size: 1rem;
    padding: 0.85rem 1rem;
  }

  .message {
    font-size: 1rem;
    padding: 0.85rem 1.1rem;
  }

  .input-group input {
    font-size: 1rem;
    padding: 0.85rem;
  }

  .btn {
    font-size: 1rem;
    padding: 0.75rem 1rem;
  }
}