/* =========================================
   二次元校园樱花粉主题 + 高级 Markdown 排版
   ========================================= */

/* --- 1. 全局隐藏默认颜色条 --- */
[class*="bg-[#F1CBCB]"], 
[class*="bg-[#c9e1e9]"] {
    display: none !important;
}

/* --- 2. 核心聊天框：樱花粉渐变与动效 --- */
.bg-gray-100\/90.relative.inline-block {
    background: linear-gradient(135deg, #FFF5F7 0%, #FFE8EC 100%) !important;
    border: 2px solid #FFC0CB !important;
    border-radius: 18px !important;
    box-shadow: 0 4px 16px rgba(255, 192, 203, 0.25), inset 0 0 10px rgba(255, 255, 255, 0.9) !important;
    padding: 16px 18px !important;
    isolation: isolate !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
}

.bg-gray-100\/90.relative.inline-block:hover {
    box-shadow: 0 6px 22px rgba(255, 192, 203, 0.4), inset 0 0 12px rgba(255, 255, 255, 1) !important;
    transform: translateY(-2px) !important;
}

/* 背景飘落樱花 (SVG SMIL 强兼容动画) */
.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;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Cg fill='%23FFB7C5' opacity='0.5'%3E%3Ccircle r='3.5'%3E%3Canimate attributeName='cy' from='-10' to='100%25' dur='6s' repeatCount='indefinite'/%3E%3Canimate attributeName='cx' values='10%25;15%25;10%25' dur='3s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle r='4.5'%3E%3Canimate attributeName='cy' from='-10' to='100%25' dur='8s' repeatCount='indefinite'/%3E%3Canimate attributeName='cx' values='80%25;75%25;80%25' dur='4s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle r='2.5'%3E%3Canimate attributeName='cy' from='-10' to='100%25' dur='7s' repeatCount='indefinite'/%3E%3Canimate attributeName='cx' values='50%25;55%25;50%25' dur='3.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle r='3'%3E%3Canimate attributeName='cy' from='-10' to='100%25' dur='9s' repeatCount='indefinite'/%3E%3Canimate attributeName='cx' values='30%25;25%25;30%25' dur='4.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E") !important;
    background-size: cover !important;
    z-index: -1 !important;
    pointer-events: none !important;
}

/* --- 3. 正文与底部元素 --- */
.markdown-body {
    color: #4A3B3F !important;
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif !important;
    font-size: 15px !important;
    line-height: 1.65 !important;
    font-weight: 500 !important;
    background: transparent !important;
    z-index: 1 !important;
}
say {
    color: #2957a2ff;
}
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary,
.MuiTypography-root.MuiTypography-body2.css-6c0gf2 {
    color: #7A6268 !important;
    font-weight: bold !important;
    transition: all 0.2s ease !important;
}
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
    background-color: #FFC0CB !important;
    color: #FFFFFF !important;
    border-radius: 6px !important;
}
.text-orange-500 { color: #D65576 !important; font-weight: bold !important; }


/* --- 4. 自定义 Markdown 进阶排版 (代码块与折叠面板) --- */
.markdown-body details {
    border: none !important;
    margin: 16px 0 !important;
    background-color: transparent !important;
    overflow: visible !important;
}
.markdown-body summary {
    display: inline-flex !important;
    align-items: center !important;
    padding: 8px 16px !important;
    cursor: pointer !important;
    background-color: #ffffff !important;
    color: #2d3748 !important;
    font-weight: 500 !important;
    transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out !important;
    outline: none !important;
    border: 1px solid #FFC0CB !important; /* 改为契合主题的粉色边框 */
    border-radius: 9999px !important;
    box-shadow: 0 2px 4px rgba(255,192,203,0.3) !important;
    list-style: none !important;
}
.markdown-body summary::-webkit-details-marker { display: none !important; }
.markdown-body summary:hover {
    background-color: #FFF5F7 !important;
    border-color: #FF6B81 !important;
    box-shadow: 0 3px 8px rgba(255,192,203,0.6) !important;
}
.markdown-body summary::before {
    content: '▶' !important;
    display: inline-block !important;
    margin-right: 12px !important;
    font-size: 0.7em !important;
    color: #D65576 !important;
    transition: transform 0.2s ease-in-out !important;
    transform-origin: center !important;
}
.markdown-body details[open] > summary::before { transform: rotate(90deg) !important; }

/* 代码块样式优化 */
.markdown-body details > pre,
.markdown-body details > table {
    margin-top: 8px !important;
    border: 1px solid #FFC0CB !important;
    border-radius: 8px !important;
    background-color: rgba(255, 255, 255, 0.7) !important; /* 半透明白底，透出粉色 */
    overflow-x: auto !important;
}
.markdown-body details pre > div:first-child[style*="border-color"] { display: none !important; }
.markdown-body details pre { margin: 0 !important; padding: 0 !important; }
.markdown-body details pre > div[node="[object Object]"] {
    padding: 16px !important;
    color: #2d3748 !important;
    background: transparent !important;
}
.markdown-body details code {
    font-size: 13px !important;
    line-height: 1.4 !important;
    color: #D65576 !important; /* 代码高亮为深粉色 */
}
.markdown-body details table th,
.markdown-body details table td {
    font-size: 13px !important;
    padding: 8px 12px !important;
}


/* --- 5. 修复：防屏蔽的纯 SVG 加载动画 (匹配粉色主题) --- */
/* 强制隐藏默认加载节点 */
.style_dot-flashing__8L91Q.style_text__zGhNq {
    display: none !important;
}

/* 在父容器注入抗干扰 SVG 动画及“正在输入”文字 */
.flex.items-center.justify-center.w-6.h-5 {
    position: relative !important;
    width: 120px !important; /* 拓宽容器以容纳文字 */
    justify-content: flex-start !important;
}

.flex.items-center.justify-center.w-6.h-5::before {
    content: "" !important;
    display: inline-block !important;
    width: 20px !important;
    height: 20px !important;
    /* 使用内嵌 SMIL SVG 实现的粉色双环加载动画，无视 CSS 动画被禁 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50'%3E%3Ccircle cx='25' cy='25' r='20' fill='none' stroke='%23FFB7C5' stroke-width='4' stroke-dasharray='31.4 31.4'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='1s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E") !important;
    background-size: contain !important;
}

.flex.items-center.justify-center.w-6.h-5::after {
    content: '少女祈祷中...' !important; /* 匹配二次元主题的加载文案 */
    font-size: 13px !important;
    color: #D65576 !important;
    margin-left: 8px !important;
    font-weight: bold !important;
}
