* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Tahoma, Arial, sans-serif;
}

body {
  background: linear-gradient(135deg, #f5f7fb, #e9eef8);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-wrapper {
  width: 100%;
  max-width: 420px;
}

.login-card {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  padding: 32px 24px;
  text-align: center;
}

.login-card h1 {
  margin-bottom: 10px;
  color: #111827;
}

.login-card p {
  color: #6b7280;
  margin-bottom: 20px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-form input {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #d1d5db;
  font-size: 15px;
  outline: none;
}

.login-form button {
  border: none;
  background: #2563eb;
  color: white;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 15px;
  cursor: pointer;
}

.error-box {
  background: #fee2e2;
  color: #991b1b;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 14px;
  font-size: 14px;
}

.chat-container {
  width: 100%;
  max-width: 950px;
  height: 88vh;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid #eef2f7;
}

.chat-header {
  background: #1f2937;
  color: white;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.chat-header h1 {
  font-size: 22px;
  font-weight: bold;
}

.chat-header span {
  display: block;
  font-size: 14px;
  color: #d1d5db;
  margin-top: 6px;
}


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

.notify-btn {
  border: none;
  background: #10b981;
  color: white;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
}

.notify-btn:hover {
  background: #059669;
}

.logout-btn {
  text-decoration: none;
  background: #ef4444;
  color: #fff;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
}

.chat-box {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  background: #f9fbff;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.message {
  max-width: 78%;
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.8;
  white-space: pre-line;
  font-size: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.message-sender {
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 6px;
  opacity: 0.85;
}

.message-text {
  margin-bottom: 8px;
  word-wrap: break-word;
}

.message-time {
  font-size: 12px;
  opacity: 0.7;
}

.me {
  align-self: flex-start;
  background: #2563eb;
  color: white;
  border-bottom-left-radius: 6px;
}

.other {
  align-self: flex-end;
  background: white;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-bottom-right-radius: 6px;
}

.chat-input {
  padding: 18px;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 12px;
}

.chat-input input {
  flex: 1;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #d1d5db;
  font-size: 15px;
  outline: none;
}

.chat-input input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.chat-input button,
.login-form button:hover,
.chat-input button:hover {
  background: #1d4ed8;
}

.chat-input button {
  border: none;
  color: white;
  padding: 0 22px;
  border-radius: 14px;
  font-size: 15px;
  cursor: pointer;
  background: #2563eb;
}

@media (max-width: 640px) {
  .chat-container {
    height: 92vh;
    border-radius: 18px;
  }

  .message {
    max-width: 90%;
  }

  .chat-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .chat-header h1 {
    font-size: 18px;
  }
}
