/* ===== 微信聊天界面完整样式 ===== */

/* 容器 */
.wechat-container {
  width: 375px;
  max-width: 100%;
  margin: 20px auto;
  border-radius: 20px;
  overflow: hidden;
  background-color: #EDEDED;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  color: #111;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ===== 状态栏 ===== */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background-color: #303030;
  letter-spacing: 0.5px;
}

/* ===== 聊天头部 ===== */
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px 12px;
  background-color: #303030;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.back-btn {
  font-size: 20px;
  color: #fff;
  cursor: pointer;
  padding: 4px 8px 4px 0;
  font-weight: 300;
}

.header-title {
  font-size: 17px;
  font-weight: 500;
  color: #fff;
  flex: 1;
  text-align: center;
  letter-spacing: 0.3px;
}

.header-more {
  font-size: 22px;
  color: #fff;
  cursor: pointer;
  padding: 4px 0 4px 8px;
  letter-spacing: 2px;
}

/* ===== 消息区域 ===== */
.chat-messages {
  padding: 12px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 320px;
  max-height: 520px;
  overflow-y: auto;
  background-color: #EDEDED;
}

/* 滚动条美化 */
.chat-messages::-webkit-scrollbar {
  width: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
}

/* ===== 时间分割线 ===== */
.chat-time-divider {
  text-align: center;
  font-size: 11px;
  color: #999;
  padding: 6px 0 4px;
  letter-spacing: 0.5px;
}

/* ===== 消息行 ===== */
.message-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 100%;
}

.message-row.self {
  flex-direction: row;
  justify-content: flex-end;
}

/* ===== 头像 ===== */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  text-transform: uppercase;
  background-color: #ccc;
  overflow: hidden;
}

