/* 1. 顶部栏优化：隐藏破坏氛围的默认顶部颜色条，保持克制与纯粹 */
[class*="bg-[#F1CBCB]"], 
[class*="bg-[#c9e1e9]"] {
    display: none !important;
}

/* 2. 统一聊天框基础样式：冷冽苍白、微磨砂质感（泪眼朦胧） */
.bg-gray-100\/90.relative.inline-block {
    background: rgba(240, 244, 248, 0.65) !important; /* 苍白半透明背景 */
    backdrop-filter: blur(12px) !important; /* 泪眼朦胧的微磨砂效果 */
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(162, 181, 198, 0.4) !important; /* 冷灰蓝细边框 */
    border-radius: 14px !important;
    box-shadow: 0 8px 32px rgba(140, 163, 186, 0.1), inset 0 0 20px rgba(255, 255, 255, 0.6) !important;
    isolation: isolate !important; /* 创建独立层叠上下文，防止动效溢出 */
    position: relative !important;
    overflow: hidden !important;
}

/* 3. 聊天框背景微动效：缓慢落下的“泪滴/初雪”，代表遥不可及的忧郁 */
.bg-gray-100\/90.relative.inline-block::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: -1 !important;
    /* 强制使用内嵌SMIL SVG，确保系统禁用CSS动画时仍有氛围点缀 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Ccircle cx='15%25' cy='-5%25' r='1.5' fill='rgba(162,181,198,0.5)'%3E%3Canimate attributeName='cy' from='-5%25' to='105%25' dur='12s' repeatCount='indefinite' /%3E%3C/circle%3E%3Ccircle cx='85%25' cy='-5%25' r='2' fill='rgba(255,255,255,0.6)'%3E%3Canimate attributeName='cy' from='-5%25' to='105%25' dur='18s' begin='3s' repeatCount='indefinite' /%3E%3C/circle%3E%3Ccircle cx='50%25' cy='-5%25' r='1' fill='rgba(140,163,186,0.4)'%3E%3Canimate attributeName='cy' from='-5%25' to='105%25' dur='25s' begin='7s' repeatCount='indefinite' /%3E%3C/circle%3E%3C/svg%3E") !important;
}

/* 4. 主文本样式：保持绝对清晰的高对比度冷峻深色，克制的情感表达 */
.markdown-body {
    color: #3b4b5b !important; /* 强制浅色背景搭配高对比深灰蓝文字，保障绝对可读性 */
    background: transparent !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    line-height: 1.7 !important;
    letter-spacing: 0.5px !important;
    z-index: 1 !important;
}

/* 5. 底部栏优化：底部操作按钮视觉收束处理 */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary {
    color: #6a7c8e !important; /* 柔和的冷灰色 */
    background-color: transparent !important;
    border-radius: 6px !important;
    transition: all 0.4s ease !important;
}

.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
    color: #3b4b5b !important; /* 悬停时颜色加深，如同克制的视线聚焦 */
    background-color: rgba(162, 181, 198, 0.15) !important;
}

/* 6. 底部栏优化：底部模型与Token信息去色处理 */
.MuiTypography-root.MuiTypography-body2.css-6c0gf2,
.text-orange-500 {
    color: #8c9fb1 !important; /* 将原本可能刺眼的亮橘色和黑色强制统一为忧郁的浅灰蓝 */
    font-weight: 500 !important;
    letter-spacing: 0.5px !important;
}

/* 7. 输出聊天框加载动画重构：忧郁的“冷光泪珠”闪烁 (纯SVG实现) */
/* 隐藏系统默认加载元素 */
.style-module__AtdJSq__dot-flashing.style-module__AtdJSq__text {
    display: none !important;
}

/* 配置加载容器 */
.flex.items-center.justify-center.w-6.h-5 {
    position: relative !important;
    min-height: 20px !important;
}

/* 注入纯SVG SMIL加载动画，无视CSS关键帧限制 */
.flex.items-center.justify-center.w-6.h-5::before {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 24px !important;
    height: 20px !important;
    /* 三颗逐渐变亮的冷色泪滴状圆点 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20'%3E%3Ccircle cx='4' cy='10' r='2' fill='%238ca3ba'%3E%3Canimate attributeName='opacity' values='0.1;0.9;0.1' dur='1.8s' repeatCount='indefinite' begin='0s'/%3E%3C/circle%3E%3Ccircle cx='12' cy='10' r='2' fill='%23a2b5c6'%3E%3Canimate attributeName='opacity' values='0.1;0.9;0.1' dur='1.8s' repeatCount='indefinite' begin='0.4s'/%3E%3C/circle%3E%3Ccircle cx='20' cy='10' r='2' fill='%23d1dce5'%3E%3Canimate attributeName='opacity' values='0.1;0.9;0.1' dur='1.8s' repeatCount='indefinite' begin='0.8s'/%3E%3C/circle%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* 8. 移动端与低动效兼容性处理 */
@media (max-width: 480px) {
    .bg-gray-100\/90.relative.inline-block {
        backdrop-filter: blur(8px) !important; /* 降低移动端渲染压力 */
        border-radius: 10px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bg-gray-100\/90.relative.inline-block::before {
        opacity: 0.3 !important; /* 当用户偏好降低动画时，将其变为隐约的静态泪痕/雪花点缀 */
    }
}
/* 让输入光标(打字时的那条竖线)变成冷蓝悲剧色调 */
#ai-chat-input {
    caret-color: #8da4be !important;
}

/* 在输入框容器顶部追加一条极度纤细的冰蓝色微光边缘 */
#ai-chat-bottom-input::before {
    content: '';
    position: absolute;
    top: 0;
    left: 5%;
    width: 90%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(165, 188, 215, 0.4), transparent) !important;
    pointer-events: none; /* 确保不影响点击输入 */
}