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

/* 2. 统一聊天框底板 (波普艺术/剪报风) */
.bg-gray-100\/90.relative.inline-block {
    /* 暖色背景 + 俏皮的波普波点图案 */
    background-color: #fdf6e3 !important;
    background-image: radial-gradient(rgba(255, 64, 129, 0.15) 2px, transparent 2px) !important;
    background-size: 14px 14px !important;
    
    /* 粗边框与硬阴影，呼应状态栏 */
    border: 3px solid #2c1a1a !important;
    border-radius: 12px !important;
    box-shadow: 6px 6px 0px #2c1a1a !important;
    padding: 16px !important;
    margin-bottom: 12px !important;
    transition: transform 0.2s ease !important;
}

/* 3. 单独的输入聊天框 (差异化配色：清爽蓝) */
.bg-gray-100\/90.relative.inline-block:not(.chat-answer-container .bg-gray-100\/90) {
    background-color: #e0f7fa !important;
    background-image: radial-gradient(rgba(0, 188, 212, 0.15) 2px, transparent 2px) !important;
    border-color: #2c1a1a !important;
    box-shadow: -6px 6px 0px #2c1a1a !important; /* 输入框阴影反向，增加对话感 */
}

/* 4. 聊天框内的主要文本内容 (绝对可读性) */
.markdown-body {
    /* 浅色背景必须配极深的高对比度文字 */
    color: #2c1a1a !important;
    font-weight: bold !important;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
    /* 严禁使用text-shadow，确保文字清晰 */
    text-shadow: none !important;
    background: transparent !important;
    z-index: 1 !important;
    position: relative !important;
}

/* 5. 底部附加元素美化 (手账贴纸风) */
/* 底部操作按钮 */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary {
    background: #ffeb3b !important;
    color: #2c1a1a !important;
    border: 2px solid #2c1a1a !important;
    border-radius: 6px !important;
    box-shadow: 2px 2px 0px #2c1a1a !important;
    font-weight: 900 !important;
    margin-right: 8px !important;
    padding: 2px 10px !important;
    transition: all 0.1s !important;
}
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
    transform: translate(2px, 2px) !important;
    box-shadow: 0px 0px 0px #2c1a1a !important;
    background: #ff4081 !important;
    color: #fff !important;
}

/* 模型名称与Token消耗文本 */
.MuiTypography-root.MuiTypography-body2.css-6c0gf2,
.text-orange-500 {
    background: #2c1a1a !important;
    color: #00e5ff !important;
    padding: 2px 8px !important;
    border-radius: 12px !important;
    font-weight: 900 !important;
    font-size: 12px !important;
    display: inline-block !important;
    margin-top: 8px !important;
}
.text-orange-500 {
    color: #ff4081 !important; /* Token用亮粉色 */
}

/* 6. 巨大的俏皮加载动画：主播换衣中 */
/* 隐藏默认无聊的加载点 */
.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: 160px !important;
    height: 160px !important;
    margin: 10px auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* 注入SVG SMIL动画 (粉色更衣屏风 + 升降的蓝色小裙子 + 闪烁文字) */
.flex.items-center.justify-center.w-6.h-5::before {
    content: '' !important;
    position: absolute !important;
    width: 100% !important;
    height: 100% !important;
    /* 使用URL Encoding的SVG，内置SMIL动画保证兼容性 */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect x="10" y="20" width="80" height="65" fill="%23ff4081" rx="5" stroke="%232c1a1a" stroke-width="2"/><rect x="20" y="10" width="60" height="10" fill="%232c1a1a" rx="2"/><g><animateTransform attributeName="transform" type="translate" values="0,15; 0,-5; 0,15" dur="1.2s" repeatCount="indefinite" /><path d="M30 45 L50 25 L70 45 L65 80 L35 80 Z" fill="%2300e5ff" stroke="%232c1a1a" stroke-width="3"/><circle cx="50" cy="20" r="4" fill="%232c1a1a"/></g><circle cx="20" cy="30" r="3" fill="%23ffeb3b"><animate attributeName="r" values="1;4;1" dur="0.8s" repeatCount="indefinite"/></circle><circle cx="80" cy="55" r="4" fill="%23ffeb3b"><animate attributeName="r" values="2;6;2" dur="1.1s" repeatCount="indefinite"/></circle><text x="50" y="95" font-family="sans-serif" font-size="11" font-weight="900" fill="%232c1a1a" text-anchor="middle"><animate attributeName="opacity" values="1;0.2;1" dur="0.9s" repeatCount="indefinite"/>CHANGING OUTFIT...</text></svg>') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* 移动端微调 */
@media(max-width:480px) {
    .bg-gray-100\/90.relative.inline-block {
        padding: 12px !important;
        border-width: 2px !important;
        box-shadow: 4px 4px 0px #2c1a1a !important;
    }
    .flex.items-center.justify-center.w-6.h-5 {
        width: 120px !important;
        height: 120px !important;
    }
}

/* Base Container - 剪报手账风底板 */
x-ui {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #fdf6e3; /* 暖色纸张背景 */
    padding: 14px;
    border-radius: 12px;
    border: 3px solid #2c1a1a;
    box-shadow: 6px 6px 0 rgba(44, 26, 26, 0.15);
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #2c1a1a;
    font-size: 14px;
    line-height: 1.6;
}

/* Details Blocks - 杂志剪切块 */
x-ui details {
    background: #fff;
    border: 2px solid #2c1a1a;
    border-radius: 8px;
    box-shadow: 4px 4px 0 #2c1a1a; /* 强对比硬阴影 */
    transition: all 0.2s ease;
    overflow: hidden;
}
x-ui details:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #2c1a1a;
}