/* ===== 气泡 - 通用 ===== */
.bubble {
  max-width: 65%;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 15px;
  line-height: 1.55;
  word-break: break-word;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* 对方气泡（白色） */
.bubble.white {
  background-color: #fff;
  color: #111;
  border-top-left-radius: 2px;
}

/* 自己气泡（绿色） */
.bubble.green {
  background-color: #95EC69;
  color: #111;
  border-top-right-radius: 2px;
}

/* 气泡小三角 - 左侧（对方） */
.message-row:not(.self) .bubble::before {
  content: "";
  position: absolute;
  top: 12px;
  left: -6px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 6px solid #fff;
}

/* 气泡小三角 - 右侧（自己） */
.message-row.self .bubble::before {
  content: "";
  position: absolute;
  top: 12px;
  right: -6px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 6px solid #95EC69;
}

/* ===== 转账消息 ===== */
.bubble-transfer {
  max-width: 240px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
}

.message-row:not(.self) .bubble-transfer {
  border-top-left-radius: 2px;
}

.message-row.self .bubble-transfer {
  border-top-right-radius: 2px;
}

.transfer-amount {
  background: linear-gradient(135deg, #F8A035, #F0880A);
  color: #fff;
  padding: 18px 16px 6px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.transfer-label {
  background: linear-gradient(135deg, #F8A035, #F0880A);
  color: rgba(255, 255, 255, 0.85);
  padding: 2px 16px 16px;
  font-size: 12px;
}

.transfer-footer {
  background-color: #FAFAFA;
  padding: 8px 16px;
  font-size: 11px;
  color: #999;
  border-top: 1px solid #eee;
}

/* ===== 红包消息 ===== */
.bubble-redpacket {
  max-width: 240px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
}

.message-row:not(.self) .bubble-redpacket {
  border-top-left-radius: 2px;
}

.message-row.self .bubble-redpacket {
  border-top-right-radius: 2px;
}

.rp-title {
  background: linear-gradient(135deg, #E25141, #C83C2C);
  color: #fff;
  padding: 18px 16px 4px;
  font-size: 16px;
  font-weight: 500;
}

.rp-desc {
  background: linear-gradient(135deg, #E25141, #C83C2C);
  color: rgba(255, 255, 255, 0.8);
  padding: 2px 16px 16px;
  font-size: 12px;
}

.rp-footer {
  background-color: #FAFAFA;
  padding: 8px 16px;
  font-size: 11px;
  color: #999;
  border-top: 1px solid #eee;
}

/* ===== 底部输入栏 ===== */
.chat-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background-color: #F7F7F7;
  border-top: 1px solid #DEDEDE;
}

.input-icon {
  font-size: 24px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 2px;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.input-icon:hover {
  opacity: 1;
}

.input-field {
  flex: 1;
  background-color: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  color: #999;
  min-height: 20px;
  line-height: 20px;
}

/* ===== 响应式适配 ===== */
@media (max-width: 420px) {
  .wechat-container {
    width: 100%;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
  }
}
/* ============================================================
   Modern Minimal · 现代简约（全实色，无透明）
   底 #ffffff / 面 #f7f9fc / 分隔 #e7ebf0 / 弱面 #f2f5f9
   主蓝 #2563eb · 浅蓝 #93b4ef · 蓝底 #eff5ff
   墨 #1f2937 · 正文 #445064 · 弱字 #8b95a5
   ------------------------------------------------------------
   本版修正：状态栏不再裁切内容（顶条改 border-top）
             表格自身横向滚动，单元格禁止逐字换行
             移除右上角徽章，标题栏占满整行
   ============================================================ */

/* ---------- 动画池 ---------- */
@keyframes xm-plane-fly {
  0%   { left: -14%; opacity: 0; transform: translateY(4px) rotate(8deg); }
  14%  { opacity: 1; }
  50%  { transform: translateY(-5px) rotate(-7deg); }
  86%  { opacity: 1; }
  100% { left: 100%; opacity: 0; transform: translateY(3px) rotate(6deg); }
}
@keyframes xm-plane-trail {
  to { background-position: -12px 0; }
}

/* ===================== 全局盒模型 ===================== */
details, details * { box-sizing: border-box !important; }

/* ===================== 状态栏 · 卡片 ===================== */
details {
  position: relative !important;
  max-width: 100% !important;
  margin: 14px 0 !important;
  padding: 0 !important;
  overflow: visible !important;                 /* 关键：不裁切内容 */
  border: 1px solid #e7ebf0 !important;
  border-top: 2px solid #2563eb !important;     /* 顶条用边框实现 */
  border-radius: 10px !important;
  background: #ffffff !important;
  box-shadow: 0 1px 2px #f0f3f7 !important;
  color: #1f2937 !important;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, "Segoe UI", Roboto, sans-serif !important;
  overflow-wrap: break-word !important;
}
details::before { content: none !important; display: none !important; }
details::after  { content: none !important; display: none !important; }

/* ===== 标题栏 ===== */
details > summary {
  position: relative !important;
  padding: 10px 14px 10px 30px !important;
  cursor: pointer !important;
  list-style: none !important;
  user-select: none !important;
  overflow: hidden !important;                  /* 只裁标题自身，保住圆角 */
  border-radius: 8px 8px 0 0 !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.4px !important;
  color: #1f2937 !important;
  background: #f7f9fc !important;
  border-bottom: 1px solid #edf0f4 !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  transition: background 0.2s ease, color 0.2s ease !important;
}
details > summary:hover { background: #f2f6fb !important; color: #14213a !important; }
details > summary::-webkit-details-marker { display: none !important; }
details > summary::marker { content: "" !important; }

/* 折叠指示 · 极简三角 */
details > summary::before {
  content: "" !important;
  position: absolute !important;
  left: 13px !important;
  top: 50% !important;
  width: 6px !important;
  height: 6px !important;
  margin-top: -4px !important;
  border-right: 1.6px solid #2563eb !important;
  border-bottom: 1.6px solid #2563eb !important;
  transform: rotate(-45deg) !important;
  transition: transform 0.22s ease !important;
}
details[open] > summary::before {
  transform: rotate(45deg) !important;
  margin-top: -5px !important;
}

/* ===== 卡片内容 ===== */
details > *:not(summary):not(table) {
  padding: 0 14px !important;
  margin: 7px 0 !important;
  line-height: 1.75 !important;
  color: #445064 !important;
}
details > p { font-size: 14px !important; }
details[open] { padding-bottom: 10px !important; }

details strong, details b { color: #1f2937 !important; font-weight: 600 !important; }
details em, details i { color: #2563eb !important; font-style: normal !important; }
details code {
  background: #f2f5f9 !important;
  color: #1d4ed8 !important;
  border: 1px solid #e4e9f0 !important;
  border-radius: 4px !important;
  padding: 1px 6px !important;
  font-size: 12.5px !important;
}
details blockquote {
  margin: 9px 14px !important;
  padding: 8px 14px !important;
  border: none !important;
  border-left: 3px solid #cfe0fb !important;
  border-radius: 0 8px 8px 0 !important;
  background: #f7f9fc !important;
  color: #4b5768 !important;
}
details hr {
  border: none !important;
  height: 1px !important;
  margin: 12px 14px !important;
  background: #ebeef3 !important;
}
details ul, details ol { padding-left: 28px !important; margin: 6px 0 !important; }
details li { margin: 2px 0 !important; color: #445064 !important; line-height: 1.7 !important; }
details ul li::marker { color: #93b4ef !important; }
details ol li::marker { color: #2563eb !important; font-weight: 600 !important; }

/* ===================== 表格 · 自身横向滚动 ===================== */
details table,
.markdown-body table {
  display: block !important;                    /* 变成可滚动块 */
  width: max-content !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  border: 1px solid #e7ebf0 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: none !important;
  font-size: 13px !important;
}
details table { max-width: calc(100% - 28px) !important; margin: 12px 14px !important; }
.markdown-body table { margin: 12px 0 !important; }

/* 单元格 · 禁止逐字换行 */
details th, details td,
.markdown-body th, .markdown-body td {
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  max-width: none !important;
  vertical-align: middle !important;
  text-align: left !important;
}
details th, .markdown-body th {
  padding: 7px 12px !important;
  background: #f5f8fc !important;
  color: #55617a !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px !important;
  border-bottom: 1px solid #e7ebf0 !important;
}
details td, .markdown-body td {
  padding: 7px 12px !important;
  color: #445064 !important;
  line-height: 1.6 !important;
  border-bottom: 1px solid #f2f4f8 !important;
}
details td:first-child, .markdown-body td:first-child {
  color: #1f2937 !important;
  font-weight: 600 !important;
}
details tbody tr { transition: background 0.18s ease !important; }
details tbody tr:nth-child(even) { background: #fbfcfe !important; }
details tbody tr:last-child td { border-bottom: none !important; }
details tbody tr:hover { background: #f4f8ff !important; }
details tbody tr:hover td { color: #1f2937 !important; }

/* 表格滚动条 · 细窄 */
details table::-webkit-scrollbar,
.markdown-body table::-webkit-scrollbar { height: 6px !important; }
details table::-webkit-scrollbar-track,
.markdown-body table::-webkit-scrollbar-track { background: #f2f5f9 !important; }
details table::-webkit-scrollbar-thumb,
.markdown-body table::-webkit-scrollbar-thumb {
  background: #c8d4e6 !important;
  border-radius: 999px !important;
}

/* ===================== 嵌套卡片 ===================== */
details details {
  overflow: visible !important;
  margin: 10px 14px !important;
  border: 1px solid #ebeef3 !important;
  border-top: 2px solid #93b4ef !important;
  border-radius: 8px !important;
  background: #fbfcfe !important;
  box-shadow: none !important;
}
details details > summary {
  padding: 8px 12px 8px 28px !important;
  font-size: 13.5px !important;
  color: #2f3b52 !important;
  background: #f6f9fc !important;
  border-radius: 6px 6px 0 0 !important;
}
details details > summary::before { left: 11px !important; }
details details table { max-width: calc(100% - 24px) !important; margin: 10px 12px !important; }

/* ==================== 移动端适配 ==================== */
@media (max-width: 640px) {
  details {
    overflow: visible !important;
    overflow-x: visible !important;
    margin: 12px 0 !important;
  }
  details > summary {
    padding: 9px 12px 9px 26px !important;
    font-size: 14px !important;
    letter-spacing: 0.3px !important;
  }
  details > summary::before { left: 10px !important; }

  details table {
    min-width: 0 !important;
    width: max-content !important;
    max-width: calc(100% - 20px) !important;
    margin: 10px 10px !important;
    font-size: 12.5px !important;
  }
  details th, details td { padding: 6px 10px !important; }

  details > *:not(summary):not(table) { padding: 0 10px !important; }
  details blockquote { margin: 8px 10px !important; }
  details hr { margin: 10px 10px !important; }
  details ul, details ol { padding-left: 24px !important; }

  details details { margin: 8px 10px !important; }
  details details > summary { padding-left: 26px !important; font-size: 13px !important; }
  details details table { max-width: calc(100% - 16px) !important; margin: 8px 8px !important; }
}

/* ===================== 顶部栏 ===================== */
.sticky.w-full.top-0.flex.items-center {
  background: #ffffff !important;
  border-bottom: 1px solid #ebeef3 !important;
  box-shadow: 0 1px 0 #f1f4f8 !important;
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif !important;
}
.sticky.w-full.top-0.flex.items-center::after {
  content: none !important;
  display: none !important;
}

/* 模型选择器 */
#ai-model-selector .group.flex.items-center {
  padding: 2px 10px !important;
  background: #f7f9fc !important;
  border: 1px solid #e7ebf0 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  transition: border-color 0.2s ease, background 0.2s ease !important;
}
#ai-model-selector .group.flex.items-center:hover {
  border-color: #bcd2f7 !important;
  background: #eff5ff !important;
}
#ai-model-selector .truncate.text-\[13px\] {
  color: #2f3b52 !important;
  font-weight: 500 !important;
  letter-spacing: 0.3px !important;
}
#ai-model-selector .shrink-0.flex.items-center svg { color: #2563eb !important; stroke-width: 2 !important; }

/* 历史记录 */
.sticky.w-full.top-0 svg.lucide-clock-8 {
  color: #6b7688 !important;
  stroke-width: 2 !important;
  transition: color 0.2s ease !important;
}
.sticky.w-full.top-0 svg.lucide-clock-8:hover { color: #2563eb !important; }
.sticky.w-full.top-0 span.MuiBadge-dot.md\:hidden {
  background: #2563eb !important;
  border: none !important;
  box-shadow: 0 0 0 2px #ffffff !important;
}

/* 音乐按钮 */
.sticky.w-full.top-0 button.MuiIconButton-root svg.lucide-music-2 {
  color: #6b7688 !important;
  stroke-width: 2 !important;
  transition: color 0.2s ease !important;
}
.sticky.w-full.top-0 button.MuiIconButton-root:hover svg.lucide-music-2 { color: #2563eb !important; }

/* 设置按钮 */
#header-setting-button {
  background: #f7f9fc !important;
  border: 1px solid #e7ebf0 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  transition: border-color 0.2s ease, background 0.2s ease !important;
}
#header-setting-button:hover { border-color: #bcd2f7 !important; background: #eff5ff !important; }
#header-setting-button svg {
  color: #55617a !important;
  stroke-width: 2 !important;
  transition: color 0.2s ease !important;
}
#header-setting-button:hover svg { color: #2563eb !important; }

/* ===================== 开场白选择器 ===================== */
div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"] {
  background: #ffffff !important;
  border: 1px solid #e7ebf0 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  transition: border-color 0.2s ease, background 0.2s ease !important;
}
div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"]:hover {
  border-color: #bcd2f7 !important;
  background: #fafcff !important;
}
div.flex.items-center.h-9.cursor-pointer.group svg[data-icon="SlidersH"] { color: #2563eb !important; }
div.flex.items-center.h-9.cursor-pointer.group svg[data-icon="ChevronDown"] {
  color: #8b95a5 !important;
  transition: transform 0.2s ease, color 0.2s ease !important;
}
div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"]:hover svg[data-icon="ChevronDown"] {
  transform: translateY(1px) !important;
  color: #2563eb !important;
}

/* ===================== 按钮栏 ===================== */
#ai-mod-button2 button.MuiButton-root {
  color: #2f3b52 !important;
  background: #ffffff !important;
  border: 1px solid #e7ebf0 !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
  letter-spacing: 0.3px !important;
  box-shadow: none !important;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease !important;
}
#ai-mod-button2 button.MuiButton-root:hover {
  color: #1d4ed8 !important;
  background: #eff5ff !important;
  border-color: #bcd2f7 !important;
}
#ai-mod-button2 button.MuiButton-root:active { background: #e3edfd !important; }
#ai-mod-button2 button.MuiButton-root svg { color: #2563eb !important; stroke-width: 2 !important; }

/* ===================== 底部输入区 ===================== */
.bg-gradient-to-t {
  background: #ffffff !important;
  border-top: 1px solid #ebeef3 !important;
  box-shadow: none !important;
}
#ai-chat-bottom-input {
  border: 1px solid #e2e7ee !important;
  border-radius: 12px !important;
  background: #f9fbfd !important;
  box-shadow: none !important;
  transition: border-color 0.2s ease, background 0.2s ease !important;
}
#ai-chat-bottom-input:focus-within {
  border-color: #93b4ef !important;
  background: #ffffff !important;
}
#ai-chat-input {
  color: #1f2937 !important;
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif !important;
  letter-spacing: 0.2px !important;
}
#ai-chat-input::placeholder {
  color: #a3acb9 !important;
  font-style: normal !important;
  letter-spacing: 0.4px !important;
}
#ai-chat-input::selection { background: #d9e7fd !important; color: #14213a !important; }

/* ===================== 分页 ===================== */
.MuiPaginationItem-root {
  color: #55617a !important;
  background: #ffffff !important;
  border: 1px solid #e7ebf0 !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
}
.MuiPaginationItem-root:hover {
  color: #1d4ed8 !important;
  border-color: #bcd2f7 !important;
  background: #eff5ff !important;
}
.MuiPaginationItem-root.Mui-selected {
  color: #ffffff !important;
  background: #2563eb !important;
  border-color: #2563eb !important;
  box-shadow: none !important;
}
.MuiPaginationItem-root.Mui-disabled { color: #c2c9d4 !important; }
.MuiPaginationItem-icon { color: #8b95a5 !important; }
.MuiStack-root.css-1uwir8f .MuiBox-root { color: #55617a !important; }
.MuiInputBase-input { color: #1f2937 !important; }

/* ===================== 评论区 ===================== */
div[class*="w-full"][class*="bg-white"][class*="bottom-0"] {
  background: #ffffff !important;
  border-top: 1px solid #ebeef3 !important;
}
div.text-lg.font-bold {
  color: #1f2937 !important;
  font-weight: 600 !important;
  letter-spacing: 0.6px !important;
}
p.MuiTypography-body1.text-grey-600 { color: #55617a !important; }
span.MuiRating-iconEmpty svg { color: #e2e7ee !important; }
span.MuiRating-iconFilled svg { color: #f5a524 !important; }
span.text-orange-500 { color: #2563eb !important; font-weight: 600 !important; }

div.flex.flex-col.border-gray-200 {
  background: #ffffff !important;
  border: 1px solid #e7ebf0 !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}
textarea.rc-textarea {
  color: #1f2937 !important;
  background: #ffffff !important;
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif !important;
}
div.bg-gray-100.text-gray-500 {
  background: #f2f5f9 !important;
  color: #55617a !important;
  border-radius: 999px !important;
}
div.cursor-pointer.group.flex.items-center.justify-center {
  background: #2563eb !important;
  border: none !important;
  border-radius: 8px !important;
  transition: background 0.2s ease !important;
}
div.cursor-pointer.group.flex.items-center.justify-center:hover { background: #1d4ed8 !important; }
div[data-state="closed"] svg[data-icon="Send03"] { color: #ffffff !important; }

div.style_divider__mW0YX {
  border: none !important;
  height: 1px !important;
  background: #ebeef3 !important;
}

button.MuiButton-containedPrimary {
  color: #ffffff !important;
  background: #2563eb !important;
  border: none !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px !important;
  box-shadow: none !important;
}
button.MuiButton-containedPrimary:hover { background: #1d4ed8 !important; }
button.MuiButton-outlinedPrimary {
  color: #2f3b52 !important;
  background: #ffffff !important;
  border: 1px solid #e7ebf0 !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
}
button.MuiButton-outlinedPrimary:hover {
  color: #1d4ed8 !important;
  border-color: #bcd2f7 !important;
  background: #eff5ff !important;
}

div.group.ml-0 { transition: none !important; }
div.group img.rounded-full {
  border: 1px solid #ebeef3 !important;
  box-shadow: none !important;
}
div.text-sm.text-grey-600 span.font-bold { color: #1f2937 !important; font-weight: 600 !important; }
span.text-\[10px\] {
  padding: 1px 8px !important;
  border-radius: 999px !important;
  color: #2563eb !important;
  background: #eff5ff !important;
  border: 1px solid #dbe7fb !important;
}
div.break-all { color: #445064 !important; }
div.text-xs.text-grey-600 { color: #8b95a5 !important; }
button.text-gray-400 svg {
  color: #a3acb9 !important;
  transition: color 0.2s ease !important;
}
button.text-gray-400:hover svg { color: #2563eb !important; }
span.cursor-pointer { color: #2563eb !important; font-weight: 500 !important; }
div.ml-8.border-l { border-left: 1px solid #ebeef3 !important; }

/* ===================== 聊天气泡 ===================== */
.bg-gray-100\/90.relative.inline-block {
  border: 1px solid #e9edf3 !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  box-shadow: 0 1px 2px #f0f3f7 !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}
.bg-gray-100\/90.relative.inline-block:hover {
  border-color: #dbe2ec !important;
  box-shadow: 0 2px 6px -2px #e3e8f0 !important;
}
/* 用户侧气泡 */
.bg-gray-100\/90.relative.inline-block:not(.chat-answer-container .bg-gray-100\/90) {
  background: #f6f9ff !important;
  border: 1px solid #e2ebfa !important;
  border-left: 3px solid #2563eb !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}

/* ===== 气泡内文本 ===== */
.markdown-body {
  color: #445064 !important;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, "Segoe UI", Roboto, sans-serif !important;
  line-height: 1.8 !important;
  font-size: 14.5px !important;
  letter-spacing: 0.2px !important;
}
.markdown-body p { margin: 8px 0 !important; }
.markdown-body strong, .markdown-body b { color: #1f2937 !important; font-weight: 600 !important; }
.markdown-body em, .markdown-body i { color: #2563eb !important; font-style: normal !important; }
.markdown-body a {
  color: #2563eb !important;
  text-decoration: none !important;
  border-bottom: 1px solid #cfe0fb !important;
}
.markdown-body blockquote {
  border: none !important;
  border-left: 3px solid #cfe0fb !important;
  background: #f7f9fc !important;
  border-radius: 0 8px 8px 0 !important;
  padding: 7px 14px !important;
  margin: 10px 0 !important;
  color: #4b5768 !important;
}
.markdown-body code {
  background: #f2f5f9 !important;
  color: #1d4ed8 !important;
  border: 1px solid #e4e9f0 !important;
  border-radius: 4px !important;
  padding: 1px 6px !important;
}

/* ===================== 代码块 ===================== */
.markdown-body pre {
  border-radius: 10px !important;
  overflow: hidden !important;
  background: #ffffff !important;
}
.markdown-body pre > div {
  border: 1px solid #e7ebf0 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  background: #fbfcfe !important;
  box-shadow: none !important;
}
.markdown-body pre > div > div.flex.justify-between.h-8,
.markdown-body pre > div > div.border-b {
  background: #f5f8fc !important;
  border-color: #e7ebf0 !important;
}
.markdown-body pre > div > div.flex.justify-between > div.text-\[13px\],
.markdown-body pre > div > div.flex.justify-between > div:first-child {
  color: #6b7688 !important;
  letter-spacing: 0.8px !important;
  font-weight: 500 !important;
}
/* 复制图标配色联动 */
.markdown-body pre svg.lucide-copy,
.markdown-body pre div[data-tooltip-id^="copy-tooltip"] > svg {
  color: #98a2b0 !important;
}
.markdown-body pre .group:hover svg.lucide-copy,
.markdown-body pre div[data-tooltip-id^="copy-tooltip"]:hover > svg {
  color: #2563eb !important;
}
/* 覆盖内联样式 */
.markdown-body pre > div > div[node] {
  background: #fbfcfe !important;
  color: #445064 !important;
  padding: 12px 14px !important;
}
.markdown-body pre code[class^="language-"] {
  color: #445064 !important;
  font-size: 12.8px !important;
  line-height: 1.7 !important;
}
.markdown-body pre > code[node] {
  display: block !important;
  padding: 12px 14px !important;
  border: 1px solid #e7ebf0 !important;
  border-radius: 10px !important;
  background: #fbfcfe !important;
  color: #445064 !important;
  font-size: 12.8px !important;
  line-height: 1.7 !important;
}

/* ===================== 底部附加元素 ===================== */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary {
  color: #6b7688 !important;
  border-radius: 8px !important;
  transition: color 0.2s ease, background 0.2s ease !important;
}
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
  color: #1d4ed8 !important;
  background: #eff5ff !important;
}
.MuiTypography-root.MuiTypography-body2.css-6c0gf2 { color: #8b95a5 !important; letter-spacing: 0.3px !important; }
.text-orange-500 { color: #2563eb !important; }

/* ===================== 加载动画 · 蓝色纸飞机 ===================== */
.style-module__AtdJSq__dot-flashing.style-module__AtdJSq__text { display: none !important; }

.flex.items-center.justify-center.w-6.h-5 {
  position: relative !important;
  width: 100% !important;
  min-width: 112px !important;
  max-width: 160px !important;
  height: 32px !important;
  min-height: 32px !important;
  margin-left: 0 !important;
  overflow: hidden !important;
  border-radius: 999px !important;
  background: #f6f9ff !important;
  border: 1px solid #e4ecfa !important;
}

/* 虚线航迹 */
.flex.items-center.justify-center.w-6.h-5::after {
  content: "" !important;
  position: absolute !important;
  left: 10px !important;
  right: 10px !important;
  top: 50% !important;
  height: 2px !important;
  margin-top: -1px !important;
  border-radius: 2px !important;
  background-image: repeating-linear-gradient(90deg, #cddffa 0 6px, #eaf1fd 6px 12px) !important;
  background-size: 12px 2px !important;
  animation: xm-plane-trail 0.9s linear infinite !important;
  pointer-events: none !important;
}

/* 纸飞机 */
.flex.items-center.justify-center.w-6.h-5::before {
  content: "" !important;
  position: absolute !important;
  top: 50% !important;
  left: -14% !important;
  z-index: 2 !important;
  width: 20px !important;
  height: 20px !important;
  margin-top: -10px !important;
  pointer-events: none !important;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M22.4 2 L1.8 9.2 L10.6 12.9 Z' fill='%2393c5fd'/%3E%3Cpath d='M22.4 2 L10.6 12.9 L14.4 21.8 Z' fill='%232563eb'/%3E%3Cpath d='M22.4 2 L10.6 12.9' stroke='%231d4ed8' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain !important;
  animation: xm-plane-fly 2.2s cubic-bezier(.45,.05,.55,.95) infinite !important;
}

@media (max-width: 480px) {
  .flex.items-center.justify-center.w-6.h-5 {
    min-width: 92px !important;
    max-width: 120px !important;
    height: 28px !important;
    min-height: 28px !important;
  }
  .flex.items-center.justify-center.w-6.h-5::before {
    width: 17px !important;
    height: 17px !important;
    margin-top: -8.5px !important;
  }
}

/* ===================== 角色对话 ===================== */
p.role-danlan,
p.role-danlan-thought,
p.role-lan,
p.role-zon,
p.role-qianhon,
p.role-hui {
  position: relative !important;
  margin: 12px 0 !important;
  padding: 11px 14px !important;
  border: 1px solid #eaeef4 !important;
  border-left-width: 3px !important;
  border-left-style: solid !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif !important;
  font-size: 14.5px !important;
  line-height: 1.8 !important;
  letter-spacing: 0.2px !important;
  box-shadow: none !important;
  transition: border-color 0.2s ease, background 0.2s ease !important;
}

/* 角色标签 · 行内胶囊，不做绝对定位 */
p.role-danlan::before,
p.role-danlan-thought::before,
p.role-lan::before,
p.role-zon::before,
p.role-qianhon::before,
p.role-hui::before {
  display: block !important;
  width: fit-content !important;
  margin: 0 0 6px !important;
  padding: 1px 8px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  font-style: normal !important;
  letter-spacing: 1px !important;
  line-height: 1.6 !important;
  border-radius: 999px !important;
  background: #ffffff !important;
}
p.role-danlan::after,
p.role-danlan-thought::after,
p.role-lan::after,
p.role-zon::after,
p.role-qianhon::after,
p.role-hui::after { content: none !important; display: none !important; }

/* 玩家 · 蓝 */
p.role-danlan { border-left-color: #2563eb !important; color: #333f54 !important; }
p.role-danlan::before {
  content: "玩家" !important;
  color: #1d4ed8 !important;
  background: #eff5ff !important;
  border: 1px solid #dbe7fb !important;
}
p.role-danlan:hover { border-color: #dbe7fb !important; background: #fafcff !important; }

/* 玩家心声 · 靛 */
p.role-danlan-thought {
  border-left-color: #6366f1 !important;
  color: #3d4258 !important;
  background: #fbfbff !important;
}
p.role-danlan-thought::before {
  content: "玩家心声" !important;
  color: #4f46e5 !important;
  background: #f1f2ff !important;
  border: 1px solid #e0e2fb !important;
}
p.role-danlan-thought:hover { border-color: #e0e2fb !important; }

/* 心声 · 青 */
p.role-lan {
  border-left-color: #0f9488 !important;
  color: #35474a !important;
  background: #fbfefd !important;
}
p.role-lan::before {
  content: "心声" !important;
  color: #0e7c72 !important;
  background: #ecf8f6 !important;
  border: 1px solid #d5ece8 !important;
}
p.role-lan:hover { border-color: #d5ece8 !important; }

/* 男 · 石板灰 */
p.role-zon { border-left-color: #475569 !important; color: #3a4356 !important; }
p.role-zon::before {
  content: "男" !important;
  color: #445064 !important;
  background: #f2f5f9 !important;
  border: 1px solid #e4e9f0 !important;
}
p.role-zon:hover { border-color: #e4e9f0 !important; background: #fafbfd !important; }

/* 女 · 玫 */
p.role-qianhon { border-left-color: #d1477a !important; color: #4a3742 !important; }
p.role-qianhon::before {
  content: "女" !important;
  color: #c03a6d !important;
  background: #fdf2f6 !important;
  border: 1px solid #f7dde7 !important;
}
p.role-qianhon:hover { border-color: #f7dde7 !important; background: #fffbfc !important; }

/* 职业角色 · 琥珀 */
p.role-hui { border-left-color: #b47818 !important; color: #4a4436 !important; }
p.role-hui::before {
  content: "职业角色" !important;
  color: #a06b12 !important;
  background: #fdf7ea !important;
  border: 1px solid #f2e6c8 !important;
}
p.role-hui:hover { border-color: #f2e6c8 !important; background: #fffdf8 !important; }

/* 角色框内元素 */
p.role-danlan strong, p.role-danlan-thought strong,
p.role-lan strong, p.role-zon strong,
p.role-qianhon strong, p.role-hui strong {
  color: #1f2937 !important;
  font-weight: 600 !important;
}
p.role-danlan code, p.role-danlan-thought code,
p.role-lan code, p.role-zon code,
p.role-qianhon code, p.role-hui code {
  background: #f2f5f9 !important;
  color: #1d4ed8 !important;
  border: 1px solid #e4e9f0 !important;
  border-radius: 4px !important;
  padding: 1px 6px !important;
}

@media (max-width: 640px) {
  .markdown-body { font-size: 14px !important; line-height: 1.78 !important; }
  p.role-danlan, p.role-danlan-thought, p.role-lan,
  p.role-zon, p.role-qianhon, p.role-hui {
    padding: 10px 12px !important;
    margin: 10px 0 !important;
    font-size: 14px !important;
  }
}

/* ===================== 低动效偏好 ===================== */
@media (prefers-reduced-motion: reduce) {
  .flex.items-center.justify-center.w-6.h-5::before {
    animation: none !important;
    left: 42% !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .flex.items-center.justify-center.w-6.h-5::after { animation: none !important; }
  details > summary::before,
  details[open] > summary::before { transition: none !important; }
  details tbody tr { transition: none !important; }
}