:root {
  --bg-color: #f4f6fb;
  --dark-bg: #0f172a;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --accent-1: #8b5cf6;
  --accent-2: #3b82f6;
  --gradient-main: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background-color: var(--bg-color); color: var(--text-main); height: 100vh; overflow: hidden; }

.app { display: flex; height: 100vh; }

/* Sidebar */
.sidebar {
  width: 280px;
  background: #1d1c1c;

  background-image: radial-gradient(circle at 10% 20%, rgba(167, 139, 250, 0.35) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  overflow-y: auto;
}

.logo { display: flex; align-items: center; gap: 12px; margin-bottom: 2.5rem; padding-left: 0.5rem; }
.logo-icon { width: 40px; height: 40px; background: var(--gradient-main); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4); }
.logo h2 { font-size: 1.2rem; font-weight: 700; color: #ffffff; }
.new-chat { background: var(--gradient-main); color: white; border: none; border-radius: 10px; padding: 14px; font-weight: 600; cursor: pointer; margin-bottom: 2.5rem; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3); transition: transform 0.2s; }
.new-chat:hover { transform: translateY(-2px); }
.section-title { font-size: 0.75rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 1px; margin: 1.5rem 0 0.8rem 0.5rem; font-weight: 600; }
.chat-item { display: flex; align-items: center; padding: 10px 12px; border-radius: 10px; font-size: 0.9rem; color: #cbd5e1; cursor: pointer; transition: background 0.2s; }
.chat-item:hover { background: rgba(255, 255, 255, 0.08); color: white; }

/* --- Main Chat Area (FIXED Layout) --- */
.main-wrapper { flex: 1; display: flex; overflow: hidden; }

.chat-main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 0; /* Padding hata di taake input bilkul bottom par lage */
  overflow: hidden;
}

/* 1. Watermark Center mein rahega */
.empty-state {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 10;
}

.watermark-icon { font-size: 2.8rem; margin-bottom: 1rem; opacity: 0.3; }
.empty-state h2 { font-size: 1.5rem; color: var(--text-main); margin-bottom: 0.5rem; font-weight: 700; }
.empty-state p { font-size: 1rem; }

/* 2. Error Message Center mein */
.error-msg {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fee2e2;
  color: #dc2626;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  border: 1px solid #fecaca;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  z-index: 11;
}

/* 3. Chat History Messages Input ke UPAR scroll hongi */
.chat-history {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  display: none;
  flex-direction: column;
  gap: 1rem;
  /* Input box ke liye neeche space chhor diya */
  padding-bottom: 120px;
}

.message {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.question-box {
  position: relative;
  background: white;
  border-radius: 50px;
  padding: 0.4rem 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  max-width: 750px;
  width: 90%;
  display: flex;
  align-items: center;
  margin: 0 auto;
}

.question-box input {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  outline: none;
}

.send-btn {
  width: 36px;
  height: 36px;
  background: var(--gradient-main);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
  transition: transform 0.2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.send-btn:hover {
  transform: scale(1.05);
}
.user-message {
  background: var(--gradient-main);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}

/* 4. Input Box Sticky Bottom Par */
.chat-input-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 1rem 2rem 2rem 2rem; /* Neeche thora sa margin */
  background: linear-gradient(to top, var(--bg-color) 70%, transparent); /* Gradient taake neeche dark na lage */
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 20;
}



.send-btn:hover {
  transform: scale(1.1);
}
.send-btn:hover { transform: scale(1.05); }




.bot-message {
  background: white;
  color: var(--text-main);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.bot-message p {
  margin: 0 0 10px 0;
}

.bot-message ul,
.bot-message ol {
  margin: 8px 0;
  padding-left: 25px;
}

.bot-message li {
  margin-bottom: 5px;
}

.bot-message strong {
  font-weight: 700;
}




