body {
  font-family: Arial, sans-serif;
  margin: 0;
  background-color: #242e34;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  overflow: hidden; /* Prevent scrolling when modal is open */
}

#chat-box {
  width: 90%;
  height: 400px;
  border: 1px solid #ccc;
  border-radius: 0px 0px 8px 8px;
  background: #252331;
  overflow-y: auto;
  padding: 10px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
}

.message {
  margin: 5px 0;
  padding: 5px;
  border-radius: 10px;
  max-width: 60%;
  word-wrap: break-word;
}

.nameContainer {
  display: block;
  color: rgba(110, 240, 110, 0.453);
  margin: 0;
}

.dataContainer {
  display: block;
  color: whitesmoke;
  margin: 0;
  text-align: right;
}

.client {
  background-color: #2c6ffc;
  align-self: flex-end;
  color: white;
}

.server {
  background-color: #343145;
  align-self: flex-start;
  color: white;
}

#input-box {
  display: flex;
  width: 30%;
  position: fixed;
  bottom: 10px;
}

#message-input {
  flex: 1;
  padding: 10px;
  border-radius: 4px;
  margin-right: 10px;
  background-color: #1e1c26;
  color: white;
  border: none;
  outline: none;
}

#send-btn {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#send-btn:hover {
  background-color: #0056b3;
}

/* CSS to get user name */
#mainContent {
  display: none;
  width: 30%;
}
.modal-content {
  background-color: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}
.userName {
  padding: 4%;
  width: 92%;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-bottom: 20px;
}
button {
  padding: 10px 15px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Chat Header */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #ddd;
  color: white;
  padding: 10px;
  width: 90%;
  border: 1px solid #ccc;
  background-color: #252331;
}

.group-image {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 10px;
}

.group-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.group-info {
  display: flex;
  flex-direction: column;
}

.online-indication {
  float: right;
  margin-right: 25px;
  margin-top: 2px;
  width: 10px;
  height: 10px;
  background-color: #28a745;
  border-radius: 100px;
}

.group-name {
  font-size: 18px;
  font-weight: bold;
}

.member-count {
  font-size: 14px;
}

.usernames {
  flex-grow: 1;
  margin: 0 20px;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.more {
  color: #007bff;
  cursor: pointer;
}

.more:hover {
  text-decoration: underline;
}

.header-actions {
  display: flex;
  align-items: center;
}

.action-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.action-btn:hover {
  color: #007bff;
}

/* For Mobile Screen */

@media (max-width: 425px) {
  #mainContent {
    position: absolute;
    top: 10px;
    left: 15px;
    width: 350px;
  }
  #input-box {
    display: flex;
    width: 90%;
    position: fixed;
    bottom: 10px;
  }
  #chat-box {
    height: 450px;
  }
}
