/* 全局字体优化，确保可读性 */
body, html {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif !important;
}

/* 顶部栏美化 */
.sticky.w-full.top-0.flex.items-center {
    background: linear-gradient(to right, #5a4b3d, #7c6a5e, #5a4b3d) !important; /* 木褐色渐变背景 */
    border-bottom: 1px solid #4a3e33 !important; /* 深色边框 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important; /* 柔和阴影 */
    color: #f5e7dc !important; /* 浅米色文字 */
    padding: 8px 15px !important;
}

#ai-model-selector .group.flex.items-center {
    background-color: #6d5b4d !important; /* 模型选择器背景 */
    border-radius: 6px !important;
    padding: 6px 10px !important;
    transition: background-color 0.3s ease !important;
    border: 1px solid #4a3e33 !important;
}

#ai-model-selector .group.flex.items-center:hover {
    background-color: #8c7a6e !important; /* 悬停效果 */
}

#ai-model-selector .truncate.text-\[13px\] {
    color: #f5e7dc !important; /* 模型名称文字颜色 */
    font-weight: bold !important;
}

#ai-model-selector .shrink-0.flex.items-center svg {
    color: #f5e7dc !important; /* 下拉箭头颜色 */
    transform: scale(0.9); /* 略微缩小图标 */
    transition: transform 0.3s ease !important;
}

#ai-model-selector .group.flex.items-center:hover .shrink-0.flex.items-center svg {
    transform: scale(1.1); /* 悬停放大图标 */
}

#header-setting-button {
    background-color: #6d5b4d !important; /* 设置按钮背景 */
    border-radius: 50% !important; /* 圆形按钮 */
    padding: 8px !important;
    transition: background-color 0.3s ease, transform 0.3s ease !important;
    border: 1px solid #4a3e33 !important;
}

#header-setting-button:hover {
    background-color: #8c7a6e !important; /* 悬停效果 */
    transform: rotate(15deg); /* 悬停轻微旋转 */
}

#header-setting-button svg {
    color: #f5e7dc !important; /* 设置按钮图标颜色 */
}

/* 开场白选择器美化 */
div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"] {
    background: linear-gradient(to right, #8c7a6e, #a39284) !important; /* 浅木褐色渐变 */
    border: 1px solid #6d5b4d !important; /* 边框颜色 */
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
    color: #3e322b !important; /* 深色文字 */
    transition: all 0.3s ease !important;
}

div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"]:hover {
    background: linear-gradient(to right, #a39284, #b9a99b) !important; /* 悬停亮一点 */
    transform: translateY(-2px); /* 悬停轻微上浮 */
}

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: #3e322b !important; /* 图标颜色 */
}

/* 按钮栏美化 */
#ai-mod-button2 button.MuiButton-root {
    background: linear-gradient(to bottom, #7c6a5e, #6d5b4d) !important; /* 按钮背景渐变 */
    border: 1px solid #5a4b3d !important;
    color: #f5e7dc !important; /* 按钮文字颜色 */
    border-radius: 8px !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s ease !important;
}

#ai-mod-button2 button.MuiButton-root:hover {
    background: linear-gradient(to bottom, #8c7a6e, #7c6a5e) !important; /* 悬停背景 */
    transform: translateY(-1px); /* 悬停轻微上浮 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3) !important;
}

#ai-mod-button2 button.MuiButton-root svg {
    color: #f5e7dc !important; /* 按钮图标颜色 */
}

/* 底部栏美化 */
.bg-gradient-to-t {
    background: linear-gradient(to top, #5a4b3d, #7c6a5e) !important; /* 底部栏背景 */
    border-top: 1px solid #4a3e33 !important;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3) !important;
}

#ai-chat-bottom-input {
    background-color: #8c7a6e !important; /* 输入框容器背景 */
    border-radius: 12px !important;
    border: 1px solid #6d5b4d !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

#ai-chat-input {
    background-color: transparent !important; /* 主输入框透明背景 */
    color: #3e322b !important; /* 输入文字颜色（已加深） */
    caret-color: #f5e7dc !important; /* 光标颜色 */
}

#ai-chat-input::placeholder {
    color: #c0b3a7 !important; /* 占位符颜色 */
    opacity: 0.8 !important;
}

#ai-chat-input::selection {
    background-color: #a39284 !important; /* 文字选中背景 */
    color: #3e322b !important; /* 文字选中颜色 */
}

/* 分页栏美化 */
.MuiPaginationItem-root {
    background-color: #8c7a6e !important; /* 分页按钮背景 */
    color: #f5e7dc !important; /* 分页按钮文字颜色 */
    border-radius: 6px !important;
    margin: 0 4px !important;
    border: 1px solid #6d5b4d !important;
    transition: all 0.3s ease !important;
}

