body {
  font-family: sans-serif;
  margin: 0;
  padding-top: 1.5rem;
  background: #f5f5f5;
}
#context-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 8px;
  background: #ddd;
  z-index: 1000;
}
#context-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #76c7c0, #4a90e2);
  transition: width 0.3s;
}
#chat {
  max-width: 800px;
  margin: auto;
  background: white;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.message {
  margin: 0.5rem 0;
}
.user { font-weight: bold; }
.assistant { background: #eef; padding: 0.5rem; border-radius: 4px; }
img.preview {
  max-width: 200px;
  max-height: 200px;
  display: block;
  margin-top: 0.5rem;
}
.controls {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  align-items: stretch;
  height: 2.5rem;
}
button[id="sendBtn"], input[type="file"] {
  font-size: 1rem;
  padding: 0.5rem 1rem;
  height: 2.5rem;
  box-sizing: border-box;
}
#spinner {
  display: none;
  margin-top: 1rem;
  text-align: center;
}
.dots span {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 3px;
  background: #555;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}
.dots span:nth-child(1) { animation-delay: -0.32s; }
.dots span:nth-child(2) { animation-delay: -0.16s; }
.dots span:nth-child(3) { animation-delay: 0s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}
.meta-info {
  background: yellow;
  color: black;
  padding: 0.2rem 0.5rem;
  margin-top: 0.3rem;
  display: inline-block;
  font-size: 0.9rem;
  border-radius: 4px;
}
.copy-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 4px;
}
.copy-button:hover {
  color: green;
}
