
.chat-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #1e1e2e;
    color: #cdd6f4;
  }
  
  /* Discord theme support */
  .discord .chat-container {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
  }
  
  .chat-window {
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  
  .chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background-color: #181825;
    border-bottom: 1px solid #313244;
  }
  
  /* Discord theme support */
  .discord .chat-header {
    background-color: hsl(var(--card));
    border-bottom: 1px solid hsl(var(--border));
  }
  
  .character-info {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .character-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #313244;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  /* Discord theme support */
  .discord .character-avatar {
    background-color: hsl(var(--secondary));
  }
  
  .character-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #89b4fa;
    color: #1e1e2e;
    font-weight: bold;
    font-size: 18px;
  }
  
  /* Discord theme support */
  .discord .avatar-placeholder {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
  }
  
  .character-name {
    font-weight: 500;
    font-size: 16px;
    color: #f5c2e7;
  }
  
  /* Discord theme support */
  .discord .character-name {
    color: hsl(var(--foreground));
  }
  
  .no-character {
    font-style: italic;
    color: #6c7086;
  }
  
  /* Discord theme support */
  .discord .no-character {
    color: hsl(var(--muted-foreground));
  }
  
  .chat-actions {
    display: flex;
    gap: 10px;
  }
  
  .action-button {
    background-color: #313244;
    color: #cdd6f4;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
  }
  
  /* Discord theme support */
  .discord .action-button {
    background-color: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
  }
  
  .action-button:hover {
    background-color: #45475a;
  }
  
  /* Discord theme support */
  .discord .action-button:hover {
    background-color: hsl(var(--accent));
  }
  
  .character-button {
    background-color: #89b4fa;
    color: #1e1e2e;
  }
  
  /* Discord theme support */
  .discord .character-button {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
  }
  
  .character-button:hover {
    background-color: #74c7ec;
  }
  
  /* Discord theme support */
  .discord .character-button:hover {
    opacity: 0.9;
  }
  
  .clear-button {
    background-color: #45475a;
  }
  
  /* Discord theme support */
  .discord .clear-button {
    background-color: hsl(var(--secondary));
  }
  
  .clear-button:hover {
    background-color: #f38ba8;
    color: #1e1e2e;
  }
  
  /* Discord theme support */
  .discord .clear-button:hover {
    background-color: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
  }
  
  .messages-container {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  
  .empty-chat {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    color: #6c7086;
    text-align: center;
  }
  
  /* Discord theme support */
  .discord .empty-chat {
    color: hsl(var(--muted-foreground));
  }
  
  .select-character-button {
    background-color: #89b4fa;
    color: #1e1e2e;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
  }
  
  /* Discord theme support */
  .discord .select-character-button {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
  }
  
  .select-character-button:hover {
    background-color: #74c7ec;
  }
  
  /* Discord theme support */
  .discord .select-character-button:hover {
    opacity: 0.9;
  }
  
  .message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 8px;
    position: relative;
  }
  
  .message.user {
    align-self: flex-end;
    background-color: #89b4fa;
    color: #1e1e2e;
  }
  
  /* Discord theme support - KEY FIX FOR INVISIBLE TEXT */
  .discord .message.user {
    background-color: hsl(var(--primary) / 0.15);
    color: hsl(var(--foreground));
  }
  
  .message.assistant {
    align-self: flex-start;
    background-color: #313244;
  }
  
  /* Discord theme support - KEY FIX FOR INVISIBLE TEXT */
  .discord .message.assistant {
    background-color: hsl(var(--secondary));
    color: hsl(var(--foreground));
  }
  
  .message.system {
    align-self: center;
    background-color: #f38ba8;
    color: #1e1e2e;
    max-width: 70%;
    text-align: center;
    font-size: 14px;
    padding: 8px 12px;
  }
  
  /* Discord theme support */
  .discord .message.system {
    background-color: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
  }
  
  .message-name {
    position: absolute;
    top: -20px;
    left: 0;
    font-size: 12px;
    color: #bac2de;
  }
  
  /* Discord theme support */
  .discord .message-name {
    color: hsl(var(--foreground));
  }
  
  .message-content {
    white-space: pre-wrap;
    line-height: 1.5;
  }
  
  /* Discord theme support - ensure message content is visible */
  .discord .message-content {
    color: hsl(var(--foreground));
  }
  
  .input-container {
    display: flex;
    gap: 10px;
    padding: 16px;
    background-color: #181825;
    border-top: 1px solid #313244;
  }
  
  /* Discord theme support */
  .discord .input-container {
    background-color: hsl(var(--card));
    border-top: 1px solid hsl(var(--border));
  }
  
  .input-container textarea {
    flex-grow: 1;
    height: 60px;
    max-height: 150px;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #313244;
    background-color: #1e1e2e;
    color: #cdd6f4;
    resize: none;
    font-size: 15px;
    font-family: inherit;
  }
  
  /* Discord theme support */
  .discord .input-container textarea {
    border: 1px solid hsl(var(--input));
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
  }
  
  .input-container textarea:focus {
    outline: none;
    border-color: #89b4fa;
  }
  
  /* Discord theme support */
  .discord .input-container textarea:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.3);
  }
  
  .input-container textarea::placeholder {
    color: #6c7086;
  }
  
  /* Discord theme support */
  .discord .input-container textarea::placeholder {
    color: hsl(var(--muted-foreground));
  }
  
  .input-container textarea:disabled {
    opacity: 0.7;
    cursor: not-allowed;
  }
  
  .send-button {
    align-self: flex-end;
    background-color: #a6e3a1;
    color: #1e1e2e;
    border: none;
    border-radius: 8px;
    padding: 0 20px;
    height: 60px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
  }
  
  /* Discord theme support */
  .discord .send-button {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
  }
  
  .send-button:hover:not(:disabled) {
    background-color: #94e2d5;
  }
  
  /* Discord theme support */
  .discord .send-button:hover:not(:disabled) {
    opacity: 0.9;
  }
  
  .send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  .character-manager-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
  }

  /* Add these to your existing ChatInterface.css file */

