/* Enhanced Markdown Styling */

/* Main heading styling */
.prose h1 {
  font-size: 2.5rem;
  color: #6d28d9;
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 1rem;
}

/* Add decorative underline for h1 */
.prose h1::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(to right, rgba(109, 40, 217, 0.2), rgba(109, 40, 217, 0.7), rgba(109, 40, 217, 0.2));
  border-radius: 3px;
}

/* Dark mode adjustments for h1 */
.dark-mode .prose h1 {
  color: #a78bfa;
}

.dark-mode .prose h1::after {
  background: linear-gradient(to right, rgba(167, 139, 250, 0.2), rgba(167, 139, 250, 0.7), rgba(167, 139, 250, 0.2));
}

/* Enhanced h2 styling for better visual distinction */
.prose h2 {
  font-size: 1.75rem;
  border-bottom: 2px solid rgba(128, 90, 213, 0.3);
  padding-bottom: 0.75rem;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  position: relative;
  color: #7c3aed;
}

/* Add decorative element before h2 */
.prose h2::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 50px;
  height: 2px;
  background-color: #8956e5;
}

/* Dark mode adjustments for h2 */
.dark-mode .prose h2 {
  color: #a78bfa;
  border-bottom-color: rgba(167, 139, 250, 0.3);
}

.dark-mode .prose h2::before {
  background-color: #a78bfa;
}

/* Enhanced h3 styling */
.prose h3 {
  font-size: 1.4rem;
  color: #7c3aed;
  margin-top: 2rem;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

/* Add subtle indicator before h3 */
.prose h3::before {
  content: "›";
  position: absolute;
  left: -1.2rem;
  color: #8956e5;
  opacity: 0.7;
}

/* Dark mode adjustments for h3 */
.dark-mode .prose h3 {
  color: #a78bfa;
}

.dark-mode .prose h3::before {
  color: #a78bfa;
}

/* Enhanced list styling with more breathing room */
.prose ul {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose ul li {
  margin-top: 0.75em;
  margin-bottom: 0.75em;
  padding-left: 0.5em;
}

.prose ul li::before {
  color: #8956e5 !important;
  font-size: 1.2em;
}

.prose ol {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose ol li {
  margin-top: 0.75em;
  margin-bottom: 0.75em;
  padding-left: 0.5em;
}

.prose ol li::before {
  color: #8956e5 !important;
  font-weight: 600;
}

/* Custom styling for nested lists */
.prose ul ul,
.prose ol ul,
.prose ul ol,
.prose ol ol {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.prose ul ul li,
.prose ol ul li,
.prose ul ol li,
.prose ol ol li {
  margin-top: 0.4em;
  margin-bottom: 0.4em;
}

/* Custom callout/note boxes */
.prose .callout {
  background: rgba(128, 90, 213, 0.1);
  border-left: 4px solid #8956e5;
  padding: 1rem;
  margin: 1.5rem 0;
  border-radius: 0.25rem;
}

/* Special GitHub repository callout */
.prose .repo-callout {
  background: linear-gradient(to right, rgba(128, 90, 213, 0.1), rgba(128, 90, 213, 0.15));
  border: 1px solid rgba(128, 90, 213, 0.2);
  border-left: 4px solid #8956e5;
  border-radius: 0.5rem;
  padding: 1.2rem;
  margin: 2rem 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

/* Add subtle code pattern to background */
.prose .repo-callout::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 30%;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 5px,
    rgba(128, 90, 213, 0.08) 5px,
    rgba(128, 90, 213, 0.08) 10px
  );
  opacity: 0.5;
}

/* Dark mode for repo callout */
.dark-mode .prose .repo-callout {
  background: linear-gradient(to right, rgba(167, 139, 250, 0.1), rgba(167, 139, 250, 0.15));
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-left: 4px solid #a78bfa;
}

/* Improve table styling */
.prose table {
  border-collapse: collapse;
  width: 100%;
  margin: 2rem 0;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.prose thead {
  background-color: rgba(128, 90, 213, 0.1);
}

.prose th {
  font-weight: 700;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid rgba(128, 90, 213, 0.2);
}

.prose td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(128, 90, 213, 0.1);
}

.prose tbody tr:last-child td {
  border-bottom: none;
}

.prose tbody tr:hover {
  background-color: rgba(128, 90, 213, 0.05);
}

/* Dark mode adjustments */
.dark-mode .prose thead {
  background-color: rgba(128, 90, 213, 0.2);
}

.dark-mode .prose th {
  border-bottom: 2px solid rgba(128, 90, 213, 0.3);
}

.dark-mode .prose td {
  border-bottom: 1px solid rgba(128, 90, 213, 0.2);
}

.dark-mode .prose tbody tr:hover {
  background-color: rgba(128, 90, 213, 0.1);
}

/* Enhanced image styling */
.prose img {
  display: block;
  margin: 2rem auto;
  max-width: 100%;
  height: auto;
}

/* Improved blockquote styling with additional padding and margins */
.prose blockquote {
  font-style: italic;
  color: #6b7280;
  border-left-width: 4px;
  quotes: none;
  padding-left: 1.5rem !important;
  margin-left: 0.5rem;
  margin-top: 2rem !important;
  margin-bottom: 2rem !important;
  position: relative;
}

/* Add quotation mark decoration */
.prose blockquote::before {
  content: """;
  font-family: Georgia, serif;
  font-size: 2rem;
  position: absolute;
  left: 0.2rem;
  top: -0.5rem;
  color: rgba(128, 90, 213, 0.4);
  line-height: 1;
}

.dark-mode .prose blockquote {
  color: #9ca3af;
}

.dark-mode .prose blockquote::before {
  color: rgba(167, 139, 250, 0.4);
}

/* Enhanced link styling */
.prose a {
  transition: all 0.2s ease;
  border-bottom: 1px dotted rgba(128, 90, 213, 0.5);
  color: #6d28d9 !important;
  font-weight: 500;
  padding: 0 0.1em;
}

.prose a:hover {
  border-bottom: 1px solid rgba(128, 90, 213, 0.9);
  background-color: rgba(128, 90, 213, 0.1);
  color: #5b21b6 !important;
}

/* Special styling for GitHub links */
.prose a[href*="github.com"] {
  background-color: rgba(128, 90, 213, 0.1);
  border-radius: 4px;
  padding: 0.1em 0.5em;
  border-bottom: 2px solid #6d28d9;
  position: relative;
  margin: 0 0.1em;
}

.prose a[href*="github.com"]:hover {
  background-color: rgba(128, 90, 213, 0.2);
  border-bottom: 2px solid #5b21b6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Removed star icon for GitHub links */

/* Dark mode styling for links */
.dark-mode .prose a {
  color: #a78bfa !important;
  border-bottom-color: rgba(167, 139, 250, 0.5);
}

.dark-mode .prose a:hover {
  border-bottom-color: rgba(167, 139, 250, 0.9);
  background-color: rgba(167, 139, 250, 0.1);
  color: #c4b5fd !important;
}

.dark-mode .prose a[href*="github.com"] {
  background-color: rgba(167, 139, 250, 0.1);
  border-bottom-color: #a78bfa;
}

.dark-mode .prose a[href*="github.com"]:hover {
  background-color: rgba(167, 139, 250, 0.2);
  border-bottom-color: #c4b5fd;
}

/* Code block styling */
.prose pre code {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* Add fancy dividers between sections */
hr {
  height: 1px;
  margin: 3rem 0;
  background-image: linear-gradient(to right, rgba(128, 90, 213, 0), rgba(128, 90, 213, 0.5), rgba(128, 90, 213, 0));
  border: none;
}