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

/* --- 聊天框主体美化：深色微恐氛围 --- */
.bg-gray-100\/90.relative.inline-block {
    background-color: #16161a !important;
    border: 1px solid #333338 !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6) !important;
    isolation: isolate !important;
    overflow: hidden !important;
    padding: 12px !important;
    transition: all 0.3s ease !important;
}

/* --- 文本可读性保障 (最高原则) --- */
.markdown-body {
    color: #e1e1e6 !important;
    z-index: 1 !important;
    position: relative !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important;
    line-height: 1.6 !important;
}

/* --- 背景动效：漂浮的小幽灵 --- */
/* 使用 ::before 在背景层生成 SMIL 动画幽灵 */
.bg-gray-100\/90.relative.inline-block::before {
    content: "" !important;
    position: absolute !important;
    top: 10px !important;
    right: 15px !important;
    width: 50px !important;
    height: 50px !important;
    z-index: 0 !important;
    opacity: 0.4 !important;
    pointer-events: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffffff' d='M12 2a7 7 0 0 0-7 7v10c0 .6.4 1 1 1s1-.4 1-1v-1c0-.6.4-1 1-1s1 .4 1 1v1c0 .6.4 1 1 1s1-.4 1-1v-1c0-.6.4-1 1-1s1 .4 1 1v1c0 .6.4 1 1 1s1-.4 1-1V9a7 7 0 0 0-7-7z'/%3E%3Ccircle fill='%23000' cx='9' cy='9' r='1.2'/%3E%3Ccircle fill='%23000' cx='15' cy='9' r='1.2'/%3E%3CanimateTransform attributeName='transform' type='translate' values='0,0; 0,8; 0,0' dur='4s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.2;0.5;0.2' dur='4s' repeatCount='indefinite'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
}

/* --- 加载动画：骷髅头红眼闪烁 --- */
/* 1. 隐藏默认加载点 */
.style_dot-flashing__8L91Q.style_text__zGhNq {
    display: none !important;
}

/* 2. 重塑加载容器并添加骷髅头 */
.flex.items-center.justify-center.w-6.h-5 {
    position: relative !important;
    width: 30px !important;
    height: 30px !important;
}

.flex.items-center.justify-center.w-6.h-5::after {
    content: "" !important;
    width: 28px !important;
    height: 28px !important;
    display: block !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23a1a1aa' d='M12 2a8 8 0 0 0-8 8c0 2.5 1.1 4.7 3 6.1V20a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-3.9c1.9-1.4 3-3.6 3-6.1a8 8 0 0 0-8-8zM9 11.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm6 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z'/%3E%3Ccircle cx='9' cy='10' r='1.2' fill='%23ff0000'%3E%3Canimate attributeName='opacity' values='1;0.1;1' dur='0.6s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='15' cy='10' r='1.2' fill='%23ff0000'%3E%3Canimate attributeName='opacity' values='1;0.1;1' dur='0.6s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* --- 底部附加元素：高对比度适配 --- */
/* 按钮、模型名称、Token消耗 */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary,
.MuiTypography-root.MuiTypography-body2.css-6c0gf2,
.text-orange-500 {
    color: #a1a1aa !important;
    font-weight: 500 !important;
}

.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

/* 移动端微调 */
@media (max-width: 480px) {
    .bg-gray-100\/90.relative.inline-block::before {
        width: 35px !important;
        height: 35px !important;
        right: 5px !important;
    }
}