/*  * --------------------------------- *
 *   模块一：对话气泡美化 (AI侧) 增强完整版
 * --------------------------------- */
.group .bg-gray-100\/90 {
    /* 你原有基础配置 全部保留 */
    background: #FFFFFF !important;
    border: 2px solid #000000 !important;
    border-radius: 8px !important;
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.9) !important;
    color: #000000 !important;
    padding: 12px !important;

    /* 新增优化项，提升阅读体验 */
    line-height: 1.6 !important;       /* 行高，多行文字不拥挤 */
    font-size: 15px !important;        /* 字体大小适配 */
    max-width: 92% !important;          /* 气泡最大宽度，不贴满屏幕 */
    margin: 6px 0 !important;          /* 气泡上下外边距，拉开对话间距 */
    transition: all 0.2s ease !important;/* 过渡动画，hover柔和变化 */
}

/* 鼠标悬浮轻微动效（可选） */
.group .bg-gray-100\/90:hover {
    box-shadow: 7px 7px 0px rgba(0, 0, 0, 0.9) !important;
    transform: translate(-2px, -2px) !important;
}

/* 气泡内代码块同步适配（防止代码框样式冲突） */
.group .bg-gray-100\/90 pre,
.group .bg-gray-100\/90 code {
    background: #f3f3f3 !important;
    border-radius: 4px !important;
    color: #111 !important;
}
/* 
 * =================================
 * 全局统一风格规范：白底+黑边+实体硬阴影按压风格
 * =================================
 */

/* 
 * ---------------------------------
 *   模块一：对话气泡美化 (AI侧)
 * ---------------------------------
 */
.group .bg-gray-100\/90 {
    background: #FFFFFF !important;
    border: 2px solid #000000 !important;
    border-radius: 8px !important;
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.9) !important;
    color: #000000 !important;
    padding: 12px !important; /* 增加内边距，避免文字太贴近边框 */
    line-height: 1.6 !important;
    max-width: 92% !important;
    margin: 6px 0 !important;
    transition: all 0.1s ease-in-out !important;
}
/* AI气泡hover轻微下沉呼应按钮动效 */
.group .bg-gray-100\/90:hover {
    transform: translate(2px, 2px) !important;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.9) !important;
}
/* AI气泡内代码块适配 */
.group .bg-gray-100\/90 pre,
.group .bg-gray-100\/90 code {
    background: #f3f3f3 !important;
    border: 1px solid #000 !important;
    border-radius: 4px !important;
    color: #111 !important;
}

/* --------------------------
 * 配套新增：用户消息气泡（同画风配对）
 * --------------------------
.group .bg-indigo-50,
.group .bg-blue-50 {
    background: #f0f7ff !important;
    border: 2px solid #000000 !important;
    border-radius: 8px !important;
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.9) !important;
    color: #000000 !important;
    padding: 12px !important;
    line-height: 1.6 !important;
    max-width: 92% !important;
    margin: 6px 0 !important;
    transition: all 0.1s ease-in-out !important;
}
.group .bg-indigo-50:hover,
.group .bg-blue-50:hover {
    transform: translate(2px, 2px) !important;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.9) !important;
}

/* 
 * ---------------------------------
 *   模块二：平台按钮美化
 * ---------------------------------
 */
/* "mod、流式、评论、回到底部" 等按钮 */
.flex.items-center.gap-2.pb-2 > button {
    background: #FFFFFF !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
    border-radius: 4px !important; /* 稍显硬朗的边角 */
    box-shadow: 3px 3px 0px #000000 !important;
    font-weight: bold !important;
    text-transform: none !important; /* 禁用大写转换 */
    transition: all 0.1s ease-in-out !important;
    padding: 6px 16px !important; /* 统一按钮大小 */
}
/* 按钮悬停效果 - “按下” */
.flex.items-center.gap-2.pb-2 > button:hover {
    background: #e0e0e0 !important; /* 模拟按下的颜色变化 */
    color: #000000 !important;
    transform: translate(3px, 3px) !important; /* 按钮向右下移动 */
    box-shadow: 0px 0px 0px #000000 !important; /* 按下后阴影消失 */
}
/* 配套新增：发送提交按钮（输入框右侧发送按钮统一风格） */
#ai-chat-bottom-input button[type="submit"],
#ai-chat-input + button {
    background: #FFFFFF !important;
    color: #000 !important;
    border: 2px solid #000 !important;
    border-radius: 4px !important;
    box-shadow: 3px 3px 0 #000 !important;
    font-weight: bold !important;
    transition: all 0.1s ease-in-out !important;
    padding: 6px 14px !important;
}
#ai-chat-bottom-input button[type="submit"]:hover,
#ai-chat-input + button:hover {
    background: #e0e0e0 !important;
    transform: translate(3px, 3px) !important;
    box-shadow: 0 0 0 #000 !important;
}

