/* 移除顶部彩色条（如果存在） */
[class*="bg-[#F1CBCB]"],
[class*="bg-[#c9e1e9]"] {
  display: none !important;
}
淡金阳光麦田感背景 */
.bg-gray-100\/90.relative.inline-block {
  background: linear-gradient(135deg, #fdf9f2 0%, #fff8e8 50%, #fef5d9 100%) !important;
  border: 1px solid #f0e0b8 !important;
  border-radius: 14px !important;
  box-shadow: 0 6px 18px rgba(210, 170, 90, 0.18), inset 0 1px 2px rgba(255, 248, 220, 0.7) !important;
  overflow: hidden !important;
  isolation: isolate !important;
  position: relative !important;
}

/* 背景装饰：微弱太阳光晕 + 麦穗暗示感渐变（使用伪元素） */
.bg-gray-100\/90.relative.inline-block::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background: radial-gradient(circle at 20% 15%, rgba(255, 240, 180, 0.45) 0%, transparent 45%) !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

.bg-gray-100\/90.relative.inline-block::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(to bottom, transparent 60%, rgba(255, 245, 210, 0.25) 100%) !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

/* 输出文本区 - 高可读性暖白底 + 深暖灰字 */
.chat-answer-container .bg-gray-100\/90.relative.inline-block .markdown-body,
.bg-gray-100\/90.relative.inline-block .markdown-body {
  background: transparent !important;
  color: #3c2f1e !important;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif !important;
  font-weight: 480 !important;
  line-height: 1.65 !important;
  z-index: 1 !important;
  position: relative !important;
}

/* 代码块整体 - 浅麦金底 + 淡金边框 */
.markdown-body pre {
  background: #fdfaf2 !important;
  border: 1px solid #f0d9a8 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  box-shadow: 0 3px 10px rgba(220, 180, 100, 0.14) !important;
  margin: 1.2em 0 !important;
}

/* 代码块头部栏 - 淡阳光金 */
.markdown-body pre > div > div.flex.justify-between.h-8,
.markdown-body pre > div > div.border-b {
  background: linear-gradient(to right, #fff8e1, #fef0c8) !important;
  border-bottom: 1px solid #f0d9a8 !important;
}

/* 语言标签 */
.markdown-body pre > div > div.flex.justify-between > div.text-\[13px\] {
  color: #8b6f3f !important;
  font-weight: 600 !important;
}

/* 复制按钮适配阳光主题 */
.markdown-body pre div[data-tooltip-id^="copy-tooltip"],
.markdown-body pre .box-border.cursor-pointer.bg-white {
  background: #fff8e8 !important;
  border: 1px solid #f0d9a8 !important;
  border-radius: 6px !important;
}

.markdown-body pre div[data-tooltip-id^="copy-tooltip"]:hover,
.markdown-body pre .box-border.cursor-pointer.bg-white:hover {
  background-color: #ffe9b5 !important;
}

/* 输入框（如果平台有独立输入框选择器） */
#ai-chat-input {
  background: #fffef7 !important;
  border: 1px solid #f0e0b0 !important;
  border-radius: 10px !important;
  color: #3c2f1e !important;
}

#ai-chat-input::placeholder {
  color: #b89e6e !important;
}

/* 底部按钮、模型名、token等附属文字适配 */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary,
.MuiTypography-root.MuiTypography-body2.css-6c0gf2,
.text-orange-500 {
  color: #6b521f !important;
}

/* 加载动画点改为淡金色（隐藏原点，简单伪元素替代） */
.style_dot-flashing__8L91Q.style_text__zGhNq {
  display: none !important;
}

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

.flex.items-center.justify-center.w-6.h-5::before,
.flex.items-center.justify-center.w-6.h-5::after {
  content: "" !important;
  position: absolute !important;
  width: 5px !important;
  height: 5px !important;
  background: #f0c040 !important;
  border-radius: 50% !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  animation: pulse 1.8s infinite ease-in-out !important;
}

.flex.items-center.justify-center.w-6.h-5::after {
  animation-delay: 0.9s !important;
}

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
  50%      { transform: translate(-50%, -50%) scale(1.6); opacity: 1; }
}

/* ===================================================== */
/* 麦田守望者 - 华丽主题 UI（进度条及相关组件）           */
/* ===================================================== */

/* 整体状态栏容器，营造温馨与危险并存的氛围 */
.status-bar-container {
    display: block;
    background: linear-gradient(135deg, #fffaf0 0%, #f5f5dc 30%, #f8f4e6 100%);
    border: 1px solid #e6d3a7;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 
        inset 0 2px 4px rgba(255, 215, 0, 0.1),
        0 5px 15px rgba(139, 69, 19, 0.08);
    position: relative;
    overflow: hidden;
}
.status-bar-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: 
        repeating-linear-gradient(90deg, 
            transparent 0px, 
            transparent 2px, 
            rgba(245, 222, 179, 0.03) 2px, 
            rgba(245, 222, 179, 0.03) 4px),
        repeating-linear-gradient(0deg, 
            transparent 0px, 
            transparent 2px, 
            rgba(218, 165, 32, 0.02) 2px, 
            rgba(218, 165, 32, 0.02) 4px);
    z-index: 0;
    opacity: 0.6;
    pointer-events: none;
}

