/* --- 代码块整体容器美化 --- */
.markdown-body pre {
  border: 2px solid #ffc1cc !important; /* 浅桃粉边框 */
  border-radius: 14px !important;
  overflow: hidden !important;
  box-shadow: 0 8px 24px rgba(255, 182, 193, 0.2) !important;
  transition: all 0.3s ease;
}

/* --- 头部工具栏背景 --- */
.markdown-body pre > div > div.flex.justify-between.h-8 {
  background-color: #fff0f3 !important; /* 极浅桃红背景 */
  border-bottom: 1px solid #ffdae0 !important;
  padding-left: 12px !important;
}

/* --- 语言标签与爱心装饰 (S4) --- */
.markdown-body pre > div > div.flex.justify-between > div.text-\[13px\] {
  color: #ff69b4 !important; /* 热粉色文字 */
  font-weight: 600 !important;
  display: flex !important;
  align-items: center !important;
}

.markdown-body pre > div > div.flex.justify-between > div.text-\[13px\]::before {
  content: "❤";
  margin-right: 6px;
  color: #ff4d6d;
  font-size: 14px;
  animation: heartBeat 1.5s infinite;
}

@keyframes heartBeat {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* --- 复制按钮联动处理 (R3) --- */
/* 按钮外层背景覆盖原bg-white */
.markdown-body pre div[data-tooltip-id^="copy-tooltip"] {
  background-color: #fff0f3 !important;
  border-radius: 8px !important;
  margin-right: 4px !important;
}

/* 按钮hover态 */
.markdown-body pre div[data-tooltip-id^="copy-tooltip"]:hover {
  background-color: #ffdae0 !important;
}

/* 内部图标hover态 */
.markdown-body pre div[data-tooltip-id^="copy-tooltip"] > div:hover {
  background-color: rgba(255, 255, 255, 0.4) !important;
}

/* --- 代码内容区美化 (R4) --- */
.markdown-body pre > div > div[node] {
  background: #fffafb !important; /* 蜜桃雪白 */
  padding: 12px 16px !important;
}

/* 代码文字基本色 */
.markdown-body pre code[class^="language-"] {
  color: #8b435c !important; /* 深桃木色 */
  font-family: 'Fira Code', Consolas, monospace !important;
}

/* 语法高亮色调柔和化 */
.markdown-body pre code span {
  filter: saturate(0.8) brightness(0.9) !important;
}

/* --- 纯代码块(TYPE_B)适配 --- */
.markdown-body pre > code[node] {
  background-color: #fffafb !important;
  color: #8b435c !important;
  padding: 12px !important;
  display: block !important;
}

/* --- 顶部栏美化：柔和渐变与爱心修饰 --- */
.sticky.w-full.top-0.flex.items-center {
    background: linear-gradient(135deg, #ffedef 0%, #ffc1cc 100%) !important;
    border-bottom: 2px solid #ffb7c5 !important;
    box-shadow: 0 2px 10px rgba(255, 183, 197, 0.3) !important;
}

/* 模型选择器：悬停时出现爱心 */
#ai-model-selector .group.flex.items-center {
    background: rgba(255, 255, 255, 0.6) !important;
    border-radius: 20px !important;
    padding: 2px 12px !important;
    transition: all 0.3s ease !important;
}

#ai-model-selector .group.flex.items-center:hover {
    background: #fff !important;
    transform: translateY(-1px) !important;
}

#ai-model-selector .group.flex.items-center:hover::before {
    content: "❤";
    color: #ff85a2;
    margin-right: 4px;
    font-size: 12px;
}

#ai-model-selector .truncate.text-\[13px\] {
    color: #d85a7a !important;
    font-weight: bold !important;
}

/* --- 开场白/设置项：温馨柔和边框 --- */
div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"] {
    border: 1.5px solid #ffc1cc !important;
    background-color: #fff9fa !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(255, 193, 204, 0.6) !important;
    border-color: #ff85a2 !important;
}

/* --- 按钮栏：桃粉色气泡感按钮 --- */
#ai-mod-button2 button.MuiButton-root {
    background-color: #ffc1cc !important;
    color: white !important;
    border-radius: 18px !important;
    text-transform: none !important;
    font-weight: 600 !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

#ai-mod-button2 button.MuiButton-root:hover {
    background-color: #ff85a2 !important;
    transform: scale(1.05) !important;
}

/* --- 底部输入栏：呼吸感设计 --- */
#ai-chat-bottom-input {
    background: linear-gradient(to top, #fff9fa, transparent) !important;
}

#ai-chat-input {
    border: 2px solid #ffc1cc !important;
    border-radius: 15px !important;
    background-color: rgba(255, 255, 255, 0.9) !important;
    color: #7d4a56 !important;
    font-family: system-ui, -apple-system, sans-serif !important;
}

