.llm-message {
  line-height: 1.6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Headers in LLM Nachrichten */
.llm-message h2,
.llm-message h3,
.llm-message h4 {
  margin: 1.5rem 0 0.75rem 0;
  color: var(--primary);
  font-weight: 600;
}

.llm-message h2 {
  font-size: 1.4em;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 0.5rem;
}

.llm-message h3 {
  font-size: 1.2em;
}

.llm-message h4 {
  font-size: 1.1em;
}

/* Listen */
.llm-message .llm-list {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.llm-message .llm-list li {
  margin: 0.5rem 0;
  line-height: 1.5;
}

.llm-message ul.llm-list {
  list-style-type: disc;
}

.llm-message ul.llm-list ul {
  list-style-type: circle;
  margin: 0.25rem 0;
}

.llm-message ul.llm-list ul ul {
  list-style-type: square;
}

.llm-message ol.llm-list {
  list-style-type: decimal;
}

/* Bold und Italic */
.llm-message strong {
  font-weight: 600;
  color: var(--primary);
}

.llm-message em {
  font-style: italic;
  color: var(--muted-color);
}

/* Code-Formatierung */
.llm-message code {
  background: var(--code-background-color, #f4f4f4);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--code-color, #d63384);
}

.llm-message pre {
  background: var(--code-background-color, #f8f9fa);
  border: 1px solid var(--muted-border-color);
  border-radius: var(--border-radius);
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.llm-message pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 0.9em;
}

/* Paragraphen */
.llm-message p {
  margin: 0.75rem 0;
}

.llm-message p:first-child {
  margin-top: 0;
}

.llm-message p:last-child {
  margin-bottom: 0;
}

/* Spezielle Hervorhebung für Kategorien */
.llm-message strong:has(+ ul),
.llm-message strong:has(+ ol) {
  display: block;
  margin: 1rem 0 0.5rem 0;
  padding: 0.5rem 0;
  border-left: 3px solid var(--primary);
  padding-left: 1rem;
  background: var(--card-background-color);
}

/* Dark Mode Anpassungen */
@media (prefers-color-scheme: dark) {
  .llm-message code {
    background: rgba(255, 255, 255, 0.1);
    color: #ff6b9d;
  }

  .llm-message pre {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
  }
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
  .llm-message {
    font-size: 0.95rem;
  }

  .llm-message .llm-list {
    padding-left: 1.2rem;
  }

  .llm-message pre {
    padding: 0.75rem;
    font-size: 0.85rem;
  }
}