* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
  background: linear-gradient(145deg, #e0e7f0, #f4f7fb);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* chat card */
.chat-container {
  width: 100%;
  max-width: 480px;
  background: #ffffffd9;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: #ffffff;
  border-radius: 36px;
  box-shadow: 0 30px 60px -20px rgba(0,20,40,0.25), 0 8px 20px -8px rgba(0,0,0,0.15);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.5);
  transition: transform 0.2s ease;
  animation: floatIn 0.6s cubic-bezier(0.16,1,0.3,1);
}

@keyframes floatIn {
  0% { opacity: 0; transform: translateY(30px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* header */
.chat-header {
  padding: 24px 26px 16px;
  border-bottom: 1px solid #eef2f6;
  display: flex;
  align-items: center;
  gap: 12px;
}

.bot-avatar {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  box-shadow: 0 6px 12px #2563eb40;
}

.header-text h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.3px;
}

.header-text p {
  font-size: 0.85rem;
  color: #475569;
  margin-top: 2px;
}

/* messages area */
.messages {
  height: 360px;
  overflow-y: auto;
  padding: 20px 20px 10px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #f9fcff;
  scroll-behavior: smooth;
}

/* bubble common style */
.message {
  display: flex;
  align-items: flex-end;
  max-width: 85%;
  animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.user-message {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.bot-message {
  align-self: flex-start;
}

.bubble {
  padding: 14px 18px;
  border-radius: 26px;
  font-size: 0.95rem;
  line-height: 1.45;
  word-break: break-word;
  box-shadow: 0 3px 10px rgba(0,0,0,0.03);
}

.user-message .bubble {
  background: #2563eb;
  color: white;
  border-bottom-right-radius: 6px;
  border-bottom-left-radius: 22px;
}

.bot-message .bubble {
  background: #eef2f6;
  color: #1e293b;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 22px;
}

/* typing indicator */
.typing-indicator {
  display: flex;
  gap: 5px;
  padding: 14px 20px;
  background: #eef2f6;
  border-radius: 32px;
  border-bottom-left-radius: 6px;
  align-self: flex-start;
  margin-bottom: 4px;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: #64748b;
  border-radius: 50%;
  display: inline-block;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; background: #2563eb; }
}

/* input area */
.input-area {
  padding: 20px 24px 24px;
  background: white;
  border-top: 1px solid #e9edf2;
  display: flex;
  gap: 10px;
  align-items: center;
}

.input-area input {
  flex: 1;
  padding: 16px 22px;
  border: 2px solid #e2e8f0;
  border-radius: 50px;
  font-size: 1rem;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
  background: #f8fafc;
}

.input-area input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37,99,235,0.15);
  background: #ffffff;
}

.input-area button {
  width: 58px;
  height: 58px;
  border-radius: 40px;
  background: #2563eb;
  border: none;
  color: white;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.15s ease;
  box-shadow: 0 8px 16px -6px #2563eb80;
  flex-shrink: 0;
}

.input-area button:hover {
  background: #1d4ed8;
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 14px 22px -8px #1e3a8a;
}

.input-area button:active {
  transform: scale(0.97) translateY(2px);
  box-shadow: 0 4px 8px -2px #1e3a8a;
}

.input-area button:disabled {
  opacity: 0.5;
  pointer-events: none;
  background: #94a3b8;
  box-shadow: none;
}

/* small note */
.footer-note {
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 6px;
  padding-bottom: 6px;
}

/* scrollbar */
.messages::-webkit-scrollbar {
  width: 6px;
}
.messages::-webkit-scrollbar-track {
  background: #eef2f6;
}
.messages::-webkit-scrollbar-thumb {
  background: #b9c7da;
  border-radius: 10px;
}