body {
  font-family: Segoe UI, Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  background: linear-gradient(135deg, #4f94d4, #a8c0ff);
  color: #333;
}

#chat-container {
  width: 500px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

#messages {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  overflow-y: auto;
  max-height: 70vh;
  display: none;
  word-wrap: break-word;
}

#form {
  display: flex;
  margin-top: 10px;
  display: none;
}

#input {
  flex: 1;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #d4d4d4;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background 0.3s;
}

#input:focus {
  background: rgba(255, 255, 255, 1);
  border-color: #7aadf5;
  outline: none;
}

#sendBtn, #joinBtn {
  padding: 10px 15px;
  font-size: 16px;
  border-radius: 5px;
  background: linear-gradient(to bottom, #e1f0ff, #7aadf5);
  border: 1px solid #7aadf5;
  color: white;
  cursor: pointer;
  transition: background 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#sendBtn:hover {
  background: linear-gradient(to bottom, #b9daff, #5390d9);
}

.message {
  display: flex;
  align-items: flex-start;
  margin-bottom: 15px;
}

.message img {
  border-radius: 50%;
  width: 50px;
  height: 50px;
  margin-right: 10px;
  border: 1px solid #ddd;
}

.message-content {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.8);
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(8px);
}

.message-username {
  font-weight: bold;
  color: #333;
}

.system-message {
  color: blue;
  text-align: center;
  margin-bottom: 10px;
  font-style: italic;
}

#username {
  width: 80%;
  padding: 10px;
  font-size: 16px;
  margin-bottom: 10px;
  border: 1px solid #d4d4d4;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background 0.3s;
}

#username:focus {
  background: rgba(255, 255, 255, 1);
  border-color: #7aadf5;
  outline: none;
}

#profilePic {
  padding: 10px;
  font-size: 16px;
  border: 1px solid #d4d4d4;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
  cursor: pointer;
  transition: background 0.3s;
}

#profilePic:hover {
  background: rgba(255, 255, 255, 1);
}

#joinBtn:hover {
  background: linear-gradient(to bottom, #b9daff, #5390d9);
}
