[data-theme='dark'] {
    background-color: #121212 !important;
}

[data-theme='light'] {
    background-color: #fff !important;
}

/* Enhanced heading styles for markdown content */
.prose h1 {
  font-size: 2.25rem !important;
  margin-top: 1.5rem !important;
  margin-bottom: 1rem !important;
  font-weight: 700 !important;
}

.prose h2 {
  font-size: 1.875rem !important;
  margin-top: 1.25rem !important;
  margin-bottom: 0.875rem !important;
  font-weight: 600 !important;
}

.prose h3 {
  font-size: 1.5rem !important;
  margin-top: 1rem !important;
  margin-bottom: 0.75rem !important;
  font-weight: 600 !important;
}

.prose h4 {
  font-size: 1.25rem !important;
  margin-top: 0.875rem !important;
  margin-bottom: 0.625rem !important;
  font-weight: 600 !important;
}

.prose h5 {
  font-size: 1.125rem !important;
  margin-top: 0.75rem !important;
  margin-bottom: 0.5rem !important;
  font-weight: 600 !important;
}

.prose h6 {
  font-size: 1rem !important;
  margin-top: 0.75rem !important;
  margin-bottom: 0.5rem !important;
  font-weight: 600 !important;
}

.table-wrapper {
  border-radius: 8px !important;
  overflow: hidden !important;
  border: 1px solid white !important;
  margin: 1rem 0 !important;
}

.table-wrapper td {
  padding: 0.75rem !important;
  border: 1px solid white !important;
  border-width: 1px !important;
  vertical-align: top !important;
}

.table-wrapper th {
  padding: 0.75rem !important;
  border: 1px solid white !important;
  border-width: 1px !important;
  font-weight: 600 !important;
  text-align: left !important;
}

/* Enhanced table styles for markdown content */
.prose table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin-top: 1rem !important;
  margin-bottom: 1rem !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  border: 1px solid hsl(var(--b3)) !important;
}

.prose table th {
  background-color: hsl(var(--b2)) !important;
  color: hsl(var(--bc)) !important;
  font-weight: 600 !important;
  padding: 0.75rem !important;
  text-align: left !important;
  border-bottom: 2px solid hsl(var(--b3)) !important;
  border-right: 1px solid hsl(var(--b3)) !important;
}

.prose table th:last-child {
  border-right: none !important;
}

.prose table td {
  padding: 0.75rem !important;
  border-bottom: 1px solid hsl(var(--b3)) !important;
  border-right: 1px solid hsl(var(--b3)) !important;
  vertical-align: top !important;
}

.prose table td:last-child {
  border-right: none !important;
}

.prose table tr:hover {
  background-color: hsl(var(--b2) / 0.5) !important;
}

.prose table tr:nth-child(even) {
  background-color: hsl(var(--b1)) !important;
}

.prose table tr:nth-child(odd) {
  background-color: hsl(var(--b2) / 0.2) !important;
}

/* Text alignment classes for table cells */
.prose table td[align="center"],
.prose table th[align="center"] {
  text-align: center !important;
}

.prose table td[align="right"],
.prose table th[align="right"] {
  text-align: right !important;
}

.prose table td[align="left"],
.prose table th[align="left"] {
  text-align: left !important;
}

/* Responsive table wrapper */
.prose .table-wrapper {
  overflow-x: auto !important;
  margin: 1rem 0 !important;
  border-radius: 8px !important;
  border: 1px solid hsl(var(--b3)) !important;
}

/* Ensure table borders are visible */
.prose .table-wrapper table {
  border: none !important; /* Remove duplicate border since wrapper has border */
}

/* Force border display for better visibility */
.prose table,
.prose table * {
  box-sizing: border-box !important;
}

/* Dark theme specific table styles */
[data-theme='dark'] .prose table {
  box-shadow: 0 1px 3px rgba(255, 255, 255, 0.1) !important;
  border: 1px solid hsl(var(--b1)) !important;
}

[data-theme='dark'] .prose table th {
  background-color: hsl(var(--b3)) !important;
  border-bottom: 2px solid hsl(var(--b1)) !important;
  border-right: 1px solid hsl(var(--b1)) !important;
}

[data-theme='dark'] .prose table th:last-child {
  border-right: none !important;
}

[data-theme='dark'] .prose table td {
  border-bottom: 1px solid hsl(var(--b1)) !important;
  border-right: 1px solid hsl(var(--b1)) !important;
}

[data-theme='dark'] .prose table td:last-child {
  border-right: none !important;
}

[data-theme='dark'] .prose table tr:hover {
  background-color: hsl(var(--b3) / 0.5) !important;
}

[data-theme='dark'] .prose table tr:nth-child(even) {
  background-color: hsl(var(--b2)) !important;
}

[data-theme='dark'] .prose table tr:nth-child(odd) {
  background-color: hsl(var(--b3) / 0.2) !important;
}

[data-theme='dark'] .prose .table-wrapper {
  border: 1px solid hsl(var(--b1)) !important;
}

[data-theme='dark'] .prose .table-wrapper table {
  border: none !important;
}