/* 章节标题样式（同时作用于 h4） */
.status-bar-container h4,
.status-bar-container .section-title {
    display: block;
    font-family: 'Georgia', 'Songti SC', serif;
    color: #8b4513; /* saddlebrown */
    font-size: 1.1em;
    font-weight: bold;
    margin: 15px 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px dashed #d2b48c; /* tan */
    letter-spacing: 1px;
}

/* 通用进度条容器（适配原有结构，不依赖额外类） */
.status-bar-container > div {
    display: flex;
    align-items: center;
    margin: 12px 0;
    position: relative;
    z-index: 1;
}
/* 进度条标签（原有结构中的文字部分） */
.status-bar-container > div > :first-child {
    min-width: 120px;
    font-weight: bold;
    color: #5d4037; /* 深棕 */
    font-size: 0.95em;
    text-shadow: 0 1px 1px rgba(255,255,255,0.8);
}

/* 进度条轨道 */
[class$="-bar"] {
    flex-grow: 1;
    height: 24px;
    background-color: #f5e6d3;
    border-radius: 12px;
    border: 1px solid #d7b899;
    overflow: hidden;
    box-shadow: 
        inset 0 2px 4px rgba(0,0,0,0.08),
        0 1px 2px rgba(255,255,255,0.7) inset;
    position: relative;
}

/* 进度条填充部分的统一纹理（模拟麦粒/织物） */
[class$="-fill"] {
    display: block;
    height: 100%;
    border-radius: 12px;
    transition: width 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.7s ease;
    position: relative;
    overflow: hidden;
}
[class$="-fill"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(90deg, 
        transparent 10%, 
        rgba(255, 255, 255, 0.2) 10%, 
        rgba(255, 255, 255, 0.2) 20%, 
        transparent 20%, 
        transparent 30%, 
        rgba(255, 255, 255, 0.15) 30%, 
        rgba(255, 255, 255, 0.15) 40%, 
        transparent 40%);
    background-size: 30px 100%;
    opacity: 0.6;
    mix-blend-mode: overlay;
}

