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

/* =========================================
   聊天框整体美化：潮湿的旧琥珀 & 颓废精致
   ========================================= */
.bg-gray-100\/90.relative.inline-block {
    /* 颓废深色背景：深咖至极暗灰的渐变 */
    background: linear-gradient(135deg, rgba(26, 21, 18, 0.95) 0%, rgba(17, 14, 12, 0.98) 100%) !important;
    backdrop-filter: blur(8px) !important;
    
    /* 衰败的边框与琥珀色高亮侧边 */
    border: 1px solid #3d3228 !important;
    border-left: 3px solid #a6702e !important;
    border-radius: 6px !important;
    
    /* 湿润的阴影质感 */
    box-shadow: 
        inset 0 0 30px rgba(0, 0, 0, 0.8), 
        0 8px 20px rgba(0, 0, 0, 0.6) !important;
        
    padding: 15px !important;
    margin-bottom: 15px !important;
    position: relative !important;
    isolation: isolate !important; /* 建立层叠上下文 */
}

/* 模拟羊皮纸/丝绸的微弱纹理叠加 */
.bg-gray-100\/90.relative.inline-block::after {
    content: "" !important;
    position: absolute !important;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px) !important;
    background-size: 4px 4px !important;
    pointer-events: none !important;
    border-radius: inherit !important;
    z-index: -1 !important;
}

/* =========================================
   绝对可读性规则：主文本与字体
   ========================================= */
.markdown-body {
    /* 骨白色高对比文字，确保在深背景下清晰易读 */
    color: #d4c8b8 !important; 
    font-family: "PingFang SC", "Microsoft YaHei", "Palatino Linotype", serif !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
    background: transparent !important;
    /* 严禁使用模糊文本的text-shadow */
    text-shadow: none !important; 
    z-index: 1 !important;
}

.markdown-body strong, 
.markdown-body b {
    color: #a6702e !important; /* 琥珀色强调 */
    font-weight: bold !important;
}

/* =========================================
   底部附加元素 (按钮、Token、模型名)
   ========================================= */
/* 统一设置为浅灰暗金色调，融入整体氛围 */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary,
.MuiTypography-root.MuiTypography-body2.css-6c0gf2,
.text-orange-500 {
    color: #8c8276 !important;
    transition: color 0.3s ease, text-shadow 0.3s ease !important;
}

.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
    color: #a6702e !important;
    text-shadow: 0 0 8px rgba(212, 152, 69, 0.4) !important;
    background: transparent !important;
}

/* =========================================
   巨大的SVG加载动画："上海在下雨"
   ========================================= */
/* 隐藏默认的加载点 */
.style_dot-flashing__8L91Q.style_text__zGhNq {
    display: none !important;
}

/* 放大加载容器，使其成为一个巨大的画框 */
.flex.items-center.justify-center.w-6.h-5 {
    position: relative !important;
    width: 100% !important; 
    height: 160px !important; /* 巨大的高度 */
    background: transparent !important;
    margin: 15px 0 !important;
    overflow: hidden !important;
    border-radius: 4px !important;
    border: 1px solid #3d3228 !important;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8) !important;
}

