/* 
 * ============================================================
 * 作品名称：《🚌 【末日公交】：最后的移动安全屋 - 丧尸末世生存性交配 🚌》
 * 主题风格：废土血腥 (Wasteland Blood)
 * 设计理念：粗粝、高压、绝望中燃烧的欲望
 * ============================================================
 */

/* [1] 强制移除顶部颜色条 - 保持界面纯净 */
[class*="bg-[#F1CBCB]"], 
[class*="bg-[#c9e1e9]"] {
    display: none !important;
}

/* [2] 统一聊天框基础样式 - 废土沉浸式深色背景 */
.bg-gray-100\/90.relative.inline-block {
    background: #0a0a0a !important;          /* 纯黑底色，象征末日黑暗 */
    border: 1px solid #8b0000 !important;    /* 血腥红边框 */
    border-radius: 12px !important;
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.3), inset 0 0 8px rgba(184, 115, 51, 0.1) !important;
    padding: 16px !important;
    isolation: isolate !important;
    transition: all 0.3s ease !important;
}

/* [3] 动态背景特效 - 锈蚀与血迹的呼吸感 */
.bg-gray-100\/90.relative.inline-block::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: 12px;
    background: radial-gradient(circle at top left, rgba(139, 0, 0, 0.15), transparent 60%),
                repeating-linear-gradient(45deg, rgba(184, 115, 51, 0.05) 0px, rgba(184, 115, 51, 0.05) 2px, transparent 2px, transparent 8px);
    opacity: 0.8;
    pointer-events: none;
}

/* [4] Markdown 文本内容 - 绝对可读，废土灰白 */
.markdown-body {
    color: #d4d4d4 !important;               /* 略带灰白的文字，不刺眼 */
    font-family: 'Courier New', 'Fira Code', 'PingFang SC', monospace !important;
    line-height: 1.65 !important;
    font-size: 15px !important;
    z-index: 1 !important;
    background: transparent !important;
    text-rendering: optimizeLegibility !important;
}

/* 强调文字 - 鲜血红/锈橙色 */
.markdown-body strong {
    color: #b87333 !important;               /* 锈铁色 */
    font-weight: 800 !important;
    text-shadow: 0 0 4px rgba(139, 0, 0, 0.5) !important;
}
.markdown-body em {
    color: #8b0000 !important;
    font-style: italic;
}

/* [5] details 折叠块美化 - 废土档案风格 */
.markdown-body details {
    background: rgba(0, 0, 0, 0.6) !important;
    border: 1px solid #8b0000 !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    margin: 16px 0 !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.markdown-body details[open] {
    background: rgba(0, 0, 0, 0.8) !important;
    box-shadow: 0 0 12px rgba(139, 0, 0, 0.4) !important;
    transform: scale(1.01);
}

.markdown-body summary {
    color: #b87333 !important;
    font-weight: bold !important;
    cursor: pointer !important;
    outline: none !important;
    list-style: none !important;
    display: flex !important;
    align-items: center !important;
    user-select: none !important;
    font-family: monospace;
}

/* 自定义折叠箭头 - 血迹/弹孔符号 */
.markdown-body summary::before {
    content: "💀";
    margin-right: 10px;
    font-size: 1.1em;
    transition: transform 0.3s ease !important;
}

.markdown-body details[open] summary::before {
    transform: rotate(90deg) scale(1.1) !important;
    content: "🩸";
}

/* [6] 底部附加元素 - 高对比度，废土风格 */
/* 按钮美化 */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary {
    color: #cccccc !important;
    background: rgba(184, 115, 51, 0.2) !important;
    border-radius: 6px !important;
    text-transform: none !important;
    font-size: 0.75rem !important;
    margin: 0 4px !important;
    border: 1px solid #8b0000 !important;
}

.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
    background: rgba(139, 0, 0, 0.4) !important;
    color: #ff8c69 !important;
}

/* 模型名称与Token消耗 - 低调显示 */
.MuiTypography-root.MuiTypography-body2.css-6c0gf2,
.text-orange-500 {
    color: #7a5a4a !important;
    font-family: 'Monaco', monospace !important;
    letter-spacing: 0.5px !important;
    opacity: 0.6 !important;
}

/* [7] 自定义加载动画 - 心跳/丧尸脉搏 */
.style_dot-flashing__8L91Q.style_text__zGhNq {
    display: none !important;
}

.flex.items-center.justify-center.w-6.h-5 {
    position: relative !important;
    background: transparent !important;
}

.flex.items-center.justify-center.w-6.h-5::before {
    content: "";
    width: 22px;
    height: 22px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%238b0000" d="M12,2L15,8H21L16,12L19,18L12,15L5,18L8,12L3,8H9L12,2Z"><animate attributeName="opacity" values="0.3;1;0.3" dur="1.2s" repeatCount="indefinite" /><animateTransform attributeName="transform" type="scale" values="0.8;1.2;0.8" dur="1.2s" repeatCount="indefinite" /></path></svg>') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
}

/* [8] 废土特有的面板样式 - 模拟金属锈蚀边框 */
.markdown-body hr {
    border-top: 1px solid #8b0000;
    box-shadow: 0 0 3px #b87333;
}

/* 引用块 - 仿佛写在沾血纸上的文字 */
.markdown-body blockquote {
    border-left: 4px solid #b87333;
    background: rgba(0, 0, 0, 0.4);
    padding: 10px 16px;
    color: #e0c8a0;
    font-style: italic;
}

/* 代码块 - 类似末日终端 */
.markdown-body pre, .markdown-body code {
    background: #0f0f0f !important;
    color: #8b0000 !important;
    border: 1px solid #3a2a1a;
    font-family: monospace;
}

/* [9] 资源条样式（如果聊天中出现了进度条类元素） */
.progress-bar-bg {
    background: #2a1a0a;
    border-radius: 4px;
    overflow: hidden;
}
.progress-bar-fill {
    background: linear-gradient(90deg, #8b0000, #b87333);
    transition: width 0.3s;
}

/* [10] 噪音值警示动画 */
@keyframes pulseWarning {
    0% { text-shadow: 0 0 0px #8b0000; }
    100% { text-shadow: 0 0 6px #ff0000; }
}
.noise-warning {
    animation: pulseWarning 0.8s infinite alternate;
    color: #ff5555;
    font-weight: bold;
}

/* [11] 移动端适配优化 */
@media (max-width: 480px) {
    .bg-gray-100\/90.relative.inline-block {
        padding: 12px !important;
        margin: 6px !important;
    }
    .markdown-body {
        font-size: 14px !important;
        line-height: 1.55 !important;
    }
    .markdown-body details {
        padding: 8px 12px !important;
    }
}