/* Summaries - 高对比度标题栏 */
x-ui summary {
    padding: 10px 12px;
    font-weight: 900;
    font-size: 15px;
    cursor: pointer;
    border-bottom: 2px solid #2c1a1a;
    display: flex;
    align-items: center;
    letter-spacing: 1px;
}
x-ui summary::-webkit-details-marker { display: none; }
x-ui summary::before {
    content: '📌';
    margin-right: 8px;
    font-size: 14px;
    transition: transform 0.3s;
}
x-ui details[open] > summary::before {
    transform: rotate(90deg);
}

/* 独立模块专属主题色 (高饱和度对比) */
x-ui .mod-status summary { background: #ffeb3b; color: #2c1a1a; }
x-ui .mod-news summary { background: #2c1a1a; color: #fff; }
x-ui .mod-profile summary { background: #ff4081; color: #fff; }
x-ui .mod-target summary { background: #d50000; color: #fff; }
x-ui .mod-social summary { background: #00e5ff; color: #2c1a1a; }
x-ui .mod-biz summary { background: #795548; color: #fff; }
x-ui .mod-mem summary { background: #ff9100; color: #2c1a1a; }
x-ui .mod-action summary { background: #aa00ff; color: #fff; }

/* 文本容器排版 */
x-ui .p-box { 
    padding: 12px 14px; 
    border-bottom: 1px dashed #e0e0e0; 
}
x-ui .p-box:last-child { border-bottom: none; }

/* Main Story Text - 日志正文区 */
x-ui txt {
    display: block;
    background: #fff;
    padding: 18px 16px;
    border: 2px dashed #ff9100;
    border-radius: 8px;
    margin: 4px 0;
    font-size: 15px;
    box-shadow: inset 0 0 15px rgba(255, 145, 0, 0.08);
    position: relative;
    line-height: 1.8;
}
x-ui txt::before {
    content: 'STORY LOG';
    position: absolute;
    top: -12px; left: 16px;
    background: #ff9100;
    color: #fff;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 900;
    border-radius: 12px;
    border: 2px solid #2c1a1a;
}

/* Grid Stats - 经营游戏UI感 */
x-ui .st-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    padding: 14px;
    background: repeating-linear-gradient(45deg, #f9f9f9, #f9f9f9 10px, #fff 10px, #fff 20px);
    border-top: 2px solid #2c1a1a;
    border-bottom: 2px solid #2c1a1a;
}
x-ui .st-item {
    background: #fff;
    border: 2px solid #2c1a1a;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    display: flex;
    align-items: center;
    box-shadow: 2px 2px 0 #2c1a1a;
}

/* 列表美化 */
x-ui ul { margin: 8px 0 0 0; padding-left: 0; }
x-ui li {
    list-style: none;
    padding: 8px 10px;
    margin-bottom: 6px;
    background: #f5f5f5;
    border-left: 4px solid #ff4081;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
}
x-ui li:last-child { margin-bottom: 0; }

/* Galgame Actions - 互动决断区 */
x-ui .actions {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f3e5f5;
}
x-ui .act-btn {
    background: linear-gradient(90deg, #e040fb, #aa00ff);
    color: #fff;
    padding: 12px 16px;
    border-radius: 30px;
    font-weight: 900;
    border: 2px solid #2c1a1a;
    box-shadow: 0 4px 0 #2c1a1a;
    cursor: pointer;
    transition: all 0.1s;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.5);
}
x-ui .act-btn:active, x-ui .act-btn:hover {
    transform: translateY(4px);
    box-shadow: 0 0 0 #2c1a1a;
    background: linear-gradient(90deg, #aa00ff, #e040fb);
}

/* Tags - 推特热搜标签 */
x-ui .tag {
    background: #2c1a1a;
    color: #00e5ff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
    margin-top: 4px;
}

/* News Module - 报纸排版 */
x-ui .nw d {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px dashed #ccc;
    align-items: flex-start;
}
x-ui .nw f {
    background: #2c1a1a;
    color: #fff;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
    white-space: nowrap;
}
x-ui .nw span { font-style: italic; color: #555; }

/* Memory Notes - 便利贴效果 */
x-ui .mem .tip {
    background: #fff9c4;
    padding: 10px;
    font-size: 12px;
    border-left: 4px solid #fbc02d;
    margin: 12px;
    border-radius: 0 6px 6px 0;
    color: #555;
}
x-ui .mem .sm {
    margin: 0 12px 12px 12px;
    border: 1px dashed #2c1a1a;
    box-shadow: none;
}
x-ui .mem .sm summary {
    background: #ffe0b2;
    color: #e65100;
    border-bottom: 1px dashed #2c1a1a;
    font-size: 13px;
}

/* 强调色与文本美化 */
x-ui [c="y"] { color: #f57f17 !important; }
x-ui [c="b"] { color: #00b0ff !important; }
x-ui [c="p"] { color: #f50057 !important; }
x-ui [c="r"] { color: #d50000 !important; }
x-ui [c="g"] { color: #00c853 !important; }
x-ui b { color: #000; font-weight: 900; }
x-ui i { color: #666; }
