/*============================
   浅橘·暖 — 浅橘色调美化
   ============================ */

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

/* --- 聊天框主体 --- */
.bg-gray-100\/90.relative.inline-block {
    background: #FFF9F5 !important;
    border: 1px solid #FFE4D6 !important;
    border-image: none !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(251, 146, 60, 0.08) !important;
    position: relative !important;
    isolation: isolate !important;
    overflow: hidden !important;
    transition: box-shadow 0.2s ease !important;
}

.bg-gray-100\/90.relative.inline-block:hover {
    box-shadow: 0 2px 8px rgba(251, 146, 60, 0.12) !important;
}

/* --- 去掉所有伪元素装饰 --- */
.bg-gray-100\/90.relative.inline-block::before,
.bg-gray-100\/90.relative.inline-block::after {
    content: none !important;
    display: none !important;
}

/* --- 文字内容 --- */
.markdown-body {
    color: #78350F !important;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif !important;
    font-size: 15px !important;
    line-height: 1.8 !important;
    letter-spacing: 0.2px !important;
    position: relative !important;
    z-index: 1 !important;
    background: transparent !important;
}

/* --- 底部操作按钮 --- */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary {
    color: #F97316 !important;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif !important;
    border-radius: 8px !important;
    transition: color 0.2s ease, background-color 0.2s ease !important;
}

.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
    color: #EA580C !important;
    background-color: rgba(251, 146, 60, 0.06) !important;
}

/* --- 模型名称文本 --- */
.MuiTypography-root.MuiTypography-body2.css-6c0gf2 {
    color: #FDBA74 !important;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif !important;
    font-size: 12px !important;
}

/* --- Token消耗文本 --- */
.text-orange-500 {
    color: #FDBA74 !important;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif !important;
    font-size: 12px !important;
}

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

