/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body */
body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #dbeafe, #f8fafc);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: #FFEFBA;  /* fallback for old browsers */
background: -webkit-linear-gradient(to right, #FFFFFF, #FFEFBA);  /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to right, #FFFFFF, #FFEFBA); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */


} 

/* Chat Container */
.chat-container {
  width: 420px;
  height: 640px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.chat-header {
  background-color: #3b82f6;
  color: white;
  padding: 18px;
  font-size: 1.3em;
  font-weight: bold;
  text-align: center;
}

/* Messages */
.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f9fafb;
}

/* Bubbles */
.message {
  padding: 12px 18px;
  border-radius: 24px;
  max-width: 75%;
  word-wrap: break-word;
  font-size: 0.95em;
}

.sent {
  align-self: flex-end;
  background-color: #d1fae5;
  color: #065f46;
}

.received {
  align-self: flex-start;
  background-color: #f3f4f6;
  color: #111827;
}

/* Input Section */
.chat-input {
  display: flex;
  border-top: 1px solid #e5e7eb;
  padding: 10px;
  background: #f1f5f9;
}

.chat-input input {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  outline: none;
  font-size: 1em;
  transition: border 0.3s;
}

.chat-input input:focus {
  border-color: #3b82f6;
}

.chat-input button {
  background: #3b82f6;
  color: white;
  border: none;
  margin-left: 10px;
  padding: 0 20px;
  border-radius: 20px;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.3s;
}

.chat-input button:hover {
  background: #2563eb;
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
  width: 6px;
}
.chat-messages::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-track {
  background: #f1f5f9;
}