/* =============================================
   [涂山情缘录] 主题 CSS 美化
   核心参数：base-hue:340 base-sat:25% is-dark:1 accent-hue:345 accent-sat:80%
   
   颜色速查表：
   bg-deep: hsl(340, 25%, 7%), bg-default: hsl(340, 25%, 11%), bg-paper: hsl(340, 25%, 15%), bg-raised: hsl(340, 25%, 20%)
   bg-hover: hsl(340, 25%, 26%), text-main: hsl(340, 8%, 93%), text-sub: hsl(340, 6%, 68%), text-muted: hsl(340, 5%, 44%)
   border: hsl(340, 25%, 28%), accent: hsl(345, 80%, 68%), accent-dim: hsl(345, 28%, 18%), accent-text: hsl(345, 64%, 80%)
   glow: 0 0 14px hsl(345, 80%, 55%, 0.4), glow-soft: 0 0 6px hsl(345, 80%, 55%, 0.2)
   ============================================= */

/* 隐藏干扰元素 */
[class*="bg-[#F1CBCB]"], [class*="bg-[#c9e1e9]"], .style_dot-flashing__8L91Q, .flex.items-center.justify-center.w-6.h-5 { display: none !important; }

/* 危险区域：Markdown 样式 */
.markdown-body { color: hsl(340, 8%, 93%) !important; background: transparent !important; }
.markdown-body pre {
  background: hsl(340, 25%, 7%) !important;
  border: 1px solid hsl(340, 25%, 28%) !important;
  border-left: 4px solid hsl(345, 80%, 68%) !important;
  border-radius: 8px; padding: 1.2em;
}
.markdown-body pre code { background: transparent !important; color: hsl(345, 64%, 80%) !important; }
.markdown-body :not(pre)>code { background: hsl(345, 28%, 18%) !important; color: hsl(345, 80%, 68%) !important; padding: 0.2em 0.4em; border-radius: 4px; }

/* 姻缘天书卷轴样式 */
.markdown-body blockquote {
  border-left: none !important;
  background: linear-gradient(90deg, hsl(340, 25%, 15%), hsl(340, 25%, 11%)) !important;
  border: 1px solid hsl(345, 80%, 68%) !important;
  padding: 1.5em !important;
  border-radius: 0 15px 15px 0 !important;
  position: relative;
  box-shadow: inset 5px 0 0 hsl(345, 80%, 68%), 5px 5px 15px rgba(0,0,0,0.3) !important;
  margin: 1.5em 0 !important;
}

/* 交互式详情页 */
details { 
  background: hsl(340, 25%, 15%) !important; 
  border: 1px solid hsl(340, 25%, 28%) !important; 
  border-radius: 10px; padding: 0.8em; margin: 0.8em 0;
  transition: all 0.3s ease !important;
}
details[open] { border-color: hsl(345, 80%, 68%) !important; box-shadow: 0 0 10px hsl(345, 80%, 55%, 0.2) !important; }
details summary { 
  color: hsl(345, 80%, 68%) !important; 
  font-weight: bold; cursor: pointer; list-style: none;
  display: flex; align-items: center;
}
details summary::before { content: '☯'; margin-right: 10px; transition: transform 0.3s; }
details[open] summary::before { transform: rotate(180deg); }

/* ⚠️ 输入框强制可见与美化 */
#ai-chat-input { 
  background: hsl(340, 25%, 15%) !important; 
  color: hsl(340, 8%, 93%) !important; 
  caret-color: hsl(345, 80%, 68%) !important;
  border: 1px solid hsl(340, 25%, 28%) !important;
  border-radius: 8px !important;
}
#ai-chat-input::placeholder { color: hsl(340, 5%, 44%) !important; }
#ai-chat-bottom-input { background: hsl(340, 25%, 7%) !important; border-top: 2px solid hsl(345, 80%, 68%) !important; }
textarea.rc-textarea { 
  background: hsl(340, 25%, 15%) !important; 
  color: hsl(340, 8%, 93%) !important; 
  border: 1px solid hsl(340, 25%, 28%) !important;
}

/* 全局背景与侧边栏 */
body, #root, .h-screen { background-color: hsl(340, 25%, 7%) !important; }
.shadow-lg.border-r.border-gray-200 { 
  background: hsl(340, 25%, 11%) !important; 
  border-right: 1px solid hsl(340, 25%, 28%) !important; 
}
.conversation-text { color: hsl(340, 8%, 93%) !important; }

/* 聊天气泡美化 */
.bg-gray-100\/90.relative.inline-block {
  background: hsl(340, 25%, 15%) !important;
  border: 1px solid hsl(340, 25%, 28%) !important;
  border-radius: 15px !important;
  color: hsl(340, 8%, 93%) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.bg-gray-100\/90.relative.inline-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px hsl(345, 80%, 55%, 0.2) !important;
  border-color: hsl(345, 80%, 68%) !important;
}


/* 按钮与分页 */
.MuiButton-containedPrimary { background-color: hsl(345, 80%, 68%) !important; color: #fff !important; }
.MuiButton-outlinedPrimary { border-color: hsl(345, 80%, 68%) !important; color: hsl(345, 80%, 68%) !important; }
.MuiPaginationItem-root.Mui-selected { background-color: hsl(345, 80%, 68%) !important; }

/* 滚动条 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: hsl(340, 25%, 7%); }
::-webkit-scrollbar-thumb { background: hsl(340, 25%, 28%); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: hsl(345, 80%, 68%); }

/* 响应式适配 */
@media (max-width: 480px) {
  .markdown-body { font-size: 14px !important; }
  blockquote { padding: 1em !important; }
}