.chat-container {
  max-width: 80vw;          /* up to 80% of viewport width */
  width: 90vw;              /* responsive fallback */
  height: 80vh;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  border: 1px solid #ccc;
  border-radius: 12px;
  background: #1a1a1a;
  padding: 1rem 1.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  color: #f0f0f0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.9rem;        /* smaller base font size */
}

.chat-header {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center;
}

.chat-messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem;
  background: #111;
  border-radius: 8px;
  font-size: 0.95rem;      /* smaller text */
  line-height: 1.4;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scrollbar-width: thin;
  scrollbar-color: #444 #111;
}

.chat-messages::-webkit-scrollbar {
  width: 8px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background-color: #444;
  border-radius: 10px;
}

.message {
  max-width: 75%;
  word-wrap: break-word;
  padding: 0.6rem 0.9rem;
  border-radius: 18px;
  box-sizing: border-box;
}

.user-message {
  background: #0052cc;
  align-self: flex-end;
  color: #fff;
  font-size: 1rem;         /* slightly smaller than before */
}

.ai-message {
  align-self: flex-start;
  background: #1e1e1e;
  border: 1px solid #333;
  color: #d4d4d4;
  font-family: 'Source Code Pro', monospace, monospace;
  font-size: 0.95rem;
  white-space: pre-wrap;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  box-shadow:
    inset 0 0 10px #2a2a2a,
    0 0 6px rgba(100, 149, 237, 0.4);
}


/* Input & Button */
#prompt {
  width: 100%;
  resize: vertical;
  min-height: 90px;
  font-size: 1rem;         /* smaller input text */
  padding: 0.7rem 1rem;
  border-radius: 12px;
  border: 1px solid #555;
  background: #222;
  color: #eee;
  margin-bottom: 0.75rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#askBtn {
  font-size: 1.1rem;
  padding: 0.7rem 1.5rem;
  border-radius: 12px;
  border: none;
  background-color: #0052cc;
  color: white;
  cursor: pointer;
  align-self: flex-end;
  transition: background-color 0.3s ease;
}

#askBtn:disabled {
  background-color: #003d99;
  cursor: not-allowed;
}

#askBtn:hover:not(:disabled) {
  background-color: #004bbd;
}

/* Responsive: narrower screens */
@media (max-width: 576px) {
  .chat-container {
    max-width: 95vw;
    font-size: 0.85rem;
  }
}