#ai-chat-input:focus {
    border-color: #ff85a2 !important;
    box-shadow: 0 0 12px rgba(255, 133, 162, 0.2) !important;
}

#ai-chat-input::placeholder {
    color: #ffb7c5 !important;
}

/* --- 分页栏：粉色圆点效果 --- */
.MuiPaginationItem-root {
    color: #d85a7a !important;
}

.MuiPaginationItem-root.Mui-selected {
    background-color: #ffc1cc !important;
    color: white !important;
    font-weight: bold !important;
}

.MuiPaginationItem-root:hover {
    background-color: #ffedef !important;
}

/* --- 评论区：奶油粉色温馨空间 --- */
/* 主背景 */
div[class*="w-full"][class*="bg-white"][class*="bottom-0"] {
    background-color: #fff9fa !important;
    border-top: 2px solid #ffc1cc !important;
}

/* 评论项卡片化 */
div.group.ml-0 {
    background: white !important;
    border-radius: 12px !important;
    padding: 12px !important;
    margin-bottom: 10px !important;
    border: 1px solid #ffedef !important;
    box-shadow: 0 2px 5px rgba(255, 193, 204, 0.1) !important;
}

/* 用户名与标签 */
div.text-sm.text-grey-600 span.font-bold {
    color: #d85a7a !important;
}

span.text-\[10px\] {
    background-color: #ffc1cc !important;
    color: white !important;
    border-radius: 4px !important;
    padding: 0 4px !important;
}

/* 评分星星美化 */
span.MuiRating-iconFilled svg {
    color: #ff85a2 !important;
}

span.MuiRating-iconEmpty svg {
    color: #ffedef !important;
}

/* 发送按钮：带爱心动画 */
div.cursor-pointer.group.flex.items-center.justify-center:hover svg {
    color: #ff85a2 !important;
    transform: scale(1.2) !important;
}

/* 输入框 */
textarea.rc-textarea {
    border-radius: 10px !important;
    border: 1px solid #ffc1cc !important;
    background-color: #fff !important;
}

textarea.rc-textarea:focus {
    border-color: #ff85a2 !important;
    box-shadow: 0 0 5px rgba(255, 133, 162, 0.3) !important;
}

/* 回复区域左侧线条 */
div.ml-8.border-l {
    border-left: 2px solid #ffedef !important;
}

/* 1. 移除顶部默认颜色装饰条 */
[class*="bg-[#F1CBCB]"], 
[class*="bg-[#c9e1e9]"] {
    display: none !important;
}

/* 2. 聊天框整体美化 (淡粉色背景与圆润边框) */
.bg-gray-100\/90.relative.inline-block {
    background-color: #FFF0F5 !important; /* 薰衣草红/淡粉色 */
    border: 2px solid #FFB6C1 !important; /* 浅粉色边框 */
    border-radius: 18px !important;
    box-shadow: 0 4px 15px rgba(255, 182, 193, 0.4) !important;
    padding: 12px !important;
    backdrop-filter: blur(5px) !important;
}

/* 3. 文本可读性优化 (深咖粉色文字以确保对比度) */
.markdown-body {
    color: #8B4513 !important; 
    font-family: "Microsoft YaHei", sans-serif !important;
    line-height: 1.6 !important;
}

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

/* 5. 加载容器调整与爱心动画实现 */
.flex.items-center.justify-center.w-6.h-5 {
    position: relative !important;
    width: auto !important; /* 自动宽度以容纳文字 */
    min-width: 180px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

/* 5.1 使用SVG SMIL实现跳动爱心 (::before) */
.flex.items-center.justify-center.w-6.h-5::before {
    content: "" !important;
    display: inline-block !important;
    width: 30px !important;
    height: 30px !important;
    margin-right: 10px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23FF69B4' d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'%3E%3CanimateTransform attributeName='transform' type='scale' values='1;1.2;1' dur='0.8s' repeatCount='indefinite' additive='sum' transform-origin='center'/%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
}

/* 5.2 正在加载世界剧情文字 (::after) */
.flex.items-center.justify-center.w-6.h-5::after {
    content: "正在加载世界剧情..." !important;
    color: #FF69B4 !important; /* 热情的粉色 */
    font-size: 14px !important;
    font-weight: bold !important;
    white-space: nowrap !important;
    letter-spacing: 1px !important;
}

/* 6. 底部附加元素颜色适配 (确保深色背景下可见) */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary,
.MuiTypography-root.MuiTypography-body2.css-6c0gf2,
.text-orange-500 {
    color: #DB7093 !important; /* 苍紫罗兰色 */
    opacity: 0.8 !important;
}