/* --- 加载动画容器 --- */
.flex.items-center.justify-center.w-6.h-5 {
    position: relative !important;
    width: 36px !important;
    height: 36px !important;
    min-height: 36px !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: 18px !important;
    height: 18px !important;
    border: 2px solid #FFEDD5 !important;
    border-top-color: #F97316 !important;
    border-radius: 50% !important;
    animation: spin 0.8s linear infinite !important;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.flex.items-center.justify-center.w-6.h-5::after {
    content: none !important;
}

/* --- 移动端 --- */
@media (max-width: 480px) {
    .bg-gray-100\/90.relative.inline-block {
        border-radius: 10px !important;
    }

    .markdown-body {
        font-size: 14px !important;
        line-height: 1.75 !important;
    }

    .flex.items-center.justify-center.w-6.h-5 {
        width: 28px !important;
        height: 28px !important;
        min-height: 28px !important;
    }

    .flex.items-center.justify-center.w-6.h-5::before {
        width: 14px !important;
        height: 14px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bg-gray-100\/90.relative.inline-block:hover {
        box-shadow: 0 1px 3px rgba(251, 146, 60, 0.08) !important;
    }

    .flex.items-center.justify-center.w-6.h-5::before {
        animation: none !important;
        border-color: #FFEDD5 !important;
        border-top-color: #F97316 !important;
    }
}

/* ============================
   浅橘·暖 — 代码块美化
   ============================ */

/* --- 代码块根容器 --- */
.markdown-body pre {
    background: transparent !important;
    border: none !important;
    margin: 12px 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

/* --- 主容器 --- */
.markdown-body pre > div {
    background: #FFF9F5 !important;
    border: 1px solid #FFEDD5 !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 3px rgba(251, 146, 60, 0.06) !important;
    position: relative !important;
    overflow: hidden !important;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif !important;
}

.markdown-body pre > div::before,
.markdown-body pre > div::after {
    content: none !important;
}

/* --- 头部栏 --- */
.markdown-body pre > div > div.flex.justify-between.h-8 {
    background: #FFF7ED !important;
    border-bottom: 1px solid #FFEDD5 !important;
    border-radius: 10px 10px 0 0 !important;
    position: relative !important;
    z-index: 1 !important;
}

.markdown-body pre > div > div.border-b {
    border-color: #FFEDD5 !important;
}

/* --- 语言标签 --- */
.markdown-body pre > div > div.flex.justify-between > div.text-\[13px\] {
    color: #F97316 !important;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif !important;
    font-size: 12px !important;
    letter-spacing: 0.5px !important;
}

/* --- 隐藏复制按钮 --- */
.markdown-body pre div[data-tooltip-id^="copy-tooltip"] {
    display: none !important;
}

/* --- 代码内容区 --- */
.markdown-body pre > div > div[node] {
    background: #FFF9F5 !important;
    color: #78350F !important;
    padding: 14px 16px !important;
    position: relative !important;
    z-index: 1 !important;
}

/* --- 代码元素 --- */
.markdown-body pre code[class^="language-"] {
    color: #78350F !important;
    font-family: "SF Mono", "Menlo", "Monaco", "Consolas", "Liberation Mono", monospace !important;
    font-size: 13px !important;
    line-height: 1.7 !important;
    letter-spacing: 0 !important;
    background: transparent !important;
}

/* --- 语法高亮：浅橘色系 --- */

/* 关键字 */
.markdown-body pre code[class^="language-"] > span[style*="font-weight:bold"],
.markdown-body pre code[class^="language-"] > span[style*="color:rgb(167,29,93)"],
.markdown-body pre code[class^="language-"] > span[style*="color:#a71d5d"] {
    color: #EA580C !important;
    font-weight: 600 !important;
}

/* 字符串 */
.markdown-body pre code[class^="language-"] > span[style*="color:rgb(24,54,145)"],
.markdown-body pre code[class^="language-"] > span[style*="color:#183691"],
.markdown-body pre code[class^="language-"] > span[style*="color:rgb(3,47,98)"],
.markdown-body pre code[class^="language-"] > span[style*="color:#032f62"] {
    color: #92400E !important;
}

/* 注释 */
.markdown-body pre code[class^="language-"] > span[style*="color:rgb(150,152,150)"],
.markdown-body pre code[class^="language-"] > span[style*="color:#969896"],
.markdown-body pre code[class^="language-"] > span[style*="color:rgb(106,115,125)"],
.markdown-body pre code[class^="language-"] > span[style*="color:#6a737d"] {
    color: #FDBA74 !important;
    font-style: italic !important;
}

/* 数字/常量 */
.markdown-body pre code[class^="language-"] > span[style*="color:rgb(0,134,179)"],
.markdown-body pre code[class^="language-"] > span[style*="color:#0086b3"],
.markdown-body pre code[class^="language-"] > span[style*="color:rgb(0,92,197)"],
.markdown-body pre code[class^="language-"] > span[style*="color:#005cc5"] {
    color: #F97316 !important;
}

/* 函数名 */
.markdown-body pre code[class^="language-"] > span[style*="color:rgb(121,93,163)"],
.markdown-body pre code[class^="language-"] > span[style*="color:#795da3"],
.markdown-body pre code[class^="language-"] > span[style*="color:rgb(111,66,193)"],
.markdown-body pre code[class^="language-"] > span[style*="color:#6f42c1"] {
    color: #EA580C !important;
}

/* 标签/属性 */
.markdown-body pre code[class^="language-"] > span[style*="color:rgb(99,163,92)"],
.markdown-body pre code[class^="language-"] > span[style*="color:#63a35c"],
.markdown-body pre code[class^="language-"] > span[style*="color:rgb(34,134,58)"],
.markdown-body pre code[class^="language-"] > span[style*="color:#22863a"] {
    color: #EA580C !important;
}

/* 普通文本 */
.markdown-body pre code[class^="language-"] > span[style*="color:rgb(51,51,51)"],
.markdown-body pre code[class^="language-"] > span[style*="color:#333"],
.markdown-body pre code[class^="language-"] > span[style*="color:rgb(36,41,46)"],
.markdown-body pre code[class^="language-"] > span[style*="color:#24292e"] {
    color: #78350F !important;
}

/* --- 纯代码块 --- */
.markdown-body pre > code[node] {
    background: #FFF9F5 !important;
    color: #78350F !important;
    font-family: "SF Mono", "Menlo", "Monaco", "Consolas", monospace !important;
    font-size: 13px !important;
    line-height: 1.7 !important;
    padding: 14px 16px !important;
    border: 1px solid #FFEDD5 !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 3px rgba(251, 146, 60, 0.06) !important;
    display: block !important;
}

/* --- 行内代码 --- */
.markdown-body code:not([class^="language-"]):not([node]) {
    background: #FFF7ED !important;
    color: #92400E !important;
    border: 1px solid #FFE4D6 !important;
    border-radius: 6px !important;
    padding: 1px 6px !important;
    font-family: "SF Mono", "Menlo", "Monaco", "Consolas", monospace !important;
    font-size: 0.88em !important;
}

/* --- 滚动条 --- */
.markdown-body pre > div > div[node]::-webkit-scrollbar {
    height: 4px !important;
}

.markdown-body pre > div > div[node]::-webkit-scrollbar-track {
    background: #FFF7ED !important;
    border-radius: 2px !important;
}

.markdown-body pre > div > div[node]::-webkit-scrollbar-thumb {
    background: #FDBA74 !important;
    border-radius: 2px !important;
}

.markdown-body pre > div > div[node]::-webkit-scrollbar-thumb:hover {
    background: #F97316 !important;
}

/* --- 代码块移动端 --- */
@media (max-width: 480px) {
    .markdown-body pre > div {
        border-radius: 8px !important;
    }

    .markdown-body pre > div > div.flex.justify-between.h-8 {
        border-radius: 8px 8px 0 0 !important;
    }

    .markdown-body pre code[class^="language-"],
    .markdown-body pre > code[node] {
        font-size: 12px !important;
        line-height: 1.65 !important;
    }

    .markdown-body pre > div > div[node] {
        padding: 10px 12px !important;
    }
}

/* ============================
   浅橘·暖 — 折叠块美化
   ============================ */

/* --- 折叠块容器 --- */
.markdown-body details {
    background: #FFF9F5 !important;
    border: 1px solid #FFEDD5 !important;
    border-radius: 10px !important;
    margin: 10px 0 !important;
    box-shadow: 0 1px 3px rgba(251, 146, 60, 0.06) !important;
    overflow: hidden !important;
}

/* --- 折叠标题 --- */
.markdown-body details > summary {
    background: #FFF7ED !important;
    color: #92400E !important;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif !important;
    font-size: 14px !important;
    letter-spacing: 0.3px !important;
    padding: 8px 14px !important;
    cursor: pointer !important;
    list-style: none !important;
    border-bottom: 1px solid #FFEDD5 !important;
    border-radius: 10px 10px 0 0 !important;
    transition: background 0.2s ease !important;
    position: relative !important;
}

.markdown-body details > summary::-webkit-details-marker,
.markdown-body details > summary::marker {
    display: none !important;
    content: "" !important;
}

.markdown-body details > summary::before {
    content: "›" !important;
    margin-right: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    display: inline-block !important;
    transition: transform 0.2s ease !important;
    color: #F97316 !important;
}

.markdown-body details[open] > summary::before {
    transform: rotate(90deg) !important;
}

.markdown-body details > summary:hover {
    background: #FFE4D6 !important;
}

/* --- 折叠内容区 --- */
.markdown-body details > *:not(summary) {
    position: relative !important;
    z-index: 1 !important;
}

/* --- 折叠块内代码块无缝贴合 --- */
.markdown-body details > pre {
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.markdown-body details > pre > div {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.markdown-body details > pre > div > div.flex.justify-between.h-8 {
    border-radius: 0 !important;
}

.markdown-body details > pre > div::before {
    display: none !important;
}

.markdown-body details > pre > code[node] {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* --- 内心独白 · 模糊浅橘 --- */
.markdown-body em:not(strong em) {
    color: #F97316 !important;
    font-style: italic !important;
    text-shadow: 0 0 6px rgba(249, 115, 22, 0.3) !important;
}