/* 转生史莱姆风格 - 明亮活泼配色 */

/* 代码块整体容器 */
.markdown-body pre {
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 8px rgba(100, 180, 255, 0.15) !important;
  border: 2px solid #a8d8ff !important;
}

/* 主容器背景 */
.markdown-body pre > div {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
}

/* 头部栏样式 */
.markdown-body pre > div > div.flex.justify-between.h-8,
.markdown-body pre > div > div.border-b {
  background: linear-gradient(90deg, #bae6fd 0%, #7dd3fc 100%) !important;
  border-color: #38bdf8 !important;
  padding: 8px 12px !important;
}

/* 语言标签 */
.markdown-body pre > div > div.flex.justify-between > div.text-\[13px\],
.markdown-body pre > div > div.flex.justify-between > div:first-child {
  color: #0369a1 !important;
  font-weight: 600 !important;
  font-size: 13px !important;
}

/* 复制按钮图标颜色 */
.markdown-body pre svg.lucide-copy,
.markdown-body pre div[data-tooltip-id^="copy-tooltip"] > svg {
  color: #0284c7 !important;
}

.markdown-body pre .group:hover svg.lucide-copy,
.markdown-body pre div[data-tooltip-id^="copy-tooltip"]:hover > svg {
  color: #0369a1 !important;
}

/* 代码内容区 */
.markdown-body pre > div > div[node] {
  background: #ffffff !important;
  padding: 16px !important;
  border-top: 1px solid #bae6fd !important;
}

/* 代码文本 */
.markdown-body pre code[class^="language-"],
.markdown-body pre > div > div[node] > code {
  color: #1e40af !important;
  font-family: 'Consolas', 'Monaco', monospace !important;
}

/* 纯代码块样式 */
.markdown-body pre > code[node],
.markdown-body pre > code:only-child {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
  color: #1e40af !important;
  padding: 16px !important;
  border-radius: 12px !important;
  border: 2px solid #a8d8ff !important;
}

/* ===== 问题1修复：折叠展开按钮 ===== */

/* details 折叠容器 */
.markdown-body details {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
  border: 2px solid #a8d8ff !important;
  border-radius: 12px !important;
  margin: 12px 0 !important;
  padding: 0 !important;
  box-shadow: 0 2px 8px rgba(100, 180, 255, 0.15) !important;
}

/* summary 折叠按钮 */
.markdown-body details > summary {
  background: linear-gradient(90deg, #bae6fd 0%, #7dd3fc 100%) !important;
  color: #0369a1 !important;
  font-weight: 600 !important;
  padding: 12px 16px !important;
  cursor: pointer !important;
  border-radius: 10px !important;
  list-style: none !important;
  user-select: none !important;
  transition: all 0.3s ease !important;
}

/* 移除默认三角形 */
.markdown-body details > summary::-webkit-details-marker {
  display: none !important;
}

/* 自定义展开图标 */
.markdown-body details > summary::before {
  content: "▶" !important;
  display: inline-block !important;
  margin-right: 8px !important;
  transition: transform 0.3s ease !important;
  color: #0284c7 !important;
}

.markdown-body details[open] > summary::before {
  transform: rotate(90deg) !important;
}

/* summary hover 效果 */
.markdown-body details > summary:hover {
  background: linear-gradient(90deg, #7dd3fc 0%, #38bdf8 100%) !important;
  color: #075985 !important;
}

/* details 内容区 */
.markdown-body details > *:not(summary) {
  padding: 16px !important;
  background: #ffffff !important;
}

/* ===== 问题2修复：记忆回廊表格 ===== */

/* 表格容器 */
.markdown-body table {
  background: #ffffff !important;
  border: 2px solid #a8d8ff !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

/* 表头 */
.markdown-body table thead {
  background: linear-gradient(90deg, #bae6fd 0%, #7dd3fc 100%) !important;
}

.markdown-body table thead th {
  color: #0369a1 !important;
  font-weight: 600 !important;
  padding: 12px 16px !important;
  text-align: left !important;
  border-bottom: 2px solid #38bdf8 !important;
}

/* 表格行 */
.markdown-body table tbody tr {
  background: #ffffff !important;
  transition: background 0.2s ease !important;
}

.markdown-body table tbody tr:nth-child(even) {
  background: #f0f9ff !important;
}

.markdown-body table tbody tr:hover {
  background: #e0f2fe !important;
}

/* 表格单元格 */
.markdown-body table tbody td {
  color: #1e40af !important;
  padding: 10px 16px !important;
  border-bottom: 1px solid #bae6fd !important;
}

/* 最后一行去掉底部边框 */
.markdown-body table tbody tr:last-child td {
  border-bottom: none !important;
}

/* 记忆回廊特殊样式 - 标签列 */
.markdown-body table tbody td:nth-child(3) {
  font-weight: 500 !important;
  color: #0284c7 !important;
}

/* 记忆回廊 - PIN 标记 */
.markdown-body table tbody td:contains("📌"),
.markdown-body table tbody td:contains("⚓") {
  color: #dc2626 !important;
  font-weight: 600 !important;
}

/* 粗体文本（如 STM、LTM、PIN 标题） */
.markdown-body strong {
  color: #0369a1 !important;
  font-weight: 700 !important;
}

/* 代码块内的表格（如果有） */
.markdown-body pre table,
.markdown-body code table {
  background: transparent !important;
  border: none !important;
}