/* 
 * ---------------------------------
 *   模块三：多余元素隐藏
 * ---------------------------------
 */
.MuiButtonBase-root.MuiButton-root.MuiButton-default.css-w13mdt,
.absolute.z-40 .px-4.py-2.hover\:bg-indigo-100:nth-child(5),
.css-nkqe49 {
    /* display: none !important; */ /* 此处保持注释状态，不隐藏 */
}
/* 配套可选：下拉菜单弹窗统一边框阴影风格 */
.absolute.z-40 .px-4.py-2.hover\:bg-indigo-100 {
    border: 2px solid #000 !important;
    box-shadow: 4px 4px 0 #000 !important;
    border-radius: 4px !important;
    background: #fff !important;
}

/* 
 * ---------------------------------
 *   模块四：输入栏美化
 * ---------------------------------
 */
#ai-chat-input {
    background-color: #FFFFFF !important;
    border: 2px solid #000000 !important;
    border-radius: 6px !important;
    color: #000000 !important;
    box-shadow: inset 2px 2px 0px rgba(0, 0, 0, 0.1) !important; /* 轻微的内阴影，增加层次感 */
    padding: 10px 12px !important;
}
/* 输入框聚焦强化边框 */
#ai-chat-input:focus {
    outline: none !important;
    border-color: #000 !important;
    box-shadow: inset 2px 2px 0 rgba(0,0,0,0.1), 2px 2px 0 #000 !important;
}
/* 输入框容器透明化，突出输入框本身 */
#ai-chat-bottom-input { 
    background: transparent !important; 
    backdrop-filter: none !important; 
    padding: 10px !important;
}

/* 
 * =================================
 * 全局配套补充样式（统一整套视觉）
 * =================================
 */
/* 1. 页面滚动条美化（黑白简约适配） */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-left: 1px solid #000;
}
::-webkit-scrollbar-thumb {
    background: #333;
    border: 1px solid #000;
}
::-webkit-scrollbar-thumb:hover {
    background: #000;
}

/* 2. 分割线统一加粗黑色 */
hr, .border-t, .border-b {
    border-color: #000 !important;
    border-width: 2px !important;
}

/* 3. 弹窗、卡片通用配套风格（所有弹窗复用气泡风格） */
div[role="dialog"], .card, .modal {
    background: #fff !important;
    border: 2px solid #000 !important;
    border-radius: 8px !important;
    box-shadow: 6px 6px 0 #000 !important;
}

/* 4. 加载、回复中占位气泡统一样式 */
.group .animate-pulse {
    background: #fff !important;
    border: 2px solid #000 !important;
    box-shadow: 5px 5px 0 rgba(0,0,0,0.9) !important;
    border-radius: 8px !important;
}

/* 5. 标签/小标签组件配套 */
.tag, .badge {
    background: #fff !important;
    border: 1px solid #000 !important;
    box-shadow: 2px 2px 0 #000 !important;
    border-radius: 3px !important;
    padding: 2px 8px !important;
    font-weight: bold !important;
}
/*
 * ---------------------------------
 * 模块五：折叠状态栏 <details> 美化
 * 统一黑边硬阴影按压风格，适配明暗底色，字体高可读
 * ---------------------------------
 */
details {
    background: #ffffff !important;
    border: 2px solid #000000 !important;
    border-radius: 6px !important;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.9) !important;
    margin: 10px 0 !important;
    padding: 0 !important;
    transition: all 0.1s ease-in-out !important;
    overflow: visible !important;
}
/* 折叠标题栏 summary */
details summary {
    padding: 8px 12px !important;
    font-weight: bold !important;
    color: #000000 !important;
    cursor: pointer !important;
    list-style: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: #f8f8f8 !important;
    border-bottom: 2px solid #000 !important;
}
/* 自定义折叠三角箭头 */
details summary::-webkit-details-marker {
    display: none !important;
}
details summary::before {
    content: "▶" !important;
    font-size: 14px !important;
    transition: transform 0.1s ease !important;
}
details[open] summary::before {
    transform: rotate(90deg) !important;
}
/* summary hover按压效果，和全局按钮统一交互 */
details summary:hover {
    background: #e0e0e0 !important;
}
/* 展开时整体轻微下沉 */
details[open] {
    transform: translate(2px, 2px) !important;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.9) !important;
}
/* details内部内容容器 */
details > div, details > p, details > .content {
    padding: 12px !important;
    color: #111111 !important;
    line-height: 1.6 !important;
}
/* 适配深色背景页面下details文字可见 */
@media (prefers-color-scheme: dark) {
    details {
        background: #1a1a1a !important;
        border-color: #eeeeee !important;
        box-shadow: 4px 4px 0px rgba(255,255,255,0.8) !important;
    }
    details summary {
        background: #2d2d2d !important;
        border-bottom-color: #eee !important;
        color: #ffffff !important;
    }
    details summary::before {
        color: #fff !important;
    }
    details summary:hover {
        background: #444444 !important;
    }
    details[open] {
        box-shadow: 2px 2px 0px rgba(255,255,255,0.8) !important;
    }
    details > div, details > p, details > .content {
        color: #f0f0f0 !important;
    }
}

