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

/* 2. 统一聊天框主体美化：深渊黑与猩红科技边框 */
.bg-gray-100\/90.relative.inline-block {
    background: #09090b !important;
    border: 1px solid #27272a !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(220, 38, 38, 0.05) !important;
    border-radius: 6px !important;
    position: relative !important;
    overflow: hidden !important;
    isolation: isolate !important; /* 建立层叠上下文 */
}

/* 左侧科技感猩红能量指示线 */
.bg-gray-100\/90.relative.inline-block::after {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 3px !important;
    background: linear-gradient(to bottom, transparent, #dc2626, #7f1d1d, transparent) !important;
    z-index: 2 !important;
}

/* 3. 确保主文本绝对可读：高对比度浅色 */
.markdown-body {
    color: #e2e8f0 !important;
    font-family: 'Segoe UI', system-ui, sans-serif !important;
    font-weight: 500 !important; /* 稍微加粗提升暗色背景下的可读性 */
    z-index: 1 !important;
    position: relative !important;
    background: transparent !important;
}

/* 4. 底部附加元素（按钮、模型名、Token）统一浅灰色，融入背景 */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary,
.MuiTypography-root.MuiTypography-body2.css-6c0gf2,
.text-orange-500 {
    color: #a1a1aa !important;
    transition: color 0.3s ease !important;
}

.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
    color: #f87171 !important; /* hover时泛起红光 */
}

/* 5. 巨型科技风系统载入动画 (核心) */

/* 隐藏默认的三个小圆点 */
.style_dot-flashing__8L91Q.style_text__zGhNq {
    display: none !important;
}

/* 扩充加载容器尺寸，为巨型动画腾出空间 */
.flex.items-center.justify-center.w-6.h-5 {
    width: 260px !important;
    height: 80px !important;
    position: relative !important;
    margin: 15px auto !important; /* 居中显示 */
}

/* 注入纯 SVG SMIL 动画（确保在平台禁用CSS动画时依然生效） */
.flex.items-center.justify-center.w-6.h-5::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    /* 
       SVG 内容解析：
       1. 带有圆角的暗黑描边外框
       2. 闪烁的英文字母 "NECRO-SYSTEM INITIALIZING..."
       3. 底部进度条轨道与往复运动的红色填充块
       4. 上下扫描的半透明红色雷达线
    */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 80' width='100%25' height='100%25'%3E%3Crect width='260' height='80' fill='%2309090b' stroke='%23dc2626' stroke-width='1.5' rx='4'/%3E%3Ctext x='130' y='35' fill='%23e2e8f0' font-family='monospace' font-size='13' text-anchor='middle' font-weight='bold' letter-spacing='1'%3E%3Canimate attributeName='opacity' values='1;0.4;1' dur='1.5s' repeatCount='indefinite'/%3ENECRO-SYSTEM INITIALIZING...%3C/text%3E%3Crect x='20' y='50' width='220' height='8' fill='%2318181b' stroke='%233f3f46' stroke-width='1'/%3E%3Crect x='21' y='51' width='0' height='6' fill='%23dc2626'%3E%3Canimate attributeName='width' values='0;218;0' dur='2.5s' repeatCount='indefinite'/%3E%3C/rect%3E%3Cline x1='0' y1='0' x2='260' y2='0' stroke='%23f87171' stroke-width='1.5' opacity='0.5'%3E%3Canimate attributeName='y1' values='0;80;0' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='y2' values='0;80;0' dur='2s' repeatCount='indefinite'/%3E%3C/line%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* 6. 移动端等比例缩放适配 */
@media (max-width: 480px) {
    .flex.items-center.justify-center.w-6.h-5 {
        width: 200px !important;
        height: 60px !important;
    }
    .bg-gray-100\/90.relative.inline-block {
        padding: 10px !important; /* 移动端减小内边距 */
    }
}

ai {
    display: block;
    background: #09090b;
    color: #e2e8f0;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #27272a;
    box-shadow: inset 0 0 30px rgba(220, 38, 38, 0.03);
}

ai details {
    background: #121214;
    border: 1px solid #27272a;
    border-left: 3px solid #dc2626;
    margin-bottom: 8px;
    border-radius: 4px;
    overflow: hidden;
}

ai summary {
    background: linear-gradient(90deg, #1f1012, #121214);
    padding: 8px 12px;
    font-weight: 700;
    color: #f87171;
    cursor: pointer;
    outline: none;
    user-select: none;
    display: flex;
    align-items: center;
    font-size: 14px;
    letter-spacing: 0.5px;
    transition: background 0.3s;
}

ai summary:hover {
    background: linear-gradient(90deg, #2a1416, #121214);
}

ai details[open] > summary {
    border-bottom: 1px solid #27272a;
}

ai .sys { border-left-color: #52525b; }
ai .sys summary { color: #a1a1aa; background: linear-gradient(90deg, #18181b, #121214); }

ai .m { border-left-color: #9d4edd; }
ai .m summary { color: #c77dff; background: linear-gradient(90deg, #1e102a, #121214); }

ai .sm { border-left-color: #7b2cbf; margin: 6px 0; border-radius: 3px; }
ai .sm summary { font-size: 13px; padding: 6px 10px; color: #e0aaff; background: #150a1f; }

ai txt {
    display: block;
    padding: 14px;
    background: #050505;
    border: 1px dashed #3f3f46;
    color: #f1f5f9;
    margin: 12px 0;
    border-radius: 4px;
    font-size: 15px;
    line-height: 1.7;
    text-shadow: 0 0 1px rgba(255,255,255,0.1);
}

ai .c { padding: 10px 12px; }
ai p { margin: 4px 0; }
ai strong { color: #ef4444; font-weight: 600; }
ai em { color: #f472b6; font-style: normal; }

ai .t { 
    color: #fb923c; 
    font-weight: bold; 
    margin-top: 8px; 
    font-size: 13px; 
    border-bottom: 1px solid #3f3f46; 
    padding-bottom: 2px; 
}

ai ul { margin: 4px 0 8px 0; padding-left: 18px; list-style-type: square; }
ai ul li::marker { color: #dc2626; }
ai li { margin-bottom: 4px; color: #d4d4d8; }

ai hr { border: none; border-top: 1px dashed #52525b; margin: 12px 0; }

ai mr {
    display: block;
    font-size: 12px;
    color: #a1a1aa;
    background: #18181b;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 10px;
    border-left: 2px solid #52525b;
    line-height: 1.4;
}

ai .v { color: #10b981; font-weight: bold; }
ai .warn { color: #eab308; font-weight: bold; }
ai .r { color: #f43f5e; font-weight: bold; }