/* 隐藏默认顶部颜色条 */
[class*="bg-[#F1CBCB]"], 
[class*="bg-[#c9e1e9]"] {
    display: none !important;
}

/* 统一聊天框基础样式 - 国风米白棕边 */
.bg-gray-100\/90.relative.inline-block {
    background-color: #F5F5DC !important; /* 米白色背景 */
    border: 2px solid #8B4513 !important; /* 棕色边框 */
    border-radius: 4px !important; /* 微微圆角，更显干练 */
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1) !important; /* 轻微阴影，增加层次 */
    padding: 12px 16px !important;
    position: relative !important;
    isolation: isolate !important;
}

/* 添加国风角落装饰 (右上角) */
.bg-gray-100\/90.relative.inline-block::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 20px !important;
    height: 20px !important;
    border-top: 2px solid #8B4513 !important;
    border-right: 2px solid #8B4513 !important;
    opacity: 0.5 !important;
    z-index: 0 !important;
    pointer-events: none !important;
}

/* 添加国风角落装饰 (左下角) */
.bg-gray-100\/90.relative.inline-block::after {
    content: "" !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 20px !important;
    height: 20px !important;
    border-bottom: 2px solid #8B4513 !important;
    border-left: 2px solid #8B4513 !important;
    opacity: 0.5 !important;
    z-index: 0 !important;
    pointer-events: none !important;
}

/* 聊天框主要文本内容 - 高对比度深色，确保可读性 */
.markdown-body {
    color: #333333 !important; /* 深灰色文本，清晰易读 */
    font-family: "KaiTi", "STKaiti", "BiauKai", serif !important; /* 优先使用楷体等古风字体 */
    font-size: 16px !important;
    line-height: 1.6 !important;
    z-index: 1 !important;
    position: relative !important;
    background: transparent !important;
}

/* 底部操作按钮样式 */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary {
    color: #5C3A21 !important; /* 深棕色按钮 */
    font-family: "KaiTi", "STKaiti", "BiauKai", serif !important;
}

/* 模型名称文本样式 */
.MuiTypography-root.MuiTypography-body2.css-6c0gf2 {
    color: #8B4513 !important; /* 棕色 */
    font-family: "KaiTi", "STKaiti", "BiauKai", serif !important;
}

/* Token消耗文本样式 */
.text-orange-500 {
    color: #A0522D !important; /* 赭石色，融入整体风格 */
    font-family: "KaiTi", "STKaiti", "BiauKai", serif !important;
}

/* 隐藏默认加载动画 */
.style_dot-flashing__8L91Q.style_text__zGhNq {
    display: none !important;
}

/* 自定义国风加载动画 (太极/旋转元素) */
.flex.items-center.justify-center.w-6.h-5 {
    position: relative !important;
    min-height: 24px !important;
}

.flex.items-center.justify-center.w-6.h-5::before {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 20px !important;
    height: 20px !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="45" fill="none" stroke="%238B4513" stroke-width="5" stroke-dasharray="70 200"><animateTransform attributeName="transform" type="rotate" from="0 50 50" to="360 50 50" dur="1.5s" repeatCount="indefinite"/></circle><circle cx="50" cy="50" r="25" fill="none" stroke="%235C3A21" stroke-width="3" stroke-dasharray="30 100"><animateTransform attributeName="transform" type="rotate" from="360 50 50" to="0 50 50" dur="1s" repeatCount="indefinite"/></circle></svg>') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
}

ai {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fffaf5; /* 古风纯正米白色背景 */
  border: 2px solid #6d4c41; /* 古风深棕色边框 */
  border-radius: 8px;
  padding: 12px;
  font-family: "KaiTi", "STKaiti", serif;
  color: #3e2723;
  font-size: 14px;
  line-height: 1.6;
  box-shadow: 0 4px 12px rgba(109, 76, 65, 0.15);
  position: relative;
  overflow: hidden;
}
ai::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: 
    linear-gradient(135deg, rgba(109,76,65,0.05) 25%, transparent 25%) -10px 0,
    linear-gradient(225deg, rgba(109,76,65,0.05) 25%, transparent 25%) -10px 0,
    linear-gradient(315deg, rgba(109,76,65,0.05) 25%, transparent 25%),
    linear-gradient(45deg, rgba(109,76,65,0.05) 25%, transparent 25%);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: 0;
}
ai > * {
  z-index: 1;
  position: relative;
}
hd {
  display: block;
  text-align: center;
  font-weight: bold;
  font-size: 16px;
  color: #5d4037;
  border-bottom: 1px dashed #8d6e63; /* 匹配古风棕色虚线 */
  padding-bottom: 6px;
  margin-bottom: 4px;
}
text {
  display: block;
  background: rgba(255,253,248,0.8); /* 浅米白背景 */
  padding: 10px;
  border-radius: 4px;
  border: 1px solid #d7ccc8;
}
text p {
  margin: 0 0 8px 0;
  text-indent: 2em;
}
text p:last-child {
  margin-bottom: 0;
}
details {
  background: #fff8f0;
  border: 1px solid #8b5a2b; /* 古风棕色边框 */
  border-radius: 4px;
  overflow: hidden;
}
summary {
  background: #e6d5b8; /* 古风浅米棕背景 */
  color: #4e342e;
  padding: 6px 10px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}
