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

:root {
  --bg: #fff0f6;
  --panel: #ffffff;
  --bubble-bot: #ffe3ef;
  --bubble-user: #ff7eb6;
  --text: #5b2a3f;
  --muted: #c98aa8;
  --accent: #ff66a3;
  --accent-soft: #ffd6e8;
}

body {
  font-family: "Quicksand", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  background:
    radial-gradient(circle at 20% 20%, #ffd9ec 0%, transparent 55%),
    radial-gradient(circle at 80% 80%, #ffc2dd 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.chat-container {
  width: 100%;
  max-width: 480px;
  height: 90vh;
  max-height: 800px;
  background: var(--panel);
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(255, 105, 170, 0.35);
  border: 2px solid var(--accent-soft);
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  background: linear-gradient(135deg, #ff9ec7, #ff66a3 55%, #ff8fc4);
  color: #fff;
}

.chat-header .avatar {
  font-size: 28px;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(255, 102, 163, 0.4);
}

.chat-header h1 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.chat-header .status {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 2px;
}

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

.msg {
  display: flex;
}

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

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

.bubble {
  max-width: 76%;
  padding: 11px 15px;
  border-radius: 18px;
  line-height: 1.55;
  font-size: 14px;
  word-wrap: break-word;
  font-weight: 500;
}

.msg.bot .bubble {
  background: var(--bubble-bot);
  color: var(--text);
  border-bottom-left-radius: 6px;
}

.msg.user .bubble {
  background: linear-gradient(135deg, #ff8fc4, #ff66a3);
  color: #fff;
  border-bottom-right-radius: 6px;
  box-shadow: 0 4px 12px rgba(255, 102, 163, 0.3);
}

.typing .bubble {
  font-style: italic;
  color: var(--muted);
}

.chat-input {
  display: flex;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid var(--accent-soft);
  background: #fff5fa;
}

.chat-input input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--accent-soft);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  outline: none;
  font-family: inherit;
  font-weight: 500;
}

.chat-input input::placeholder {
  color: var(--muted);
}

.chat-input input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 102, 163, 0.18);
}

.chat-input button {
  padding: 0 22px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff8fc4, #ff66a3);
  color: white;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s, opacity 0.2s;
  box-shadow: 0 6px 16px rgba(255, 102, 163, 0.35);
}

.chat-input button:hover {
  transform: translateY(-1px);
}

.chat-input button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