/* 注入SMIL内联SVG动画 */
.flex.items-center.justify-center.w-6.h-5::before {
    content: "" !important;
    position: absolute !important;
    top: 0; left: 0; right: 0; bottom: 0;
    /* 
       SVG内容：暗沉渐变背景 + 东方明珠/城市剪影 + 动态雨滴 + 呼吸文字
       使用 %23 替代 # 保证 Data URI 兼容性
    */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 150" width="100%" height="100%"><defs><linearGradient id="bg" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="%23110e0c"/><stop offset="100%" stop-color="%231a1512"/></linearGradient><path id="drop" d="M0 0 L-3 15" stroke="rgba(212,152,69,0.5)" stroke-width="1.5"/></defs><rect width="100%" height="100%" fill="url(%23bg)"/><path d="M0 150 L0 100 L20 100 L20 150 M30 150 L30 80 L50 80 L50 150 M60 150 L60 110 L90 110 L90 150 M100 150 L100 60 L110 40 L120 60 L120 150 M140 150 L140 90 L170 90 L170 150 M190 150 L190 50 L195 30 L200 50 L200 150 M220 150 L220 100 L260 100 L260 150 M280 150 L280 120 L300 120 L300 150" fill="%230a0807" opacity="0.9"/><g transform="translate(150, 150) scale(0.6)"><line x1="0" y1="0" x2="0" y2="-180" stroke="%230a0807" stroke-width="5"/><circle cx="0" cy="-120" r="15" fill="%230a0807"/><circle cx="0" cy="-60" r="25" fill="%230a0807"/><circle cx="0" cy="-180" r="5" fill="%230a0807"/></g><use href="%23drop"><animateTransform attributeName="transform" type="translate" from="50 -20" to="10 170" dur="0.4s" repeatCount="indefinite"/></use><use href="%23drop"><animateTransform attributeName="transform" type="translate" from="120 -20" to="80 170" dur="0.5s" repeatCount="indefinite"/></use><use href="%23drop"><animateTransform attributeName="transform" type="translate" from="200 -20" to="160 170" dur="0.3s" repeatCount="indefinite"/></use><use href="%23drop"><animateTransform attributeName="transform" type="translate" from="280 -20" to="240 170" dur="0.6s" repeatCount="indefinite"/></use><use href="%23drop"><animateTransform attributeName="transform" type="translate" from="80 -20" to="40 170" dur="0.45s" repeatCount="indefinite"/></use><use href="%23drop"><animateTransform attributeName="transform" type="translate" from="240 -20" to="200 170" dur="0.55s" repeatCount="indefinite"/></use><use href="%23drop"><animateTransform attributeName="transform" type="translate" from="160 -20" to="120 170" dur="0.35s" repeatCount="indefinite"/></use><text x="150" y="70" fill="%23a6702e" font-family="serif" font-size="14" text-anchor="middle" letter-spacing="3"><animate attributeName="opacity" values="0.3;1;0.3" dur="2.5s" repeatCount="indefinite"/>雨 季 漫 长 . . .</text></svg>') !important;
    background-size: cover !important;
    background-position: center bottom !important;
    background-repeat: no-repeat !important;
    opacity: 0.8 !important;
}

/* 移动端适配：缩小加载框高度 */
@media(max-width: 480px) {
    .flex.items-center.justify-center.w-6.h-5 {
        height: 120px !important;
    }
}

/* =========================================
   潮湿的旧琥珀 - 颓废精致状态栏美化
   ========================================= */
c-ui {
    display: block;
    /* 深咖色至幽暗灰的渐变背景，营造颓废感 */
    background: linear-gradient(135deg, #1f1815 0%, #120d0b 100%);
    color: #d4c8b8; /* 骨白色高对比文字 */
    font-family: "Kaiti SC", "STKaiti", "PingFang SC", serif;
    padding: 18px;
    border-radius: 8px;
    /* 潮湿琥珀的内阴影与衰败金边 */
    box-shadow: inset 0 0 40px rgba(0,0,0,0.9), 0 8px 20px rgba(0,0,0,0.6);
    border: 1px solid #3d2b1f;
    position: relative;
    overflow: hidden;
    line-height: 1.6;
}

/* 羊皮纸与丝绸暗纹叠加层 */
c-ui::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(166, 112, 46, 0.12), transparent 70%),
        repeating-linear-gradient(45deg, rgba(255,255,255,0.01) 0px, rgba(255,255,255,0.01) 1px, transparent 1px, transparent 4px);
    pointer-events: none;
    z-index: 0;
}

