* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #eae6df; /* WhatsApp Web background color */
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.hidden {
  display: none !important;
}

/* --- Login Screen --- */
.login-container {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #128C7E;
}

.login-card {
  background: white;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  text-align: center;
  width: 90%;
  max-width: 400px;
}

.login-card h2 { color: #333; margin-bottom: 10px; }
.login-card p { color: #777; margin-bottom: 20px; }

.login-card input {
  width: 100%;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 15px;
  font-size: 16px;
  outline: none;
}

.login-card button {
  width: 100%;
  padding: 15px;
  background: #25D366;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.login-card button:hover { background: #128C7E; }

/* --- Chat Screen --- */
.chat-container {
  width: 100%;
  max-width: 600px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #e5ddd5;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.chat-header {
  background: #075E54;
  color: white;
  padding: 15px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.avatar {
  width: 40px;
  height: 40px;
  background: #ccc;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 15px;
  font-size: 20px;
  color: white;
}

.status h3 { font-size: 18px; margin: 0; }
.status p { font-size: 12px; margin: 0; color: #d1d1d1; }

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  /* WhatsApp like background pattern */
  background-image: url("https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png");
}

/* Message Bubbles */
.message-wrapper {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
}

.message {
  max-width: 75%;
  padding: 10px 15px;
  border-radius: 15px;
  font-size: 15px;
  position: relative;
  word-wrap: break-word;
  box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

/* Sender (You) */
.sent {
  align-self: flex-end;
}
.sent .message {
  background: #dcf8c6;
  border-bottom-right-radius: 0;
}
.sent .username { display: none; } /* নিজের নাম দেখার দরকার নেই */

/* Receiver (Others) */
.received {
  align-self: flex-start;
}
.received .message {
  background: white;
  border-bottom-left-radius: 0;
}
.received .username {
  font-size: 12px;
  font-weight: bold;
  color: #075E54;
  margin-bottom: 5px;
  display: block;
}

.time {
  font-size: 10px;
  color: #888;
  text-align: right;
  margin-top: 5px;
  display: block;
}

/* --- Input Area --- */
.chat-input {
  display: flex;
  padding: 10px;
  background: #f0f0f0;
  align-items: center;
}

.chat-input input {
  flex: 1;
  padding: 15px;
  border-radius: 30px;
  border: none;
  outline: none;
  font-size: 15px;
  background: white;
}

.chat-input button {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #008f68;
  color: white;
  border: none;
  margin-left: 10px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  transition: 0.3s;
}

.chat-input button:hover {
  background: #007555;
}

/* Mobile responsive fixes */
@media (max-width: 600px) {
  .chat-container { height: 100vh; max-width: 100%; }
}
