:root {
  --primary: #0d6efd;
}

body {
  background-color: #f8f9fa;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

/* Stats cards */
.stat-card { transition: transform .15s; }
.stat-card:hover { transform: translateY(-2px); }
.stat-icon { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Chatbot cards */
.chatbot-card { transition: transform .15s, box-shadow .15s; cursor: pointer; }
.chatbot-card:hover { transform: translateY(-3px); box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.1) !important; }

/* Chat bubbles */
.chat-bubble {
  max-width: 75%;
  padding: .65rem 1rem;
  border-radius: 1.2rem;
  line-height: 1.5;
  word-break: break-word;
}
.user-bubble {
  background-color: var(--primary);
  color: white;
  border-bottom-right-radius: .3rem;
}
.bot-bubble {
  background-color: #f0f2f5;
  color: #212529;
  border-bottom-left-radius: .3rem;
}

/* Typing dots */
.typing-dots { display: flex; align-items: center; gap: 4px; height: 20px; }
.typing-dots span {
  width: 8px; height: 8px;
  background-color: #adb5bd;
  border-radius: 50%;
  animation: typingBounce 1.2s infinite ease-in-out;
}
.typing-dots span:nth-child(1) { animation-delay: 0s; }
.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-8px); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #dee2e6; border-radius: 3px; }

/* Accessibility - High contrast */
body.high-contrast {
  --bs-body-bg: #000 !important;
  --bs-body-color: #fff !important;
  background: #000 !important;
  color: #fff !important;
}
body.high-contrast .card,
body.high-contrast .navbar,
body.high-contrast .chat-bubble.bot-bubble {
  background: #111 !important;
  border-color: #fff !important;
  color: #fff !important;
}
body.high-contrast .chat-bubble.user-bubble {
  background: #0050cc !important;
  color: #fff !important;
}
body.high-contrast .text-muted { color: #bbb !important; }
body.high-contrast .form-control,
body.high-contrast .form-select {
  background: #111 !important;
  color: #fff !important;
  border-color: #fff !important;
}
body.high-contrast a { color: #6fc3ff !important; }
body.high-contrast #contrastToggle { background: #fff !important; color: #000 !important; border-color: #fff !important; }

/* Emoji grid */
.emoji-grid button:hover { background: #f0f4ff; }

/* Drop zone */
.drop-zone {
  border: 2px dashed #dee2e6;
  transition: border-color .2s, background .2s;
  cursor: pointer;
}
.drop-zone.drag-over {
  border-color: var(--primary);
  background: #f0f4ff;
}

/* Markdown-like formatting in bot messages */
.bot-bubble code {
  background: rgba(0,0,0,.07);
  padding: .1em .3em;
  border-radius: .25rem;
  font-size: .875em;
}
.bot-bubble pre {
  background: rgba(0,0,0,.07);
  padding: .75rem;
  border-radius: .5rem;
  overflow-x: auto;
  font-size: .8em;
}
