/*
  Marked 站点补充样式（已作用域化）
  仅作用于 .md-demo-root 内部，避免影响全站公共头部 / 页脚。
  深色模式跟随站点统一约定：html[data-theme="dark"]
*/

/* Improved section spacing */
.md-demo-root .prose h2 {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
}

.md-demo-root .prose h3 {
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
}

.md-demo-root .prose p {
  margin-bottom: 1.25rem;
  line-height: 1.75;
}

.md-demo-root .prose ul,
.md-demo-root .prose ol {
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
}

.md-demo-root .prose pre {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

/* This sets the background color for all code blocks
  and lets height be dynamic.
*/
.md-demo-root pre {
  height: auto;
  align-items: center;
}

.md-demo-root .prose pre {
  background-color: #D1D5DB; /* Your light mode bg-gray-300 */
  color: #000;
}

html[data-theme="dark"] .md-demo-root .prose pre {
  background-color: #1F2937; /* Your dark mode dark:bg-gray-800 */
  color: #fff;
}

/* This fixes a conflict where the <code> tag
  itself has a background, hiding the <pre> background.
*/
.md-demo-root .prose pre code.hljs {
  background-color: transparent !important;
}

/* Custom styles for the warning box */
.md-demo-root .alert-warning {
  background-color: #FEF2F2;
  border-left: 4px solid #EF4444;
  color: #B91C1C;
  padding: 1rem;
  border-radius: 0 0.5rem 0.5rem 0;
  margin: 1.5rem 0;
}

html[data-theme="dark"] .md-demo-root .alert-warning {
  background-color: #2c1d1d;
  border-left-color: #F87171;
  color: #FCA5A5;
}

.md-demo-root .alert-warning a {
  text-decoration: underline;
  font-weight: 500;
}