details[open] summary {
  border-bottom: 1px solid #8b5a2b;
  background: #d4b996; /* 古风深米棕 */
}
summary:hover {
  background: #d4b996;
}
details p {
  margin: 0;
  padding: 8px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  border-bottom: 1px dashed #e0e0e0;
}
details p:last-child {
  border-bottom: none;
}
details p::before {
  content: attr(t);
  display: block;
  width: 100%;
  font-size: 12px;
  color: #8d6e63;
  margin-bottom: 4px;
}
f {
  background: #6d4c41; /* 深棕色标签 */
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
}
d {
  background: rgba(109,76,65,0.1); /* 浅棕色半透明 */
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid rgba(109,76,65,0.2);
}














/* =========================================
   国风古风主题：米白与黛棕
========================================= */

/* =========================================
   顶部栏：墨绿渐变与金丝底边
========================================= */

/* 顶部栏主容器：渐变背景与金丝边框 */
.sticky.w-full.top-0.flex.items-center {
    background: linear-gradient(to right, #0b3d24, #2e8b57) !important; /* 墨绿到绿色的渐变 */
    border-bottom: 2px solid #D4AF37 !important; /* 雅致的金丝边框 */
    box-shadow: 0 4px 8px rgba(11, 61, 36, 0.4) !important; /* 增强立体感 */
}

/* 确保深色背景下的绝对可读性：文字与图标转为淡金 */
#ai-model-selector .truncate.text-\[13px\],
#ai-model-selector .shrink-0.flex.items-center svg,
.sticky.w-full.top-0 svg.lucide-clock-8,
.sticky.w-full.top-0 button.MuiIconButton-root svg.lucide-music-2,
.sticky.w-full.top-0 svg:has(use[href="#icon-icon-set"]),
#header-setting-button svg {
    color: #FDF5E6 !important; 
    fill: #FDF5E6 !important;
    transition: all 0.3s ease !important;
}

/* 顶部栏图标悬浮效果：点亮为纯金并微微放大 */
.sticky.w-full.top-0 svg:hover,
#header-setting-button:hover svg {
    color: #FFD700 !important;
    fill: #FFD700 !important;
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.6)) !important;
    transform: scale(1.05) !important;
}

/* 模型选择器文字与图标 */
#ai-model-selector .truncate.text-\[13px\],
#ai-model-selector .shrink-0.flex.items-center svg,
.sticky.w-full.top-0 svg {
    color: #5C4033 !important;
    fill: #5C4033 !important;
}

/* 设置按钮旋转动画 (替代加载动画的动态效果) */
#header-setting-button svg {
    transition: transform 0.8s ease-in-out !important;
}
#header-setting-button:hover svg {
    transform: rotate(180deg) !important;
}

/* 2. 开场白选择器 */
div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"] {
    background-color: #FAF8F5 !important;
    border: 1px solid #8B4513 !important;
    border-radius: 4px !important;
    transition: all 0.3s ease !important;
}
div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"]:hover {
    box-shadow: 0 0 8px rgba(139, 69, 19, 0.3) !important;
    background-color: #F5EFE6 !important;
}
div.flex.items-center.h-9.cursor-pointer.group svg {
    color: #5C4033 !important;
}

/* 3. 按钮栏美化 (水墨晕染交互) */
#ai-mod-button2 button.MuiButton-root {
    background-color: #FAF8F5 !important;
    color: #5C4033 !important;
    border: 1px solid #5C4033 !important;
    border-radius: 2px !important; /* 古风方正感 */
    font-family: "KaiTi", "STKaiti", serif !important;
    transition: all 0.4s ease !important;
    position: relative !important;
    overflow: hidden !important;
}
#ai-mod-button2 button.MuiButton-root:hover {
    background-color: #5C4033 !important;
    color: #FAF8F5 !important;
    box-shadow: 0 4px 8px rgba(92, 64, 51, 0.4) !important;
}
#ai-mod-button2 button.MuiButton-root:hover svg {
    color: #FAF8F5 !important;
}

/* 4. 底部输入框美化 */
#ai-chat-bottom-input {
    background-color: #FAF8F5 !important;
    border: 1px solid #8B4513 !important;
    border-radius: 4px !important;
    box-shadow: inset 0 0 5px rgba(139, 69, 19, 0.1) !important;
}
#ai-chat-input {
    color: #3E2723 !important;
    font-family: "KaiTi", "STKaiti", serif !important;
}
#ai-chat-input::placeholder {
    color: #A0522D !important;
    opacity: 0.7 !important;
}
#ai-chat-input::selection {
    background-color: #8B4513 !important;
    color: #FAF8F5 !important;
}

/* 5. 评论区基础色彩适配 (保持布局不变) */
div[class*="w-full"][class*="bg-white"][class*="bottom-0"] {
    background-color: #FAF8F5 !important;
    border-top: 2px solid #5C4033 !important;
}
div.text-lg.font-bold,
div.text-sm.text-grey-600 span.font-bold,
div.break-all {
    color: #3E2723 !important;
    font-family: "KaiTi", "STKaiti", serif !important;
}
textarea.rc-textarea {
    background-color: #F5EFE6 !important;
    border: 1px solid #8B4513 !important;
    color: #3E2723 !important;
}
div.style_divider__mW0YX {
    background-color: #8B4513 !important;
    opacity: 0.3 !important;
}

/* 发送按钮呼吸加载动画 */
@keyframes gufeng-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}
div.cursor-pointer.group.flex.items-center.justify-center:hover svg[data-icon="Send03"] {
    animation: gufeng-pulse 1.5s infinite ease-in-out !important;
    color: #8B4513 !important;
}