* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  background: #ffffff;
  color: #1a1a1a;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  background: #003D4C;
  color: #ffffff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

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

.header-note {
  font-size: 11px;
  opacity: 0.75;
  margin-left: auto;
}

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

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

.message.bot {
  align-self: flex-start;
  background: #E6EEF0;
  color: #1a1a1a;
}

.message.user {
  align-self: flex-end;
  background: #003D4C;
  color: #ffffff;
}

.typing-indicator {
  align-self: flex-start;
  background: #E6EEF0;
  padding: 12px 20px;
  border-radius: 16px;
  display: flex;
  gap: 4px;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: #003D4C;
  border-radius: 50%;
  opacity: 0.4;
  animation: bounce 1.4s infinite;
}

.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); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

.input-bar {
  border-top: 1px solid #e0e0e0;
  padding: 8px 16px 16px;
  flex-shrink: 0;
  background: #ffffff;
}

.remaining {
  font-size: 11px;
  color: #666;
  text-align: center;
  padding-bottom: 6px;
  min-height: 18px;
}

.input-row {
  display: flex;
  gap: 8px;
}

#chat-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 24px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

#chat-input:focus {
  border-color: #003D4C;
}

#send-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: #003D4C;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

#send-btn:hover { opacity: 0.85; }
#send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

@media (max-width: 768px) {
  .header { flex-direction: column; align-items: flex-start; gap: 4px; }
  .header-note { margin-left: 0; }
  .message { max-width: 90%; }
}
