/* === Base Reset === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Roboto, sans-serif;
  background-color: #343541;
  color: #d1d5db;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === Header === */
.header {
  background-color: #202123;
  color: #fff;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #444;
}

.header h1 {
  font-size: 20px;
  font-weight: 600;
}

.controls {
  display: flex;
  gap: 12px;
}

#theme-toggle-btn,
#model-select {
  background: #3c3f4a;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
}

/* === Main Layout === */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* === Chat Container === */
.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

/* === Chat Bubbles === */
.chat-bubble {
  max-width: 80%;
  padding: 14px 18px;
  border-radius: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-size: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-message {
  align-self: flex-end;
  background-color: #2e2f3a;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.ai-message {
  align-self: flex-start;
  background-color: #444654;
  color: #e2e8f0;
  border-bottom-left-radius: 4px;
}

/* === Input Area === */
.input-bar {
  display: flex;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid #444;
  background-color: #202123;
}

.input-bar textarea {
  flex: 1;
  padding: 12px 16px;
  border-radius: 8px;
  border: none;
  background-color: #40414f;
  color: #fff;
  resize: vertical;
  font-size: 15px;
  min-height: 50px;
  max-height: 150px;
}

.input-bar button {
  padding: 12px 16px;
  background-color: #10a37f;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

.input-bar button:hover {
  background-color: #0d8f6e;
}

/* === Copy Button === */
.copy-btn {
  margin-top: 6px;
  font-size: 13px;
  background: none;
  border: none;
  color: #10a37f;
  cursor: pointer;
  align-self: flex-end;
}

/* === Footer Info === */
.inline-info {
  text-align: center;
  padding: 12px;
  font-size: 0.9rem;
  color: #777;
}

/* === Loading Message === */
.loading {
  font-style: italic;
  color: #aaa;
  text-align: center;
  margin-top: 10px;
}

/* === Scrollbar Styling === */
.chat-container::-webkit-scrollbar {
  width: 6px;
}

.chat-container::-webkit-scrollbar-thumb {
  background-color: #555;
  border-radius: 3px;
}
