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

/* ========== 隐藏默认加载动画 ========== */
.style-module__AtdJSq__dot-flashing.style-module__AtdJSq__text {
    display: none !important;
}

/* ========== 统一聊天框美化（奶油底 + 樱花粉边框 + 星光） ========== */
.bg-gray-100\/90.relative.inline-block {
    background: linear-gradient(135deg, #FFF8F3 0%, #FFFAF5 50%, #FFF5EC 100%) !important;
    border: 2px solid #FFB6C1 !important;
    border-radius: 20px !important;
    box-shadow: 
        0 4px 20px rgba(255, 182, 193, 0.25),
        0 2px 8px rgba(168, 216, 234, 0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.8) !important;
    padding: 18px 22px !important;
    position: relative !important;
    isolation: isolate !important;
    overflow: visible !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.bg-gray-100\/90.relative.inline-block:hover {
    box-shadow: 
        0 6px 28px rgba(255, 182, 193, 0.4),
        0 3px 12px rgba(168, 216, 234, 0.25),
        inset 0 1px 2px rgba(255, 255, 255, 0.9) !important;
    transform: translateY(-1px) !important;
}

/* ========== 樱花粉顶部装饰条 + 金色星光（SVG SMIL动画） ========== */
.bg-gray-100\/90.relative.inline-block::before {
    content: '' !important;
    position: absolute !important;
    top: -2px !important;
    left: -2px !important;
    right: -2px !important;
    height: 8px !important;
    background: 
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='8' viewBox='0 0 100 8'><defs><linearGradient id='g' x1='0' x2='1'><stop offset='0' stop-color='%23FFB6C1'/><stop offset='0.5' stop-color='%23A8D8EA'/><stop offset='1' stop-color='%23FFB6C1'/></linearGradient></defs><rect width='100' height='8' rx='4' fill='url(%23g)'/><g fill='%23FFD700'><polygon points='15,4 16,2 17,4 19,4 17.5,5.5 18,7.5 16,6.5 14,7.5 14.5,5.5 13,4'><animate attributeName='opacity' values='0.3;1;0.3' dur='1.8s' repeatCount='indefinite'/></polygon><polygon points='50,4 51,2 52,4 54,4 52.5,5.5 53,7.5 51,6.5 49,7.5 49.5,5.5 48,4'><animate attributeName='opacity' values='1;0.3;1' dur='2.2s' repeatCount='indefinite'/></polygon><polygon points='85,4 86,2 87,4 89,4 87.5,5.5 88,7.5 86,6.5 84,7.5 84.5,5.5 83,4'><animate attributeName='opacity' values='0.5;1;0.5' dur='1.5s' repeatCount='indefinite'/></polygon></g></svg>") no-repeat center/100% 100% !important;
    border-radius: 20px 20px 0 0 !important;
    z-index: 0 !important;
    pointer-events: none !important;
}

/* ========== 角落金色星星sparkle装饰（SVG SMIL） ========== */
.bg-gray-100\/90.relative.inline-block::after {
    content: '' !important;
    position: absolute !important;
    top: 12px !important;
    right: 14px !important;
    width: 22px !important;
    height: 22px !important;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'><g transform='translate(11 11)'><polygon points='0,-8 2,-2 8,0 2,2 0,8 -2,2 -8,0 -2,-2' fill='%23FFD700' opacity='0.9'><animateTransform attributeName='transform' type='rotate' from='0' to='360' dur='6s' repeatCount='indefinite'/><animate attributeName='opacity' values='0.4;1;0.4' dur='2s' repeatCount='indefinite'/></polygon><circle r='1.5' fill='%23FFFFFF'><animate attributeName='r' values='1;2;1' dur='1.5s' repeatCount='indefinite'/></circle></g></svg>") no-repeat center/contain !important;
    z-index: 2 !important;
    pointer-events: none !important;
    /* CSS增强（在SMIL基础上提供额外动效） */
    animation: angelGlow 3s ease-in-out infinite !important;
}

@keyframes angelGlow {
    0%, 100% { filter: drop-shadow(0 0 2px #FFD700); }
    50% { filter: drop-shadow(0 0 6px #FFD700) drop-shadow(0 0 10px #FFB6C1); }
}

/* ========== 输入聊天框（单独样式：天空蓝调） ========== */
.bg-gray-100\/90.relative.inline-block:not(.chat-answer-container .bg-gray-100\/90) {
    background: linear-gradient(135deg, #FFF8F3 0%, #F0F8FC 100%) !important;
    border: 2px solid #A8D8EA !important;
    box-shadow: 
        0 4px 20px rgba(168, 216, 234, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.8) !important;
}

.bg-gray-100\/90.relative.inline-block:not(.chat-answer-container .bg-gray-100\/90)::before {
    background: 
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='8' viewBox='0 0 100 8'><defs><linearGradient id='g2' x1='0' x2='1'><stop offset='0' stop-color='%23A8D8EA'/><stop offset='0.5' stop-color='%23FFB6C1'/><stop offset='1' stop-color='%23A8D8EA'/></linearGradient></defs><rect width='100' height='8' rx='4' fill='url(%23g2)'/><g fill='%23FFD700'><polygon points='30,4 31,2.5 32,4 33.5,4 32.3,5 32.8,6.8 31,5.8 29.2,6.8 29.7,5 28.5,4'><animate attributeName='opacity' values='0.4;1;0.4' dur='2s' repeatCount='indefinite'/></polygon><polygon points='70,4 71,2.5 72,4 73.5,4 72.3,5 72.8,6.8 71,5.8 69.2,6.8 69.7,5 68.5,4'><animate attributeName='opacity' values='1;0.4;1' dur='2.4s' repeatCount='indefinite'/></polygon></g></svg>") no-repeat center/100% 100% !important;
}

/* ========== 正文文字（暖棕 + 圆润可爱字体） ========== */
.markdown-body {
    color: #5C4A4A !important;
    font-family: "ZCOOL KuaiLe", "M PLUS Rounded 1c", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif !important;
    font-size: 15px !important;
    line-height: 1.85 !important;
    letter-spacing: 0.3px !important;
    background: transparent !important;
    position: relative !important;
    z-index: 1 !important;
}

/* 标题用衬线庄重天使感 */
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    font-family: "Source Han Serif", "Noto Serif SC", "思源宋体", "STSong", serif !important;
    color: #8B5A6B !important;
    font-weight: bold !important;
    letter-spacing: 1px !important;
    border-bottom: 1px dashed #FFB6C1 !important;
    padding-bottom: 4px !important;
}

/* 强调文本：樱花粉加粗 */
.markdown-body strong,
.markdown-body b {
    color: #E91E63 !important;
    font-weight: bold !important;
}

/* 斜体：天空蓝 */
.markdown-body em,
.markdown-body i {
    color: #5BA3C7 !important;
    font-style: italic !important;
}

/* 引用块：奶油黄底 + 金色边 */
.markdown-body blockquote {
    background: linear-gradient(135deg, #FFFBF0 0%, #FFF5E6 100%) !important;
    border-left: 4px solid #FFD700 !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    color: #6B5544 !important;
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.15) !important;
}

/* 行内代码 */
.markdown-body code {
    background: #FFE8EE !important;
    color: #C2185B !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    font-size: 0.92em !important;
}

/* 链接：樱花粉 */
.markdown-body a {
    color: #FF69B4 !important;
    text-decoration: underline wavy #FFD700 !important;
}

/* ========== 底部按钮（复制、编辑、删除） ========== */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary {
    color: #8B5A6B !important;
    background: rgba(255, 182, 193, 0.15) !important;
    border-radius: 12px !important;
    padding: 4px 10px !important;
    margin: 2px !important;
    font-family: system-ui, "PingFang SC", sans-serif !important;
    transition: all 0.3s ease !important;
}

.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
    background: rgba(255, 182, 193, 0.35) !important;
    color: #C2185B !important;
    transform: scale(1.05) !important;
}

/* ========== 模型名称 ========== */
.MuiTypography-root.MuiTypography-body2.css-6c0gf2 {
    color: #A89080 !important;
    font-family: system-ui, sans-serif !important;
    font-size: 0.85em !important;
    font-style: italic !important;
}

/* ========== Token消耗 ========== */
.text-orange-500 {
    color: #D4A017 !important;
    font-weight: bold !important;
    text-shadow: 0 0 1px rgba(255, 215, 0, 0.3) !important;
}

/* ========== 自定义加载动画（樱花飘落 SVG SMIL） ========== */
.flex.items-center.justify-center.w-6.h-5 {
    position: relative !important;
    width: 60px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.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: 60px !important;
    height: 30px !important;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='30' viewBox='0 0 60 30'><g><circle cx='12' cy='15' r='4' fill='%23FFB6C1'><animate attributeName='cy' values='15;8;15;22;15' dur='1.2s' repeatCount='indefinite'/><animate attributeName='opacity' values='1;0.5;1' dur='1.2s' repeatCount='indefinite'/></circle><circle cx='30' cy='15' r='4' fill='%23A8D8EA'><animate attributeName='cy' values='15;8;15;22;15' dur='1.2s' begin='0.2s' repeatCount='indefinite'/><animate attributeName='opacity' values='1;0.5;1' dur='1.2s' begin='0.2s' repeatCount='indefinite'/></circle><circle cx='48' cy='15' r='4' fill='%23FFD700'><animate attributeName='cy' values='15;8;15;22;15' dur='1.2s' begin='0.4s' repeatCount='indefinite'/><animate attributeName='opacity' values='1;0.5;1' dur='1.2s' begin='0.4s' repeatCount='indefinite'/></circle></g></svg>") no-repeat center/contain !important;
    z-index: 1 !important;
}

.flex.items-center.justify-center.w-6.h-5::after {
    content: '' !important;
    position: absolute !important;
    top: -8px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 80px !important;
    height: 14px !important;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='14' viewBox='0 0 80 14'><g fill='%23FFD700'><polygon points='10,7 11,5 12,7 14,7 12.5,8.5 13,10.5 11,9.5 9,10.5 9.5,8.5 8,7'><animate attributeName='opacity' values='0;1;0' dur='1.5s' repeatCount='indefinite'/></polygon><polygon points='40,7 41,5 42,7 44,7 42.5,8.5 43,10.5 41,9.5 39,10.5 39.5,8.5 38,7'><animate attributeName='opacity' values='0;1;0' dur='1.5s' begin='0.5s' repeatCount='indefinite'/></polygon><polygon points='70,7 71,5 72,7 74,7 72.5,8.5 73,10.5 71,9.5 69,10.5 69.5,8.5 68,7'><animate attributeName='opacity' values='0;1;0' dur='1.5s' begin='1s' repeatCount='indefinite'/></polygon></g></svg>") no-repeat center/contain !important;
    z-index: 2 !important;
}

/* ========== 移动端适配 ========== */
@media (max-width: 480px) {
    .bg-gray-100\/90.relative.inline-block {
        padding: 14px 16px !important;
        border-radius: 16px !important;
    }
    .markdown-body {
        font-size: 14px !important;
        line-height: 1.7 !important;
    }
    .bg-gray-100\/90.relative.inline-block::after {
        width: 18px !important;
        height: 18px !important;
        top: 10px !important;
        right: 10px !important;
    }
}

/* ========== 减少动效偏好 ========== */
@media (prefers-reduced-motion: reduce) {
    .bg-gray-100\/90.relative.inline-block::after {
        animation-duration: 6s !important;
    }
    .bg-gray-100\/90.relative.inline-block {
        transition: none !important;
    }
}
