ai {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: system-ui, -apple-system, sans-serif;
  color: #5c4044;
  font-size: 14px;
  line-height: 1.6;
  --p-bg: #fff0f5;
  --p-border: #ffb7c5;
  --p-text: #5c4044;
  --p-sub: #8a6a70;
  --p-hover: #ffe4eb;
}

ai details {
  background: var(--p-bg);
  border: 1px solid var(--p-border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(255, 183, 197, 0.15);
}

ai details[open] {
  box-shadow: 0 4px 12px rgba(255, 183, 197, 0.3);
}

ai summary {
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  list-style: none;
  background-color: var(--p-bg);
  /* 纯CSS嵌入极简樱花/花瓣SVG背景，并设置透明度 */
  background-image: url("image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffb7c5' fill-opacity='0.3' d='M12,4.4 C14.6,-0.6 22,-0.6 22,6.4 C22,13.4 12,21.4 12,21.4 C12,21.4 2,13.4 2,6.4 C2,-0.6 9.4,-0.6 12,4.4 Z'/%3E%3C/svg%3E");
  background-size: 40px 40px;
  animation: sakuraFlow 15s linear infinite;
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background-color 0.2s;
}

ai summary::-webkit-details-marker {
  display: none;
}

ai summary:hover {
  background-color: var(--p-hover);
}

ai details[open] summary {
  border-bottom-color: var(--p-border);
}

/* 樱花缓缓流动的动画 */
@keyframes sakuraFlow {
  0% { background-position: 0 0; }
  100% { background-position: 120px 120px; }
}

ai details p {
  margin: 0;
  padding: 8px 14px;
  border-bottom: 1px dashed rgba(255, 183, 197, 0.5);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: baseline;
}

ai details p:last-child {
  border-bottom: none;
}

/* 字段名与字段值样式 */
ai f {
  font-weight: 600;
  color: #d47a8c;
  font-size: 12px;
  background: rgba(255, 183, 197, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
}

ai v {
  color: var(--p-text);
  flex: 1;
}

/* 针对不同模块的微调 */
ai .th summary { color: var(--p-sub); font-size: 13px; }
ai .st summary { color: #d47a8c; }
ai .mem p {
  border-left: 3px solid var(--p-border);
  padding-left: 10px;
  margin: 4px 14px 8px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 0 6px 6px 0;
}
ai .opt p {
  transition: all 0.2s;
  cursor: pointer;
}
ai .opt p:hover {
  background: var(--p-hover);
  padding-left: 18px;
  color: #d47a8c;
}

/* 正文区域保护 */
ai article {
  padding: 12px 4px;
  color: #333;
  font-size: 15px;
  line-height: 1.7;
}
/* 1. 隐藏顶部默认的颜色装饰条，保持整体纯粹清爽 */
[class*="bg-[#F1CBCB]"], 
[class*="bg-[#c9e1e9]"] {
    display: none !important;
}

/* 2. 聊天框主体：淡蓝渐变、精致边框与柔和悬浮阴影 */
.bg-gray-100\/90.relative.inline-block {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
    border: 1px solid rgba(186, 230, 253, 0.8) !important;
    border-radius: 18px !important;
    box-shadow: 0 8px 24px -4px rgba(125, 211, 252, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
    padding: 18px 24px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* 聊天框鼠标悬浮时增加轻微的呼吸上浮感 */
.bg-gray-100\/90.relative.inline-block:hover {
    box-shadow: 0 12px 28px -4px rgba(125, 211, 252, 0.25) !important;
    transform: translateY(-2px) !important;
}

/* 3. 主文本内容：强制使用深青灰色以确保在浅色背景下的绝对可读性 */
.markdown-body {
    color: #334155 !important; /* 柔和的深青灰，比纯黑色更契合清新主题 */
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif !important;
    line-height: 1.7 !important;
    background: transparent !important;
}

/* 强调文本强化 */
.markdown-body strong {
    color: #0f172a !important;
    font-weight: 600 !important;
}

/* 4. 底部附加元素：融入淡雅主题，降低视觉干扰 */
/* 底部操作按钮 (复制, 编辑, 删除等) */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary {
    color: #64748b !important;
    transition: color 0.2s ease !important;
}

.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
    color: #0284c7 !important; /* 悬浮时呈现稍微鲜艳的海蓝色 */
    background: transparent !important;
}

/* 模型名称与 Token 消耗文本 (统一调整为低饱和度的灰蓝色) */
.MuiTypography-root.MuiTypography-body2.css-6c0gf2,
.text-orange-500 {
    color: #94a3b8 !important;
    font-weight: 400 !important;
}