.MuiPaginationItem-root:hover {
    background-color: #a39284 !important; /* 悬停背景 */
    color: #3e322b !important; /* 悬停文字颜色 */
    transform: translateY(-1px);
}

.MuiPaginationItem-root.Mui-selected {
    background: linear-gradient(to bottom, #a39284, #8c7a6e) !important; /* 选中按钮背景 */
    color: #3e322b !important; /* 选中按钮文字颜色 */
    border-color: #7c6a5e !important;
    font-weight: bold !important;
}

.MuiPaginationItem-root.Mui-disabled {
    background-color: #6d5b4d !important; /* 禁用按钮背景 */
    color: #c0b3a7 !important; /* 禁用按钮文字颜色 */
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

.MuiPaginationItem-icon {
    color: #f5e7dc !important; /* 翻页箭头图标颜色 */
}

.MuiPaginationItem-root.Mui-selected .MuiPaginationItem-icon {
    color: #3e322b !important; /* 选中状态下的翻页箭头图标颜色 */
}

.MuiStack-root.css-1uwir8f {
    border: 1px solid #6d5b4d !important; /* 跳转输入区域容器边框 */
    border-radius: 6px !important;
    background-color: #8c7a6e !important; /* 跳转输入区域容器背景 */
}

.MuiStack-root.css-1uwir8f .MuiBox-root {
    color: #f5e7dc !important; /* 跳转输入区域文字颜色 */
}

.MuiInputBase-input {
    background-color: #6d5b4d !important; /* 跳转输入区域输入框背景 */
    color: #f5e7dc !important; /* 跳转输入区域输入框文字颜色 */
    border: none !important;
    border-radius: 4px !important;
    padding: 4px 8px !important;
    text-align: center !important;
}

/* 评论区美化 */
div[class*="w-full"][class*="bg-white"][class*="bottom-0"] {
    background: linear-gradient(to bottom, #f5e7dc, #e8dccf) !important; /* 评论区主背景，浅木色系 */
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1) !important;
    border-top: 1px solid #d4c8bc !important;
}

div.text-lg.font-bold {
    color: #3e322b !important; /* 评论标题颜色 */
    font-family: "Noto Serif SC", serif !important; /* 尝试古风字体 */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

p.MuiTypography-body1.text-grey-600 {
    color: #5a4b3d !important; /* '个人评分'文字颜色 */
}

span.MuiRating-root {
    color: #a39284 !important; /* 评分星星的基色 */
}

span.MuiRating-iconEmpty svg {
    color: #c0b3a7 !important; /* 未选中的评分星星 (空心) */
}

span.MuiRating-iconFilled svg {
    color: #d4a76c !important; /* 选中的星星，金色 */
}

span.text-orange-500 {
    color: #d4a76c !important; /* 评分数字，金色 */
}

div.flex.flex-col.border-gray-200 {
    border: 1px solid #d4c8bc !important; /* 输入框容器边框 */
    border-radius: 8px !important;
    background-color: #fcf9f5 !important; /* 稍亮的背景 */
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

textarea.rc-textarea {
    background-color: transparent !important; /* 输入框透明背景 */
    color: #3e322b !important; /* 输入文字颜色 */
    border: none !important;
    resize: vertical !important;
    font-family: "Noto Serif SC", serif !important;
}

div.bg-gray-100.text-gray-500 {
    background-color: #f0ebe4 !important; /* 字数统计背景 */
    color: #6d5b4d !important; /* 字数统计文字颜色 */
    border-top: 1px solid #d4c8bc !important;
    border-bottom-left-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}

div.cursor-pointer.group.flex.items-center.justify-center {
    background: linear-gradient(to bottom, #7c6a5e, #6d5b4d) !important; /* 发送评论按钮背景 */
    border-radius: 8px !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s ease !important;
}

div.cursor-pointer.group.flex.items-center.justify-center:hover {
    background: linear-gradient(to bottom, #8c7a6e, #7c6a5e) !important; /* 悬停背景 */
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3) !important;
}

div[data-state="closed"] svg[data-icon="Send03"] {
    color: #f5e7dc !important; /* 发送评论按钮图标颜色 */
}

div.style_divider__mW0YX {
    background-color: #d4c8bc !important; /* 分割线颜色 */
    height: 2px !important;
    margin: 15px 0 !important;
}

.MuiStack-root.css-1dmzxoz button {
    border-radius: 6px !important;
    margin-right: 8px !important;
    transition: all 0.3s ease !important;
    font-family: "Noto Serif SC", serif !important;
}

button.MuiButton-containedPrimary {
    background: linear-gradient(to bottom, #a39284, #8c7a6e) !important; /* 排序按钮 (选中) 背景 */
    color: #3e322b !important; /* 排序按钮 (选中) 文字颜色 */
    border: 1px solid #7c6a5e !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

button.MuiButton-containedPrimary:hover {
    background: linear-gradient(to bottom, #b9a99b, #a39284) !important;
    transform: translateY(-1px);
}

button.MuiButton-outlinedPrimary {
    background-color: #e8dccf !important; /* 排序按钮 (未选中) 背景 */
    color: #6d5b4d !important; /* 排序按钮 (未选中) 文字颜色 */
    border: 1px solid #d4c8bc !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

button.MuiButton-outlinedPrimary:hover {
    background-color: #f5e7dc !important;
    color: #5a4b3d !important;
    transform: translateY(-1px);
}

div.p-3.overflow-y-auto {
    background-color: #f0ebe4 !important; /* 评论列表容器背景 */
    border-radius: 10px !important;
    padding: 15px !important;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05) !important;
}

div.group.ml-0 {
    background-color: #fcf9f5 !important; /* 评论项背景 */
    border-radius: 10px !important;
    padding: 12px 15px !important;
    margin-bottom: 15px !important;
    border: 1px solid #e8dccf !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
}

div.group.ml-0:hover {
    background-color: #f5e7dc !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

div.group img.rounded-full {
    border: 2px solid #a39284 !important; /* 用户头像边框 */
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2) !important;
}

div.text-sm.text-grey-600 span.font-bold {
    color: #3e322b !important; /* 用户名颜色 */
    font-family: "Noto Serif SC", serif !important;
}

span.text-\[10px\] {
    background-color: #d4a76c !important; /* "（你）" 标签背景 */
    color: #fcf9f5 !important; /* "（你）" 标签文字颜色 */
    border-radius: 4px !important;
    padding: 2px 6px !important;
    margin-left: 5px !important;
    font-weight: bold !important;
}

div.break-all {
    color: #3e322b !important; /* 评论内容颜色 */
    line-height: 1.6 !important;
    font-family: "Noto Serif SC", serif !important;
}

div.text-xs.text-grey-600 {
    color: #6d5b4d !important; /* 时间戳颜色 */
}

button.text-gray-400 {
    color: #8c7a6e !important; /* 点赞按钮颜色 */
    transition: color 0.3s ease !important;
}

button.text-gray-400:hover {
    color: #d4a76c !important; /* 点赞按钮悬停颜色 */
}

button.text-gray-400 svg {
    transform: scale(0.9); /* 略微缩小图标 */
}

button.text-gray-400:hover svg {
    transform: scale(1.1); /* 悬停放大图标 */
}

span.cursor-pointer {
    color: #a39284 !important; /* 回复文字颜色 */
    font-weight: bold !important;
    transition: color 0.3s ease !important;
}

span.cursor-pointer:hover {
    color: #d4a76c !important; /* 回复文字悬停颜色 */
}

div.ml-8.border-l {
    border-left: 2px solid #d4c8bc !important; /* 回复区域边框 */
    padding-left: 10px !important;
}

/* 可选的提升效果：滚动条美化 */
/* 适用于webkit浏览器 (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
}

::-webkit-scrollbar-track {
    background: #e8dccf !important; /* 滚动条背景 */
    border-radius: 10px !important;
}

::-webkit-scrollbar-thumb {
    background: #a39284 !important; /* 滚动条滑块 */
    border-radius: 10px !important;
    border: 2px solid #e8dccf !important;
}

::-webkit-scrollbar-thumb:hover {
    background: #7c6a5e !important; /* 滑块悬停颜色 */
}/* --- 古风木褐主题聊天框美化 --- */

/* 统一聊天框样式：木纹背景与圆角 */
.bg-gray-100\/90.relative.inline-block {
    background: linear-gradient(135deg, #6a4a3a, #5c3e2e) !important; /* 深木色渐变 */
    border: 1px solid #4a3021 !important; /* 边框，增加质感 */
    border-radius: 10px !important; /* 圆角 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 0 5px rgba(0, 0, 0, 0.3) !important; /* 阴影，营造立体感 */
    color: #f0e6d2 !important; /* 统一设置一个基础浅色 */
}

/* 主要文本样式：确保在深色背景上清晰可读 */
.markdown-body {
    color: #f0e6d2 !important; /* 温润的米白色，高对比度且护眼 */
    text-shadow: none !important; /* 保证可读性，去除任何文本阴影 */
    background: transparent !important; /* 使伪元素背景可见 */
    isolation: isolate !important; /* 创建新的堆叠上下文 */
    z-index: 1 !important;
}

/* 底部附加元素样式：统一为柔和的浅色，确保可见 */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary,
.MuiTypography-root.MuiTypography-body2.css-6c0gf2,
.text-orange-500 {
    color: #dcd3c3 !important; /* 稍暗的米色，与主文本区分 */
    transition: color 0.3s !important;
}

/* 鼠标悬停在底部按钮上时变亮 */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}