/* Markdown content styling */
.markdown-content {
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

.markdown-content pre {
  margin: 0;
  padding: 0;
  overflow-x: auto;
}

.markdown-content code {
  font-family: 'Fira Code', 'Roboto Mono', monospace;
  font-size: 0.9em;
  padding: 0.1em 0.3em;
  border-radius: 3px;
  background-color: rgba(0, 0, 0, 0.05);
}

.markdown-content pre > code {
  display: block;
  background-color: #282c34;
  color: #abb2bf;
  padding: 1rem;
  border-radius: 6px;
  max-height: 600px;
  overflow-y: auto;
}

.markdown-content p {
  margin-bottom: 1rem;
}

.markdown-content h1, 
.markdown-content h2, 
.markdown-content h3, 
.markdown-content h4, 
.markdown-content h5, 
.markdown-content h6 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.markdown-content h1 {
  font-size: 1.8em;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 0.3em;
}

.markdown-content h2 {
  font-size: 1.5em;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 0.3em;
}

.markdown-content h3 {
  font-size: 1.25em;
}

.markdown-content ul, 
.markdown-content ol {
  margin-bottom: 1rem;
  padding-left: 2rem;
}

.markdown-content li {
  margin-bottom: 0.5rem;
}

.markdown-content blockquote {
  border-left: 4px solid #ddd;
  padding-left: 1rem;
  margin-left: 0;
  color: #666;
}

.markdown-content table {
  border-collapse: collapse;
  margin-bottom: 1rem;
  width: 100%;
}

.markdown-content table th,
.markdown-content table td {
  border: 1px solid #ddd;
  padding: 0.5rem;
}

.markdown-content table th {
  background-color: #f5f5f5;
  font-weight: 600;
}

/* Code block container with copy button */
.code-block-wrapper {
  position: relative;
  margin: 1rem 0;
}

.copy-button {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.3);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
}

.code-block-wrapper:hover .copy-button {
  opacity: 1;
}

/* Improve the input area */
.input-container {
  display: flex;
  margin-top: 1rem;
  padding: 1rem;
  background-color: #f9f9f9;
  border-top: 1px solid #eee;
}

.message-input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  resize: vertical;
  min-height: 60px;
  max-height: 200px;
  transition: border-color 0.2s;
}

.message-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.send-button {
  margin-left: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.send-button:hover {
  background-color: #0069d9;
}

.send-button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* Model name display */
.model-name {
  font-size: 0.8rem;
  color: #666;
  margin-left: 0.5rem;
}