/* 隐藏的系统协议栏 */
c-ui .sys {
    opacity: 0.3;
    margin-bottom: 10px;
    transition: opacity 0.3s;
}
c-ui .sys:hover { opacity: 1; }
c-ui .sys summary { font-size: 12px; background: #0a0807; color: #666; border: none; }

/* 顶部时间与地点 */
c-ui hd {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(166, 112, 46, 0.3);
    padding-bottom: 12px;
    margin-bottom: 18px;
    font-weight: bold;
    color: #c49a5b; /* 暗金色 */
    font-size: 15px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* 独立板块容器 */
c-ui details {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(166, 112, 46, 0.15);
    margin-bottom: 12px;
    border-radius: 4px;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(2px);
}

/* 栏目头部 (丝绸光泽与琥珀渐变) */
c-ui summary {
    background: linear-gradient(90deg, rgba(42, 31, 26, 0.9), rgba(26, 19, 17, 0.9));
    padding: 12px 16px;
    cursor: pointer;
    color: #c49a5b;
    font-weight: bold;
    font-size: 15px;
    list-style: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}
c-ui summary::-webkit-details-marker { display: none; }
c-ui details[open] > summary {
    border-bottom: 1px solid rgba(166, 112, 46, 0.3);
    box-shadow: 0 4px 10px rgba(0,0,0,0.6);
    color: #d4a86a;
}

/* 内部数据行排版 */
c-ui p { margin: 0; padding: 5px 0; }
c-ui d {
    display: flex;
    padding: 8px 16px;
    border-bottom: 1px dashed rgba(166, 112, 46, 0.15);
    font-size: 14px;
    align-items: baseline;
    transition: background 0.3s;
}
c-ui d:hover { background: rgba(255, 255, 255, 0.02); }
c-ui d:last-child { border-bottom: none; }

/* 标签与内容对比色 */
c-ui f {
    flex-shrink: 0;
    width: 75px;
    color: #9a7245; /* 衰败的暗金 */
    margin-right: 12px;
    font-weight: bold;
}
c-ui d span {
    color: #e8e0d5; /* 亮灰骨白，确保阅读清晰 */
    flex: 1;
}

/* 沉浸式正文区域 */
c-ui txt {
    display: block;
    padding: 16px 20px;
    font-size: 15px;
    color: #d4c8b8;
    background: linear-gradient(90deg, rgba(166, 112, 46, 0.05), transparent);
    border-left: 3px solid #a6702e;
    margin: 18px 0;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.9);
}

/* 温存度进度条设计 */
c-ui lv {
    display: block;
    padding: 16px;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(166, 112, 46, 0.2);
}
c-ui .lv-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-bottom: 8px;
}
c-ui .lv-info b { color: #c49a5b; }
c-ui .lv-info span { color: #e8e0d5; font-weight: bold; }
c-ui .lv-info i { color: #8c7a6b; font-size: 12px; font-style: normal; }

c-ui bar {
    display: block;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.8);
}
c-ui bar::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    width: var(--v);
    /* 琥珀色液体流动的质感 */
    background: linear-gradient(90deg, #5c3a21, #c49a5b);
    box-shadow: 0 0 10px rgba(196, 154, 91, 0.6);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 金霖的笔记 (手写体质感与信笺纹理) */
c-ui q {
    display: block;
    padding: 16px;
    color: #bca890;
    font-size: 14.5px;
    background: repeating-linear-gradient(transparent 0, transparent 27px, rgba(166, 112, 46, 0.1) 28px);
    line-height: 28px;
    font-style: italic;
}
c-ui q b { color: #c49a5b; font-style: normal; margin-right: 5px; }

/* 记忆与系统提示语 */
c-ui mr {
    display: block;
    padding: 12px 16px;
    font-size: 12.5px;
    color: #8c7a6b;
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(166, 112, 46, 0.1);
}

/* 命运分歧选项 */
c-ui .o p {
    padding: 10px 16px;
    margin: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(166, 112, 46, 0.2);
    border-radius: 4px;
    color: #d4c8b8;
    transition: all 0.3s;
    cursor: pointer;
}
c-ui .o p:hover {
    background: rgba(166, 112, 46, 0.1);
    border-color: #c49a5b;
    transform: translateX(5px);
    color: #e8e0d5;
}

/* 移动端细微调整 */
@media (max-width: 480px) {
    c-ui { padding: 12px; }
    c-ui f { width: 65px; margin-right: 8px; }
    c-ui txt { padding: 12px; font-size: 14px; }
    c-ui d { padding: 8px 12px; }
}