/*
 * ---------------------------------
 * 模块六：Markdown 表格专用美化（电脑+手机自适应、黑白背景通用）
 * ---------------------------------
 */
/* 表格外层容器横向滚动，手机不溢出 */
details table,
.group .bg-gray-100\/90 table {
    width: 100% !important;
    border-collapse: collapse !important;
    display: table !important;
    table-layout: auto !important;
}
details .table-wrap,
.group .bg-gray-100\/90 .table-wrap {
    overflow-x: auto !important;
    margin: 8px 0 !important;
    border: 2px solid #000 !important;
    border-radius: 4px !important;
}
/* 单元格通用样式 黑白双适配 */
details th, details td,
.group .bg-gray-100\/90 th, .group .bg-gray-100\/90 td {
    border: 1px solid #000000 !important;
    padding: 8px 10px !important;
    min-width: 60px !important;
    word-break: break-word !important;
    color: #000 !important;
}
/* 表头白底加深 */
details th,
.group .bg-gray-100\/90 th {
    background: #eeeeee !important;
    font-weight: bold !important;
}
/* 隔行浅灰区分行，提升阅读 */
details tr:nth-child(even),
.group .bg-gray-100\/90 tr:nth-child(even) {
    background: #f7f7f7 !important;
}
/* 深色模式表格适配，浅色文字保证可见 */
@media (prefers-color-scheme: dark) {
    details .table-wrap,
    .group .bg-gray-100\/90 .table-wrap {
        border-color: #eeeeee !important;
    }
    details th, details td,
    .group .bg-gray-100\/90 th, .group .bg-gray-100\/90 td {
        border-color: #dddddd !important;
        color: #f5f5f5 !important;
    }
    details th,
    .group .bg-gray-100\/90 th {
        background: #333333 !important;
    }
    details tr:nth-child(even),
    .group .bg-gray-100\/90 tr:nth-child(even) {
        background: #2a2a2a !important;
    }
    details tr:nth-child(odd),
    .group .bg-gray-100\/90 tr:nth-child(odd) {
        background: #1f1f1f !important;
    }
}

/*
 * ---------------------------------
 * 兼容之前气泡代码：表格hover气泡同步动效
 * ---------------------------------
 */
.group .bg-gray-100\/90 .table-wrap:hover {
    transform: translate(1px,1px) !important;
    transition: 0.1s ease !important;
}
/* 加载闪烁点容器美化，替换三点为自适应文字 */
.flex.items-center.justify-center.w-6.h-5 {
    width: auto !important;
    height: auto !important;
    min-width: 40px !important;
    padding: 2px 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 清除原生三个闪烁圆点 */
.style_dot-flashing__8L91Q.style_text__zGhNq {
    display: none !important;
}

/* 插入替换文字，自动适配深浅背景文字色 */
.flex.items-center.justify-center.w-6.h-5::after {
    content: "加载中" !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    color: #000000 !important;
}

/* 深色模式自动切换白色文字，深色背景清晰可见 */
@media (prefers-color-scheme: dark) {
    .flex.items-center.justify-center.w-6.h-5::after {
        color: #ffffff !important;
    }
}
/*


/* --------------------------
 * 深色模式适配（深色背景文字、边框、阴影自动切换）
 * --------------------------
 */
@media (prefers-color-scheme: dark) {
    .MuiStack-root.text-purple-500.mt-1.css-1kz283j {
        background: #1c1c1c !important;
        border-color: #eeeeee !important;
        box-shadow: 4px 4px 0 rgba(255, 255, 255, 0.75) !important;
    }
    .MuiStack-root.text-purple-500.mt-1.css-1kz283j:hover {
        box-shadow: 2px 2px 0 rgba(255, 255, 255, 0.75) !important;
    }
    /* 深色下提亮文字，保证可视 */
    .MuiStack-root.text-purple-500.mt-1.css-1kz283j .css-6c0gf2 {
        color: #d8b4fe !important;
    }
    .MuiStack-root.text-purple-500.mt-1.css-1kz283j .css-1x48u03 {
        color: #fdba74 !important;
    }
}

/* 给不同角色的对话上色 */
user-dialogue {
    color: #FF4500; /* 猩红色，给主角用，够醒目！ */
}

partner-dialogue {
    color: #FF69B4; /* 亮粉色，给亲密伴侣，甜就完事了！ */
}

npc-dialogue {
    color: #1E90FF; /* 道奇蓝，给其他路人NPC，清晰不抢戏！ */}

