@import url('https://fonts.googleapis.com/css2?family=Vazirmatn&display=swap');

:root {
  --bg: #f5f5f5;       /* Page background */
  --box: #ffffff;      /* Chat background */
  --input: #f0f0f0;    /* Input area */
  --user: #3a7f5d;     /* User messages */
  --bot: #e4e4e4;      /* Bot messages */
  --text: #222;        /* Text color */
  --border: #ddd;      /* Borders */
  --placeholder: #888; /* Placeholder text */
}

* {
  box-sizing: border-box;
  font-family: 'Vazirmatn', sans-serif;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  color: var(--text);
}

.app-container {
  width: 100%;
  max-width: 900px;    /* prevent it from being too wide */
  height: 90vh;        /* leave space above/below */
  margin: auto;        /* center horizontally & vertically */
  display: flex;
  flex-direction: column;
  background: var(--box);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ---------- HEADER ---------- */
header {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 0 16px;
  background: var(--input);
  border-bottom: 1px solid var(--border);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  height: 40px;
  width: 40px;
  border-radius: 50%;
}

header h1 {
  font-size: 16px;
  font-weight: 600;
}

/* ---------- CHAT AREA ---------- */
.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.chat-box {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--box);
}

.placeholder {
  align-self: center;
  color: var(--placeholder);
  font-size: 16px;
  margin-top: 20%;
}

.hint {
  align-self: center;
  font-size: 13px;
  color: var(--placeholder);
  margin-bottom: 10px;
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.suggestion {
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--input);
  font-size: 13px;
  cursor: pointer;
}

.suggestion:hover {
  background: var(--border);
}

/* ---------- MESSAGES ---------- */
.message {
  padding: 12px 16px;
  border-radius: 18px;
  max-width: 70%;
  line-height: 1.4;
  font-size: 14px;
  word-wrap: break-word;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.user {
  align-self: flex-end;
  background: var(--user);
  color: #fff;
}

.bot {
  align-self: flex-start;
  background: var(--bot);
  color: #111;
}

.message::after {
  content: attr(data-time);
  display: block;
  font-size: 11px;
  color: var(--placeholder);
  margin-top: 4px;
  text-align: left;
}

/* ---------- INPUT AREA ---------- */
.input-area {
  display: flex;
  align-items: center;
  padding: 10px;
  background: var(--input);
  border-top: 1px solid var(--border);
  gap: 8px;
}

#user-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 20px;
  border: none;
  outline: none;
  font-size: 14px;
  background: #fff;
}

#send-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: var(--user);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#send-btn:hover {
  opacity: 0.9;
}

#reset-btn {
  border: none;
  background: #e53935;
  color: #fff;
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

#reset-btn:hover {
  background: #c62828;
}

/* ---------- SCROLLBAR ---------- */
.chat-box::-webkit-scrollbar {
  width: 6px;
}
.chat-box::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 600px) {
  header h1 {
    font-size: 14px;
  }
  #user-input {
    font-size: 13px;
  }
}
.suggestion {
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--input);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease;
  animation: float 3s ease-in-out infinite; /* 🔹 floating effect */
}

.suggestion:hover {
  background: var(--border);
}

/* 🔹 Animation keyframes */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
