/* ============================================================
   [第一部分]：针对正文 HTML 格式的美化 (Game Container)
   ============================================================ */

.game-container {
    --bg-main: #ffffff;
    --text-main: #111111;
    --red-accent: #8b0000;
    --red-bright: #ff0000;
    --gray-bg: #fcfcfc;
    --border-light: #eeeeee;
    background: var(--bg-main) !important;
    color: var(--text-main) !important;
    font-family: "SimSun", "STSong", "Songti SC", serif !important;
    padding: 10px;
    border: 1px solid var(--border-light);
}

/* 故事叙述区 */
.story-container {
    margin-bottom: 25px;
    padding: 15px;
    line-height: 1.9;
    letter-spacing: 0.05em;
    border-left: 3px solid #000000; /* 纯黑实验室引导线 */
}
.story-text strong { color: var(--red-bright); letter-spacing: 0.2em; font-weight: normal; }

/* 状态栏折叠块 */
.game-container details {
    background: var(--gray-bg);
    border: 1px solid #f0f0f0;
    margin-bottom: 12px;
}
.game-container summary {
    padding: 12px;
    background: #f7f7f7;
    color: var(--red-accent);
    font-weight: bold;
    border-bottom: 1px solid #eee;
    list-style: none;
    cursor: pointer;
}

/* 档案网格 */
.status-grid {
    display: grid;
    grid-template-columns: 85px 1fr;
    gap: 8px;
    padding: 15px;
    font-size: 0.85rem;
}
.status-grid span:nth-child(odd) { color: #999; font-size: 0.7rem; text-transform: uppercase; }
.status-grid span:nth-child(even) { border-bottom: 1px solid #f0f0f0; padding-bottom: 2px; }

/* 监视终端进度条 */
.monitor-section { padding: 15px; font-size: 0.9rem; }
.progress-bar { width: 100%; height: 3px; background: #f0f0f0; margin: 8px 0 15px 0; position: relative; }
.progress-fill { height: 100%; background: #333; transition: width 0.6s ease; }
.progress-fill.hunger { background: #bbb; }
.progress-fill.thirst { background: #ccc; }
/* 理智条特化 */
.progress-fill[style*="background: var(--red-bright)"] { background: var(--red-bright) !important; }

/* 行动抉择 */
.actions { margin-top: 30px; border-top: 1px solid var(--red-accent); padding-top: 15px; }
.action-option {
    border: 1px solid #eee;
    padding: 12px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    transition: 0.2s;
    background: #fff;
    cursor: pointer;
}
.action-option:hover { border-color: var(--red-bright); color: var(--red-bright); background: #fffafb; }

.sys-note { color: var(--red-bright); font-size: 0.8rem; border-top: 1px dotted #eee; padding-top: 10px; margin-top: 10px; opacity: 0.8; }

/* ============================================================
   [第二部分]：针对风月平台全局 UI 的美化 (Platform UI)
   ============================================================ */

/* 1. 环境清理：移除所有顶部颜色条 */
[class*="bg-[#F1CBCB]"], [class*="bg-[#c9e1e9]"] { display: none !important; }
body { background-color: #ffffff !important; }

/* 2. 统一聊天框：实验室观察窗风格 */
.bg-gray-100\/90.relative.inline-block {
    background: #ffffff !important;
    border: 1px solid #eeeeee !important;
    border-radius: 0px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03) !important;
}

/* 3. 杀人者输入框：深渊黑洞（User输入部分） */
.bg-gray-100\/90.relative.inline-block:not(.chat-answer-container .bg-gray-100\/90) {
    background: #000000 !important;
    border-left: 5px solid #8b0000 !important;
    box-shadow: 0 10px 25px rgba(139, 0, 0, 0.2) !important;
}
.bg-gray-100\/90.relative.inline-block:not(.chat-answer-container .bg-gray-100\/90) .markdown-body {
    color: #ffffff !important; /* 杀人者文字变白 */
}

/* 4. 全局文字与 Markdown 调整 */
.markdown-body {
    color: #1a1a1a !important;
    font-family: "SimSun", "STSong", "Songti SC", serif !important;
}

/* 5. 底部功能按钮：极简处理 */
.flex.items-center.gap-2.pb-2 > button {
    color: #bbbbbb !important;
    border: 1px solid #f5f5f5 !important;
    background: #ffffff !important;
}
.flex.items-center.gap-2.pb-2 > button:hover {
    color: #ff0000 !important;
    border-color: #ff0000 !important;
}

/* 6. 加载动画：文字居中与溢出修复 */
.flex.items-center.justify-center.w-6.h-5 {
    position: relative !important;
    width: 220px !important; /* 扩容以容纳文字 */
}
.style_dot-flashing__8L91Q.style_text__zGhNq { display: none !important; }
.flex.items-center.justify-center.w-6.h-5::after {
    content: "SYSTEM_RECOVERY_IN_PROGRESS..." !important;
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    color: #8b0000 !important;
    font-size: 0.65rem !important;
    letter-spacing: 0.2em !important;
    animation: monitor-pulse 2s infinite !important;
}

/* 7. 顶部导航栏与组件 */
.sticky.w-full.top-0.flex.items-center {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid #f0f0f0 !important;
    backdrop-filter: blur(10px) !important;
}
#header-setting-button, .tool-btn, #ai-model-selector .group {
    color: #999999 !important;
}

/* 8. 聊天输入区域 */
#ai-chat-input {
    background: #ffffff !important;
    color: #111111 !important;
    border: 1px solid #eeeeee !important;
    border-radius: 0 !important;
}
#ai-send-button { color: #8b0000 !important; }
.w-full.bottom-0.z-20.inset-x-0.bg-white.transition-all {
    background-color: #ffffff !important;
    border-top: 1px solid #eeeeee !important;
}

/* 9. 杂项：消耗框、分页、操作组 */
.text-purple-500 { color: #8b0000 !important; font-size: 0.7rem !important; }
.MuiStack-root.css-1dzoql9 .MuiButton-root { color: #666 !important; border-color: #eee !important; }
.MuiPagination-root button { color: #999 !important; }

/* 10. 全局滚动条：隐形实验线 */
::-webkit-scrollbar { width: 4px !important; }
::-webkit-scrollbar-track { background: #ffffff !important; }
::-webkit-scrollbar-thumb { background: #eeeeee !important; }
::-webkit-scrollbar-thumb:hover { background: #8b0000 !important; }

@keyframes monitor-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }

/* 核心隐藏逻辑：强制隐藏所有追踪数据 */
.hidden-data {
    display: none !important;
}