/* --- 秦时明月·古卷风格 (完整融合终极版) --- */

/* =========================================
   1. 界面基础与隐藏元素
   ========================================= */
/* 强制隐藏顶部多余装饰条 */
[class*="bg-[#F1CBCB]"], 
[class*="bg-[#c9e1e9]"] {
    display: none !important;
}

/* 适配用户自定义类名 - 设为透明以显示背景 */
.ui-root, .txt-body {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #2b2b2b !important;
}

/* =========================================
   2. 聊天气泡：卷轴质感 (核心风格)
   ========================================= */
.bg-gray-100\/90.relative.inline-block {
    background: linear-gradient(to right, #eaddca 0%, #f4f1de 5%, #f4f1de 95%, #eaddca 100%) !important;
    border: 1px solid #b89b5e !important; /* 古铜金边 */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1), 0 0 0 2px #f4f1de inset !important;
    border-radius: 4px !important;
    padding: 16px !important; /* 增加内边距以适应大字体 */
    isolation: isolate !important;
    position: relative !important;
}

/* 卷轴上下边缘装饰线 */
.bg-gray-100\/90.relative.inline-block::before,
.bg-gray-100\/90.relative.inline-block::after {
    content: "" !important;
    position: absolute !important;
    left: 8px !important;
    right: 8px !important;
    height: 1px !important;
    background: rgba(184, 155, 94, 0.3) !important;
    z-index: 0 !important;
}
.bg-gray-100\/90.relative.inline-block::before { top: 10px !important; border-top: 1px solid #b89b5e !important; }
.bg-gray-100\/90.relative.inline-block::after { bottom: 10px !important; border-bottom: 1px solid #b89b5e !important; }

/* =========================================
   3. 正文排版：墨色雅致楷书 (大字号)
   ========================================= */
.markdown-body {
    color: #2b2b2b !important; /* 浓墨色 */
    font-family: "STKaiti", "Kaiti SC", "KaiTi", "SimKai", serif !important;
    font-size: 1.5em !important; /* 【核心】保持大字号 */
    line-height: 1.8 !important; /* 舒缓行高 */
    z-index: 1 !important;
    position: relative !important;
    background: transparent !important;
}

/* 强调文本：朱砂红 */
.markdown-body strong {
    color: #963535 !important;
    font-weight: bold !important;
}

/* 折叠组件古风化 */
details {
    border: 1px solid rgba(184, 155, 94, 0.4) !important;
    background: rgba(255, 255, 255, 0.3) !important;
}
summary {
    color: #5c4b37 !important;
    font-family: "STKaiti", serif !important;
    font-size: 1.1em !important;
    border-bottom: 1px dashed rgba(184, 155, 94, 0.3) !important;
}

/* =========================================
   4. 底部输入栏 (融合风格 + 字体放大)
   ========================================= */
/* 输入栏背景：渐变羊皮纸 */
#ai-chat-bottom-input {
    background: linear-gradient(to top, #eaddca 0%, #f4f1de 100%) !important;
    border-top: 2px solid #b89b5e !important;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05) !important;
}

/* 底部背景遮罩 */
.bg-gradient-to-t {
    background: linear-gradient(to top, #f4f1de, transparent) !important;
}

/* 主输入框：字体放大 */
#ai-chat-input {
    background-color: rgba(255, 255, 255, 0.4) !important;
    border: 1px solid rgba(184, 155, 94, 0.6) !important;
    border-radius: 4px !important;
    color: #2b2b2b !important;
    font-family: "STKaiti", "KaiTi", serif !important;
    font-size: 1.3em !important; /* 【调整】输入文字放大 */
    padding: 12px !important;
    line-height: 1.5 !important;
}

#ai-chat-input:focus {
    background-color: rgba(255, 255, 255, 0.8) !important;
    border-color: #b89b5e !important;
    box-shadow: 0 0 8px rgba(184, 155, 94, 0.3) !important;
}

#ai-chat-input::placeholder {
    color: #8c7b65 !important;
    font-size: 0.9em !important; /* 占位符稍小 */
}

/* =========================================
   5. 底部按钮栏 (融合风格 + 字体放大)
   ========================================= */
#ai-mod-button2 {
    padding-bottom: 8px !important;
}

/* 按钮样式 */
#ai-mod-button2 button.MuiButton-root {
    color: #5c4b37 !important;
    font-family: "STKaiti", serif !important;
    font-size: 1.1em !important; /* 【调整】按钮文字放大 */
    font-weight: bold !important;
    border: 1px solid rgba(184, 155, 94, 0.5) !important;
    background: linear-gradient(to bottom, #fffdf5, #f0ebd8) !important;
    margin: 0 4px !important;
}

