.chat-container {
  max-width: 700px;
  margin: 2rem auto;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 4px 12px var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 500px;
}

.chat-header {
  background: linear-gradient(135deg, var(--banana), var(--banana-dark));
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-header .avatar {
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.chat-header h2 {
  color: var(--leaf-dark);
  font-size: 1.1rem;
}

.chat-header .status {
  font-size: 0.8rem;
  color: var(--leaf-dark);
  opacity: 0.8;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message {
  max-width: 80%;
  padding: 0.75rem 1rem;
  border-radius: 16px;
  line-height: 1.4;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.message.user {
  align-self: flex-end;
  background: var(--leaf);
  color: white;
  border-bottom-right-radius: 4px;
}

.message.bot {
  align-self: flex-start;
  background: #f5f5f5;
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.chat-input-area {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid #eee;
}

.chat-input-area input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid #eee;
  border-radius: 25px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.chat-input-area input:focus {
  border-color: var(--leaf);
}

.chat-input-area button {
  background: var(--leaf);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.chat-input-area button:hover {
  background: var(--leaf-dark);
}

.chat-input-area button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.typing-indicator {
  display: none;
  align-self: flex-start;
  background: #f5f5f5;
  padding: 0.75rem 1rem;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
}

.typing-indicator span {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #999;
  border-radius: 50%;
  margin: 0 2px;
  animation: bounce 1.4s infinite ease-in-out;
}

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

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