/* =============================================
   风月 · 水墨 (浅色·中性)
   is-dark: 0
   
   bg-deep: #faf7f2
   bg-paper: rgba(250,246,240,0.96)
   text-main: #3d2b1f
   text-muted: rgba(120,87,60,0.28)
   accent: #8b6e50
   accent-text: #5c3d2a
   border: rgba(120,87,60,0.12)

   亮点① blockquote → 墨色侧边框与半透明底色，渲染古风旁白
   亮点② 加载动画  → 内嵌 SVG SMIL 双重波纹扩散，兼容性极佳
   亮点③ 分隔线    → 水墨淡棕色，柔和视觉分割
   ============================================= */

/* ===== 危险区域 ===== */
/* 1. 隐藏装饰条 */
[class*="bg-[#F1CBCB]"], [class*="bg-[#c9e1e9]"] { display: none !important; }

/* 2. 代码块 */
.markdown-body pre { background: rgba(240,232,220,0.80) !important; border: 1px solid rgba(120,87,60,0.18) !important; border-left: 3px solid #8b6e50 !important; border-radius: 6px !important; padding: 1em 1.2em !important; overflow-x: auto !important; }
.markdown-body pre code { background: transparent !important; color: #3d2b1f !important; }
.markdown-body :not(pre)>code { background: rgba(120,87,60,0.10) !important; color: #8b6e50 !important; padding: 0.15em 0.45em !important; border-radius: 4px !important; }

/* 3. details折叠块 (严格平台兜底) */
.markdown-body details { display: block !important; width: 100% !important; max-width: 100% !important; overflow: hidden !important; background: rgba(254,202,159,0.01) !important; border: 1px solid rgba(120,87,60,0.12) !important; border-radius: 6px !important; margin: 8px 0 !important; transition: border-color 0.15s !important; }
.markdown-body details[open] { border-color: rgba(120,87,60,0.30) !important; }
.markdown-body details summary { display: block !important; width: 100% !important; list-style: none !important; position: relative !important; padding: 8px 12px 8px 32px !important; background: rgba(120,87,60,0.05) !important; color: #5c3d2a !important; border-bottom: 1px solid rgba(120,87,60,0.14) !important; cursor: pointer !important; font-weight: 600 !important; user-select: none !important; box-sizing: border-box !important; }
.markdown-body details summary::before { content: '\25B6' !important; position: absolute !important; left: 12px !important; top: 50% !important; transform: translateY(-50%) !important; color: #8b6e50 !important; font-size: 11px !important; transition: transform 0.2s ease !important; }
.markdown-body details[open] summary::before { transform: translateY(-50%) rotate(90deg) !important; }
.markdown-body details summary::-webkit-details-marker { display: none !important; }

/* 4. 滚动条 */
::-webkit-scrollbar { width: 3px !important; height: 3px !important; }
::-webkit-scrollbar-track { background: #faf7f2 !important; }
::-webkit-scrollbar-thumb { background: #b89a7c !important; border-radius: 3px !important; }
::-webkit-scrollbar-thumb:hover { background: #8b6e50 !important; }

/* 5. 选区 & 占位符 */
::placeholder { color: rgba(120,87,60,0.28) !important; opacity: 1 !important; }
::selection { background: rgba(120,87,60,0.10) !important; color: #5c3d2a !important; }

/* 6. 页面背景强制 */
body, html, #root, .app-root, .h-screen { background: #faf7f2 !important; color: #3d2b1f !important; cursor: auto !important; }

/* 7. 输入框强制可见 */
#ai-chat-input { background: rgba(250,246,240,0.95) !important; color: #3d2b1f !important; caret-color: #8b6e50 !important; border: 1px solid rgba(120,87,60,0.20) !important; border-radius: 14px !important; transition: border-color 0.2s !important; }
#ai-chat-input:focus { border-color: rgba(120,87,60,0.45) !important; outline: none !important; }
textarea.rc-textarea { background: rgba(250,246,240,0.95) !important; color: #3d2b1f !important; border: 1px solid rgba(120,87,60,0.20) !important; border-radius: 6px !important; }


/* ===== 顶部导航 ===== */
.sticky.w-full.top-0.flex.items-center { background: rgba(250,246,240,0.96) !important; border-bottom: 1px solid rgba(120,87,60,0.12) !important; backdrop-filter: blur(12px) !important; -webkit-backdrop-filter: blur(12px) !important; }
#ai-model-selector .group.flex.items-center { background: rgba(120,87,60,0.06) !important; border: 1px solid rgba(120,87,60,0.18) !important; border-radius: 6px !important; transition: all 0.15s !important; }
#ai-model-selector .group.flex.items-center:hover { background: rgba(120,87,60,0.10) !important; }
#ai-model-selector .truncate.text-[13px] { color: #8b6e50 !important; font-weight: 500 !important; }
#ai-model-selector .shrink-0.flex.items-center svg path { fill: #c27830 !important; }
#header-setting-button { color: #5c3d2a !important; }

/* 开场白区域 */
div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"] { background: rgba(255,255,255,0.70) !important; border: 1px solid rgba(120,87,60,0.12) !important; border-radius: 6px !important; color: #5c3d2a !important; }
div.flex.items-center.h-9.cursor-pointer.group svg[data-icon="SlidersH"], div.flex.items-center.h-9.cursor-pointer.group svg[data-icon="ChevronDown"] { color: #8b6e50 !important; }


/* ===== 侧边栏 ===== */
.shadow-lg.border-r.border-gray-200 { background: #faf7f2 !important; border-right: 1px solid rgba(120,87,60,0.12) !important; }
.MuiList-root { background: transparent !important; }
.conversation-text { color: #3d2b1f !important; }


/* ===== 功能按钮 ===== */
#ai-mod-button2 button.MuiButton-root { background: rgba(255,255,255,0.70) !important; border: 1px solid rgba(120,87,60,0.12) !important; color: #5c3d2a !important; border-radius: 6px !important; }
#ai-mod-button2 button.MuiButton-root svg { color: #8b6e50 !important; }


/* ===== 聊天气泡 ===== */
.bg-gray-100\/90.relative.inline-block { background: linear-gradient(135deg, #fee9c8, #f5efe6) !important; border: 1px solid rgba(120,87,60,0.22) !important; border-radius: 13px !important; padding: 10px 14px !important; box-shadow: 0 0 0px rgba(120,87,60,0.06) !important; font-size: 16px !important; line-height: 1.8 !important; font-weight: 500 !important; letter-spacing: 0.02em !important; color: #3d2b1f !important; }
.chat-answer-container .bg-gray-100\/90.relative.inline-block { background: linear-gradient(135deg, #f5efe6, #fee9c8) !important; }
.markdown-body { color: #3d2b1f !important; }
.markdown-body h1, .markdown-body h2, .markdown-body h3 { color: #5c3d2a !important; border-bottom-color: rgba(120,87,60,0.12) !important; }
.markdown-body ul, .markdown-body ol, .markdown-body li { color: #3d2b1f !important; }
.markdown-body blockquote { border-left: 4px solid rgba(120,87,60,0.40) !important; background: rgba(120,87,60,0.04) !important; color: #5c3d2a !important; padding: 8px 12px !important; margin: 12px 0 !important; border-radius: 0 6px 6px 0 !important; font-style: italic !important; }
.markdown-body table, .markdown-body th, .markdown-body td { border-color: rgba(120,87,60,0.18) !important; }
.markdown-body strong, .markdown-body em { color: #5c3d2a !important; }
.markdown-body a { color: #8b6e50 !important; text-decoration: underline !important; }


/* ===== 加载动画 (SVG SMIL 波纹) ===== */
.style_dot-flashing__8L91Q.style_text__zGhNq { display: none !important; }
.flex.items-center.justify-center.w-6.h-5 { position: relative !important; background: transparent !important; overflow: visible !important; }
.flex.items-center.justify-center.w-6.h-5::before { content: '' !important; display: block !important; position: absolute !important; width: 24px !important; height: 24px !important; left: 50% !important; top: 50% !important; transform: translate(-50%, -50%) !important; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='0' fill='none' stroke='%238b6e50' stroke-width='1.5'%3E%3Canimate attributeName='r' values='0; 10' dur='1.5s' repeatCount='indefinite' /%3E%3Canimate attributeName='opacity' values='1; 0' dur='1.5s' repeatCount='indefinite' /%3E%3C/circle%3E%3Ccircle cx='12' cy='12' r='0' fill='none' stroke='%238b6e50' stroke-width='1.5'%3E%3Canimate attributeName='r' values='0; 10' dur='1.5s' begin='0.75s' repeatCount='indefinite' /%3E%3Canimate attributeName='opacity' values='1; 0' dur='1.5s' begin='0.75s' repeatCount='indefinite' /%3E%3C/circle%3E%3C/svg%3E") no-repeat center center / contain !important; }


/* ===== 底部输入区 ===== */
.bg-gradient-to-t { background: linear-gradient(to top, #faf7f2 70%, transparent) !important; }
#ai-chat-bottom-input { background: transparent !important; }
#ai-send-button { background: linear-gradient(135deg, #78573c, #5c3d2a) !important; border-radius: 50% !important; color: #ffffff !important; transition: opacity 0.15s !important; }
#ai-send-button:hover { opacity: 0.9 !important; }


/* ===== 评论区 ===== */
div[class*="w-full"][class*="bg-white"][class*="bottom-0"] { background: #faf7f2 !important; border-top: 1px solid rgba(120,87,60,0.12) !important; }
div.text-lg.font-bold { color: #5c3d2a !important; }
p.MuiTypography-body1.text-grey-600 { color: #3d2b1f !important; }
span.MuiRating-iconEmpty svg { color: rgba(120,87,60,0.28) !important; }
span.MuiRating-iconFilled svg { color: #8b6e50 !important; }
span.text-orange-500 { color: #8b6e50 !important; }
div.flex.flex-col.border-gray-200 { border-color: rgba(120,87,60,0.12) !important; }
div.bg-gray-100.text-gray-500 { background: rgba(120,87,60,0.05) !important; color: #5c3d2a !important; border-radius: 6px !important; }
div.cursor-pointer.group.flex.items-center.justify-center { color: #8b6e50 !important; }
div[data-state="closed"] svg[data-icon="Send03"] { color: #8b6e50 !important; }
div.style_divider__mW0YX { border-color: rgba(120,87,60,0.14) !important; }
button.MuiButton-containedPrimary { background: rgba(120,87,60,0.05) !important; border: 1px solid rgba(120,87,60,0.15) !important; color: #5c3d2a !important; border-radius: 6px !important; }
button.MuiButton-outlinedPrimary { background: rgba(255,255,255,0.70) !important; border: 1px solid rgba(120,87,60,0.12) !important; color: #5c3d2a !important; border-radius: 6px !important; }
div.p-3.overflow-y-auto { background: #faf7f2 !important; }
div.text-sm.text-grey-600 span.font-bold { color: #5c3d2a !important; }
span.text-[10px] { color: rgba(120,87,60,0.5) !important; }
div.break-all { color: #3d2b1f !important; }
div.text-xs.text-grey-600 { color: rgba(120,87,60,0.6) !important; }
button.text-gray-400 { color: rgba(120,87,60,0.4) !important; }
button.text-gray-400:hover { color: #8b6e50 !important; }
div.ml-8.border-l { border-color: rgba(120,87,60,0.12) !important; }


/* ===== 分页 ===== */
.MuiPaginationItem-root { color: #3d2b1f !important; }
.MuiPaginationItem-root.Mui-selected { background: rgba(120,87,60,0.10) !important; color: #5c3d2a !important; font-weight: bold !important; }
.MuiPaginationItem-root.Mui-disabled { opacity: 0.4 !important; }


/* ===== MUI 全局 ===== */
.MuiDialog-paper, .MuiDrawer-paper { background: #faf7f2 !important; color: #3d2b1f !important; }
.MuiBackdrop-root { background: rgba(61, 43, 31, 0.4) !important; backdrop-filter: blur(2px) !important; -webkit-backdrop-filter: blur(2px) !important; }
.MuiDivider-root { border-color: rgba(120,87,60,0.14) !important; }
.MuiTypography-root { color: #3d2b1f !important; }
.MuiOutlinedInput-notchedOutline { border-color: rgba(120,87,60,0.20) !important; }
.MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline { border-color: #8b6e50 !important; }
.MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline { border-color: #5c3d2a !important; }


/* ===== 响应式 ===== */
@media (max-width: 480px) {
  .bg-gray-100\/90.relative.inline-block { font-size: 15px !important; padding: 8px 12px !important; }
  #ai-chat-input { font-size: 15px !important; }
}

/* ===== 降速兜底 ===== */
@media (prefers-reduced-motion: reduce) {
  .flex.items-center.justify-center.w-6.h-5::before { display: none !important; }
  .flex.items-center.justify-center.w-6.h-5 { background: #8b6e50 !important; border-radius: 50% !important; width: 8px !important; height: 8px !important; }
}