/* ==================== 聊天框主体美化 ==================== */

/* 统一聊天框：浅绿色温馨基调 */
.bg-gray-100\/90.relative.inline-block {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 50%, #a5d6a7 100%) !important;
    border: 2px solid #81c784 !important;
    border-radius: 18px !important;
    box-shadow: 0 6px 20px rgba(129, 199, 132, 0.25), 0 2px 8px rgba(76, 175, 80, 0.15) !important;
    padding: 16px !important;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.bg-gray-100\/90.relative.inline-block:hover {
    box-shadow: 0 8px 28px rgba(129, 199, 132, 0.35), 0 4px 12px rgba(76, 175, 80, 0.2) !important;
    transform: translateY(-2px) !important;
}

/* ==================== 文本内容美化 ==================== */

/* 主文本区域：深色文字确保可读性 */
.markdown-body {
    color: #1b5e20 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", sans-serif !important;
    line-height: 1.75 !important;
    font-size: 15px !important;
}

/* 标题样式 */
.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
    color: #2e7d32 !important;
    font-weight: 600 !important;
    margin-top: 1.2em !important;
    margin-bottom: 0.6em !important;
}

/* 链接样式 */
.markdown-body a {
    color: #388e3c !important;
    text-decoration: underline !important;
    text-decoration-color: rgba(56, 142, 60, 0.4) !important;
    transition: all 0.2s ease !important;
}

.markdown-body a:hover {
    color: #2e7d32 !important;
    text-decoration-color: rgba(46, 125, 50, 0.8) !important;
}

/* 代码块背景 */
.markdown-body pre,
.markdown-body code {
    background: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid #a5d6a7 !important;
    border-radius: 6px !important;
}

/* ==================== 状态栏元素美化 ==================== */

/* details 容器：更浅的绿色背景 */
.markdown-body details {
    background: linear-gradient(145deg, #f1f8e9 0%, #dcedc8 100%) !important;
    border: 1.5px solid #aed581 !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    margin: 12px 0 !important;
    box-shadow: 0 3px 10px rgba(174, 213, 129, 0.2) !important;
    transition: all 0.3s ease !important;
}

.markdown-body details:hover {
    box-shadow: 0 5px 16px rgba(174, 213, 129, 0.3) !important;
    border-color: #9ccc65 !important;
}

.markdown-body details[open] {
    background: linear-gradient(145deg, #f9fbe7 0%, #e8f5e9 100%) !important;
    border-color: #81c784 !important;
}

/* summary 标题：深绿色文字 */
.markdown-body summary {
    color: #2e7d32 !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    cursor: pointer !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    transition: all 0.25s ease !important;
    background: rgba(255, 255, 255, 0.4) !important;
    user-select: none !important;
}

.markdown-body summary:hover {
    background: rgba(255, 255, 255, 0.7) !important;
    color: #1b5e20 !important;
    transform: translateX(4px) !important;
}

/* summary 箭头指示器 */
.markdown-body summary::marker {
    color: #66bb6a !important;
    font-size: 1.1em !important;
}

/* 表格样式 */
.markdown-body table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 1.5px solid #a5d6a7 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(129, 199, 132, 0.15) !important;
}

.markdown-body th {
    background: linear-gradient(to bottom, #c8e6c9, #a5d6a7) !important;
    color: #1b5e20 !important;
    font-weight: 600 !important;
    padding: 10px 14px !important;
}

.markdown-body td {
    color: #2e7d32 !important;
    padding: 8px 14px !important;
    border-bottom: 1px solid #c8e6c9 !important;
}

.markdown-body tr:hover {
    background: rgba(200, 230, 201, 0.3) !important;
}

/* 列表项 */
.markdown-body li {
    color: #2e7d32 !important;
    margin: 6px 0 !important;
}

.markdown-body li::marker {
    color: #66bb6a !important;
}

/* 引用块 */
.markdown-body blockquote {
    border-left: 4px solid #81c784 !important;
    background: rgba(255, 255, 255, 0.5) !important;
    padding: 12px 18px !important;
    border-radius: 0 8px 8px 0 !important;
    color: #1b5e20 !important;
}

/* ==================== 底部附加元素美化 ==================== */

/* 底部操作按钮 */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary {
    color: #388e3c !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    border-radius: 8px !important;
}

.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
    background: rgba(129, 199, 132, 0.15) !important;
    color: #2e7d32 !important;
}

/* 模型名称文本 */
.MuiTypography-root.MuiTypography-body2.css-6c0gf2 {
    color: #43a047 !important;
    font-weight: 500 !important;
    font-size: 13px !important;
}

/* Token消耗文本 */
.text-orange-500 {
    color: #66bb6a !important;
    font-weight: 500 !important;
}

/* ==================== 顶部装饰条移除 ==================== */

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

/* ==================== 输出加载动画美化 ==================== */

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

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

/* 自定义加载动画 - 跳动的小叶子 */
.flex.items-center.justify-center.w-6.h-5::before {
    content: '' !important;
    width: 32px !important;
    height: 32px !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%2366bb6a"><path d="M17,8C8,10 5.9,16.17 3.82,21.34L5.71,22L6.66,19.7C7.14,19.87 7.64,20 8,20C19,20 22,3 22,3C21,5 14,5.25 9,6.25C4,7.25 2,11.5 2,13.5C2,15.5 3.75,17.25 3.75,17.25C7,8 17,8 17,8Z"/></svg>') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    display: block !important;
    animation: leafBounce 1.2s ease-in-out infinite !important;
}

@keyframes leafBounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg) !important;
        opacity: 0.8 !important;
    }
    50% {
        transform: translateY(-12px) rotate(10deg) !important;
        opacity: 1 !important;
    }
}

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

/* 低动效模式 */
@media (prefers-reduced-motion: reduce) {
    @keyframes leafBounce {
        0%, 100% {
            transform: translateY(0) rotate(0deg) !important;
            opacity: 0.8 !important;
        }
        50% {
            transform: translateY(-6px) rotate(5deg) !important;
            opacity: 1 !important;
        }
    }
    
    .bg-gray-100\/90.relative.inline-block,
    .markdown-body details,
    .markdown-body summary,
    .MuiButtonBase-root.MuiButton-root {
        transition: none !important;
    }
}