/* =========================================================
   主题：瑶池霜雪 (Yaochi Frost)
   风格：先天至阴、清冷神圣、高可读性、磨砂玻璃
   ========================================================= */

/* 1. 强制移除顶部的颜色装饰条 */
[class*="bg-[#F1CBCB]"], 
[class*="bg-[#c9e1e9]"] {
    display: none !important;
}

/* 2. 统一聊天框基础样式 (输入与输出共有) - 霜雪磨砂质感 */
.bg-gray-100\/90.relative.inline-block {
    background: linear-gradient(135deg, rgba(245, 250, 255, 0.85) 0%, rgba(255, 255, 255, 0.95) 100%) !important;
    backdrop-filter: blur(12px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(150%) !important;
    border: 1px solid rgba(176, 224, 230, 0.6) !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 24px rgba(135, 206, 235, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    transition: all 0.3s ease-in-out !important;
    position: relative !important;
    isolation: isolate !important; /* 建立层叠上下文，隔离背景动效 */
}

/* 聊天框悬浮效果 - 灵气微泛 */
.bg-gray-100\/90.relative.inline-block:hover {
    box-shadow: 0 10px 30px rgba(135, 206, 235, 0.2), inset 0 1px 0 rgba(255, 255, 255, 1) !important;
    border-color: rgba(135, 206, 235, 0.8) !important;
}

/* 3. 聊天框背景微动效 - 瑶池冰晶飘落 (SMIL SVG) */
.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: 0 !important;
    border-radius: inherit !important;
    opacity: 0.4 !important;
    /* 使用内联SVG SMIL动画实现冰晶缓慢飘落 */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><circle cx="20" cy="20" r="1.5" fill="%23AEE2FF"><animate attributeName="cy" from="-10" to="110" dur="8s" repeatCount="indefinite"/><animate attributeName="opacity" values="0;1;0" dur="8s" repeatCount="indefinite"/></circle><circle cx="70" cy="50" r="1" fill="%23FFFFFF"><animate attributeName="cy" from="-10" to="110" dur="12s" repeatCount="indefinite"/><animate attributeName="opacity" values="0;0.8;0" dur="12s" repeatCount="indefinite"/></circle></svg>') !important;
}

/* 4. 聊天框内的主要文本内容 - 绝对可读性与神话氛围 */
.markdown-body {
    color: #1A2530 !important; /* 高对比度深色，确保在浅色背景上绝对清晰 */
    font-family: 'Noto Serif SC', 'Songti SC', 'Microsoft YaHei', serif !important; /* 优先使用衬线体以契合仙侠感 */
    font-weight: 500 !important;
    line-height: 1.7 !important;
    letter-spacing: 0.03em !important;
    position: relative !important;
    z-index: 1 !important; /* 确保文本在背景动效之上 */
    background: transparent !important;
}

/* 加粗文本颜色微调，突出重点 */
.markdown-body strong {
    color: #0E4B75 !important; /* 深冰蓝色 */
    font-weight: 700 !important;
}

/* 5. 底部附加元素 - 统一调色以融入主题 */
/* 底部操作按钮 */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary {
    color: #5D7B93 !important;
    font-weight: bold !important;
    transition: color 0.2s !important;
}
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
    color: #2980B9 !important;
    background-color: rgba(135, 206, 235, 0.1) !important;
}

/* 模型名称文本 */
.MuiTypography-root.MuiTypography-body2.css-6c0gf2 {
    color: #7F95A8 !important;
    font-style: italic !important;
}

/* Token消耗文本 */
.text-orange-500 {
    color: #85A3B8 !important; /* 将原本的橙色改为冷色调以契合瑶池主题 */
    font-weight: bold !important;
}

/* =========================================================
   6. 加载动画重构：大道阴阳流转 (SMIL SVG)
   ========================================================= */

/* 隐藏默认加载元素 */
.style_dot-flashing__8L91Q.style_text__zGhNq {
    display: none !important;
}

/* 设置动画容器 */
.flex.items-center.justify-center.w-6.h-5 {
    position: relative !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 注入自定义SVG SMIL加载动画 - 阴阳鱼/冰雪流转意象 */
.flex.items-center.justify-center.w-6.h-5::before {
    content: "" !important;
    position: absolute !important;
    width: 20px !important;
    height: 20px !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><circle cx="25" cy="25" r="20" fill="none" stroke="%2387CEEB" stroke-width="4" stroke-linecap="round" stroke-dasharray="31.4 31.4"><animateTransform attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="1.5s" repeatCount="indefinite"/></circle><circle cx="25" cy="25" r="10" fill="none" stroke="%23FFFFFF" stroke-width="3" stroke-linecap="round" stroke-dasharray="15 15"><animateTransform attributeName="transform" type="rotate" from="360 25 25" to="0 25 25" dur="1s" repeatCount="indefinite"/></circle></svg>') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* 移动端适配微调 */
@media (max-width: 480px) {
    .bg-gray-100\/90.relative.inline-block {
        border-radius: 12px !important;
        padding: 8px !important;
    }
    .markdown-body {
        font-size: 15px !important;
    }
}