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

body {
  font-family: 'Bricolage Grotesque', sans-serif;
  transition: background-color 0.4s ease, color 0.4s ease;
}

body.dark-mode {
  background-color: #1c1a16;
  color: #eae8e0;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.0); }
  50% { box-shadow: 0 0 20px 4px rgba(236, 72, 153, 0.15); }
}

@keyframes berryBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-14px) rotate(-8deg); }
  50% { transform: translateY(0) rotate(0deg); }
  75% { transform: translateY(-8px) rotate(5deg); }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.search-glow {
  animation: pulseGlow 3s ease-in-out infinite;
}

.search-glow:focus-within {
  animation: none;
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.3), 0 4px 20px rgba(0,0,0,0.08);
}

.berry-bounce {
  animation: berryBounce 1.2s ease-in-out infinite;
  display: inline-block;
}

.fade-slide-up {
  animation: fadeSlideUp 0.5s ease-out forwards;
}

.answer-card {
  animation: fadeSlideUp 0.6s ease-out forwards;
}

.shimmer-bg {
  background: linear-gradient(90deg, transparent 25%, rgba(236, 72, 153, 0.06) 50%, transparent 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

.dark-mode .shimmer-bg {
  background: linear-gradient(90deg, transparent 25%, rgba(236, 72, 153, 0.1) 50%, transparent 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* Markdown-like answer styling */
.answer-content h1, .answer-content h2, .answer-content h3 {
  font-weight: 800;
  margin-top: 1em;
  margin-bottom: 0.5em;
}

.answer-content h1 { font-size: 1.4em; }
.answer-content h2 { font-size: 1.2em; }
.answer-content h3 { font-size: 1.05em; }

.answer-content p {
  margin-bottom: 0.8em;
  line-height: 1.7;
}

.answer-content ul, .answer-content ol {
  margin-left: 1.5em;
  margin-bottom: 0.8em;
}

.answer-content li {
  margin-bottom: 0.3em;
  line-height: 1.6;
}

.answer-content strong, .answer-content b {
  font-weight: 800;
}

.answer-content code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  background: rgba(236, 72, 153, 0.08);
}

.dark-mode .answer-content code {
  background: rgba(236, 72, 153, 0.15);
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d4d0c4; border-radius: 3px; }
.dark-mode ::-webkit-scrollbar-thumb { background: #4a4639; }

/* Sidebar transition */
.sidebar-enter {
  transform: translateX(-100%);
  opacity: 0;
}
.sidebar-active {
  transform: translateX(0);
  opacity: 1;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Background pattern */
.bg-pattern {
  background-image: radial-gradient(circle at 1px 1px, rgba(236, 72, 153, 0.04) 1px, transparent 0);
  background-size: 32px 32px;
}

.dark-mode .bg-pattern {
  background-image: radial-gradient(circle at 1px 1px, rgba(236, 72, 153, 0.06) 1px, transparent 0);
  background-size: 32px 32px;
}