#ai-mod-button2 button.MuiButton-root:hover {
    border-color: #963535 !important;
    color: #963535 !important;
    background: #fff !important;
}

#ai-mod-button2 button.MuiButton-root svg {
    color: #b89b5e !important;
    width: 1.2em !important; /* 图标同步放大 */
    height: 1.2em !important;
}

/* =========================================
   6. 分页栏美化 (融合风格)
   ========================================= */
.MuiPaginationItem-root {
    color: #5c4b37 !important;
    font-family: "STKaiti", serif !important;
    font-size: 1.2em !important; /* 【调整】页码放大 */
}

.MuiPaginationItem-root.Mui-selected {
    background-color: rgba(150, 53, 53, 0.1) !important;
    border: 1px solid #963535 !important;
    color: #963535 !important;
}

.MuiPaginationItem-icon {
    color: #b89b5e !important;
    font-size: 1.5rem !important; /* 箭头放大 */
}

/* =========================================
   7. 评论区全套美化 (融合风格 + 字体放大)
   ========================================= */
/* 背景容器 */
div[class*="w-full"][class*="bg-white"][class*="bottom-0"] {
    background-color: #f4f1de !important;
    border-top: 3px double #b89b5e !important;
}

/* 评论区标题 */
div.text-lg.font-bold {
    color: #2b2b2b !important;
    font-family: "STKaiti", serif !important;
    font-size: 1.4em !important; /* 标题放大 */
    border-bottom: 2px solid #b89b5e !important;
    padding-bottom: 6px !important;
}

/* 评论输入框 */
textarea.rc-textarea {
    background-color: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid #b89b5e !important;
    color: #2b2b2b !important;
    font-family: "STKaiti", serif !important;
    font-size: 1.2em !important; /* 输入内容放大 */
}

/* 评论列表内容 */
div.break-all {
    color: #2b2b2b !important;
    font-family: "STKaiti", serif !important;
    font-size: 1.3em !important; /* 【调整】评论正文显著放大，接近主聊天 */
    line-height: 1.6 !important;
}

/* 用户名 */
div.text-sm.text-grey-600 span.font-bold {
    color: #963535 !important;
    font-family: "STKaiti", serif !important;
    font-size: 1.2em !important; /* 用户名放大 */
}

/* 时间戳 */
div.text-xs.text-grey-600 {
    font-size: 0.9em !important; /* 时间戳微调 */
    color: #8c7b65 !important;
}

/* 排序按钮 */
button.MuiButton-containedPrimary,
button.MuiButton-outlinedPrimary {
    font-family: "STKaiti", serif !important;
    font-size: 1em !important;
    border-color: #b89b5e !important;
}
button.MuiButton-containedPrimary {
    background-color: #b89b5e !important;
}
button.MuiButton-outlinedPrimary {
    color: #5c4b37 !important;
}

/* 评论分隔线 */
div.group.ml-0 {
    border-bottom: 1px dashed rgba(184, 155, 94, 0.3) !important;
    padding-bottom: 12px !important;
    margin-bottom: 12px !important;
}

/* =========================================
   8. 加载动画：太极流云
   ========================================= */
.style_dot-flashing__8L91Q.style_text__zGhNq {
    display: none !important;
}

.flex.items-center.justify-center.w-6.h-5::before {
    content: "" !important;
    width: 24px !important; /* 稍微放大动画 */
    height: 24px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23b89b5e' d='M50 20A30 30 0 0 0 20 50A30 30 0 0 0 50 80A30 30 0 0 0 80 50A30 30 0 0 0 50 20M50 30A20 20 0 0 1 70 50A20 20 0 0 1 50 70A20 20 0 0 1 30 50A20 20 0 0 1 50 30' opacity='0.3'/%3E%3Cpath fill='%23963535' d='M50 20A30 30 0 0 1 80 50L70 50A20 20 0 0 0 50 30Z'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 50 50' to='360 50 50' dur='1.5s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    display: block !important;
}

/* =========================================
   9. 移动端适配 (针对大字体优化)
   ========================================= */
@media (max-width: 480px) {
    .bg-gray-100\/90.relative.inline-block {
        padding: 12px !important;
        margin: 5px !important;
    }
    .markdown-body {
        font-size: 1.2em !important; /* 移动端字号稍微回缩，避免爆屏 */
    }
    #ai-chat-input {
        font-size: 1.1em !important;
    }
    div.break-all {
        font-size: 1.1em !important;
    }
}