/* 数值显示 */
[class$="-text"] {
    min-width: 55px;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1em;
    margin-left: 12px;
    padding: 3px 8px;
    background: rgba(255, 253, 248, 0.9);
    border-radius: 6px;
    border: 1px solid #e9d4b3;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* === 个性化进度条 === */
/* 麻木程度 - 冰冷的灰，像冬日的冻土 */
.numbness-fill {
    background: linear-gradient(90deg, #d1d1d1, #a8a8a8, #8c8c8c);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}
.numbness-text { color: #707070; }

/* 救赎程度 - 璀璨的金，像成熟的麦浪 */
.salvation-fill {
    background: linear-gradient(90deg, #ffec8b, #ffd700, #ffc125);
    box-shadow: 
        inset 0 1px 3px rgba(255, 215, 0, 0.4),
        0 0 8px rgba(255, 215, 0, 0.3);
}
.salvation-text { 
    color: #b8860b;
    background: linear-gradient(to bottom, #fff8dc, #ffe4b5);
    border-color: #d2b48c;
}

/* 好感度 - 温暖的粉橙，像晚霞 */
.affection-fill {
    background: linear-gradient(90deg, #ffcccb, #ffb6c1, #ff69b4);
    box-shadow: inset 0 1px 3px rgba(255, 182, 193, 0.4);
}
.affection-text { 
    color: #c71585;
    background: linear-gradient(to bottom, #fff0f5, #ffe4e1);
    border-color: #f8c8d0;
}

/* 自残进度 - 危险的渐变，从麦秆黄到荆棘红 */
.selfharm-bar {
    border-color: #cc7a6f;
    background-color: #fff5e6;
}
.selfharm-fill {
    background: linear-gradient(90deg, #f0c674, #e6a15c, #d9825c, #c45c4a, #a52a2a);
    box-shadow: 
        inset 0 -2px 4px rgba(165, 42, 42, 0.3),
        inset 0 2px 2px rgba(255, 255, 255, 0.2);
}
/* 动态颜色预警与脉搏效果 */
.selfharm-fill[style*="width: 0%"] { background: #f0c674; }
.selfharm-fill[style*="width: 2"] { background: linear-gradient(90deg, #f0c674, #e6a15c); }
.selfharm-fill[style*="width: 4"] { background: #e6a15c; }
.selfharm-fill[style*="width: 5"] { 
    background: linear-gradient(90deg, #e6a15c, #d9825c);
    animation: pulse-low 2s infinite alternate;
}
@keyframes pulse-low {
    from { box-shadow: inset 0 -2px 4px rgba(217, 130, 92, 0.3), 0 0 5px rgba(217, 130, 92, 0.3); }
    to { box-shadow: inset 0 -2px 4px rgba(217, 130, 92, 0.5), 0 0 8px rgba(217, 130, 92, 0.5); }
}
.selfharm-fill[style*="width: 7"] { background: #d9825c; }
.selfharm-fill[style*="width: 8"] { 
    background: linear-gradient(90deg, #d9825c, #c45c4a);
    animation: pulse-medium 1.5s infinite alternate;
}
@keyframes pulse-medium {
    from { box-shadow: inset 0 -2px 4px rgba(196, 92, 74, 0.4), 0 0 8px rgba(196, 92, 74, 0.4); }
    to { box-shadow: inset 0 -2px 4px rgba(196, 92, 74, 0.6), 0 0 12px rgba(196, 92, 74, 0.6); }
}
.selfharm-fill[style*="width: 9"] { background: #c45c4a; }
.selfharm-fill[style*="width: 10"] { 
    background: linear-gradient(90deg, #c45c4a, #a52a2a);
    animation: pulse-high 1s infinite alternate;
}
@keyframes pulse-high {
    from { 
        box-shadow: inset 0 -2px 4px rgba(165, 42, 42, 0.5), 0 0 10px rgba(165, 42, 42, 0.5);
        filter: brightness(1);
    }
    to { 
        box-shadow: inset 0 -2px 4px rgba(165, 42, 42, 0.8), 0 0 15px rgba(165, 42, 42, 0.7);
        filter: brightness(1.1);
    }
}
.selfharm-fill[style*="width: 100%"] { 
    background: linear-gradient(90deg, #8b0000, #660000, #4a0000);
    animation: pulse-critical 0.8s infinite alternate;
}
@keyframes pulse-critical {
    from { 
        box-shadow: inset 0 -3px 6px rgba(139, 0, 0, 0.7), 0 0 20px rgba(139, 0, 0, 0.6);
        filter: brightness(1.1) hue-rotate(-5deg);
    }
    to { 
        box-shadow: inset 0 -3px 6px rgba(139, 0, 0, 0.9), 0 0 25px rgba(139, 0, 0, 0.8);
        filter: brightness(1.3) hue-rotate(5deg);
    }
}
.selfharm-text { 
    color: #8b0000;
    font-weight: bold;
    background: linear-gradient(to bottom, #ffe6e6, #ffcccc);
    border-color: #cc7a6f;
    animation: text-flicker 3s infinite;
}
@keyframes text-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

/* === 状态标记 - 仿标签样式 === */
.status-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}
.status-tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border-width: 2px;
    border-style: solid;
    position: relative;
    overflow: hidden;
}
.status-tag::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 5px 5px;
    opacity: 0.3;
    z-index: 0;
}
.status-tag > span {
    position: relative;
    z-index: 1;
}
.status-tag[data-status="未治愈"] { 
    background: linear-gradient(135deg, #f8d7da, #f1b0b7);
    color: #721c24;
    border-color: #f5c6cb;
    box-shadow: 0 2px 4px rgba(241, 176, 183, 0.3);
}
.status-tag[data-status="治疗中"] { 
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    border-color: #ffeaa7;
    box-shadow: 0 2px 4px rgba(255, 234, 167, 0.4);
}
.status-tag[data-status="已治愈"] { 
    background: linear-gradient(135deg, #d4edda, #b8e0c2);
    color: #155724;
    border-color: #c3e6cb;
    box-shadow: 0 2px 6px rgba(184, 224, 194, 0.4);
    animation: gentle-glow 3s infinite alternate;
}
@keyframes gentle-glow {
    from { box-shadow: 0 2px 6px rgba(184, 224, 194, 0.4); }
    to { box-shadow: 0 2px 10px rgba(184, 224, 194, 0.7), 0 0 15px rgba(184, 224, 194, 0.3); }
}

/* === 记忆区与回溯区 === */
.memory-area, .update-log {
    background: rgba(255, 253, 245, 0.9);
    border: 1px solid #e9dcc6;
    border-radius: 8px;
    padding: 12px;
    margin-top: 15px;
    font-size: 0.9em;
    color: #5a4a42;
    position: relative;
    z-index: 1;
}
.memory-area {
    max-height: 180px;
    overflow-y: auto;
    background-image: 
        linear-gradient(to bottom, transparent 95%, rgba(139, 115, 85, 0.05) 100%),
        repeating-linear-gradient(0deg, 
            transparent, 
            transparent 24px, 
            rgba(139, 115, 85, 0.03) 24px, 
            rgba(139, 115, 85, 0.03) 25px);
}
.update-log {
    border-left: 5px solid #4682b4;
    background: linear-gradient(to right, #f0f8ff, #e6f2ff);
    color: #2c4a64;
}
.update-log::before {
    content: '📊 ';
    font-size: 1.1em;
    margin-right: 5px;
}