* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f3f4f6;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.chat-container {
  width: 90%;
  max-width: 850px;
  height: 85vh;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

header {
  background: #1e293b;
  color: white;
  padding: 20px;
}

header h2 {
  margin: 0 0 8px;
}

header p {
  margin: 0;
  color: #cbd5e1;
  font-size: 13px;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.message p {
  margin: 0 0 8px;
}

.message p:last-child {
  margin-bottom: 0;
}

.user {
  align-self: flex-end;
  background: #2563eb;
  color: white;
}

.assistant {
  align-self: flex-start;
  background: #f1f5f9;
  color: #1e293b;
}

form {
  display: flex;
  padding: 15px;
  border-top: 1px solid #e5e7eb;
  gap: 10px;
}

input {
  flex: 1;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  min-width: 0;
}

button {
  padding: 12px 22px;
  border: none;
  background: #2563eb;
  color: white;
  border-radius: 8px;
  cursor: pointer;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}