* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f0f2f5;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.chat-container {
  width: 100%;
  max-width: 480px;
  height: 90vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  background: #075e54;
  color: #fff;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #128c7e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.header-info h1 {
  margin: 0;
  font-size: 16px;
}

.status {
  font-size: 12px;
  opacity: 0.85;
}

.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message {
  display: flex;
}

.message.user {
  justify-content: flex-end;
}

.message.bot {
  justify-content: flex-start;
}

.bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  line-height: 1.5;
  font-size: 14px;
  white-space: pre-wrap;
}

.message.user .bubble {
  background: #dcf8c6;
  color: #111;
  border-bottom-right-radius: 4px;
}

.message.bot .bubble {
  background: #f1f1f1;
  color: #111;
  border-bottom-left-radius: 4px;
}

.quick-replies {
  display: flex;
  gap: 8px;
  padding: 8px 16px;
  overflow-x: auto;
  border-top: 1px solid #eee;
}

.quick-replies button {
  background: #fff;
  border: 1px solid #075e54;
  color: #075e54;
  border-radius: 16px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.quick-replies button:hover {
  background: #075e54;
  color: #fff;
}

.chat-input {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #eee;
  background: #fafafa;
}

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

.chat-input button {
  background: #075e54;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
}

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

.typing {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: #f1f1f1;
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}

.typing span {
  width: 8px;
  height: 8px;
  background: #999;
  border-radius: 50%;
  animation: bounce 1.2s infinite ease-in-out;
}

.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

@media (max-width: 520px) {
  .chat-container {
    height: 100vh;
    border-radius: 0;
    max-width: 100%;
  }
}
