/* ═══ B平台加载动画适配（自动注入）═══ */
.flex.items-center.justify-center.size-6 { opacity: 1 !important; }
.flex.items-center.justify-center.size-6 > .flex.gap-2 { display: none !important; }
.is-assistant.w-fit { width: 100% !important; }
.is-assistant > .border.border-muted:has(.flex.items-center.justify-center.size-6) {
  width: 100% !important; background: transparent !important;
  border: none !important; padding: 0 !important;
}
.is-assistant .space-y-3:has(.flex.items-center.justify-center.size-6) {
  display: flex; justify-content: center; width: 100%;
}

/* ═══ B平台表格修正（自动注入）═══ */
.rili-markdown-renderer table { display:table!important; table-layout:auto!important; width:100%!important; border-collapse:collapse!important; }
.rili-markdown-renderer table caption { display:table-caption!important; caption-side:top!important; text-align:center!important; padding:8px!important; }
.rili-markdown-renderer thead { display:table-header-group!important; }
.rili-markdown-renderer tbody { display:table-row-group!important; }
.rili-markdown-renderer tr { display:table-row!important; }
.rili-markdown-renderer th, .rili-markdown-renderer td { display:table-cell!important; }

/* ═══ B平台按钮组保护（自动注入 — 防止按钮消失）═══
   原理：B平台消息操作按钮结构为：
   .flex.items-center.gap-1.ml-auto (hover显隐包装)
     └── .bg-muted.rounded.flex.p-0.5 (按钮组容器)
           └── button.rounded-full.size-7 (单个按钮)
   以下规则使用高specificity + !important确保按钮
   不被任何转换后/透传的CSS规则意外隐藏
   ═══════════════════════════════════════════════ */
/* 按钮组容器保护 */
.w-full.h-full.flex.group .bg-muted.rounded.flex.p-0\.5,
.is-user .bg-muted.rounded.flex.p-0\.5,
.is-assistant .bg-muted.rounded.flex.p-0\.5 {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: visible !important;
  position: relative !important;
  width: auto !important;
  height: auto !important;
  max-height: none !important;
  pointer-events: auto !important;
  clip: auto !important;
  clip-path: none !important;
}
/* 单个按钮保护 */
.w-full.h-full.flex.group .bg-muted.rounded.flex.p-0\.5 > button,
.is-user .bg-muted.rounded.flex.p-0\.5 > button,
.is-assistant .bg-muted.rounded.flex.p-0\.5 > button {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: relative !important;
  clip: auto !important;
  clip-path: none !important;
}
/* hover显隐包装层保护 — 仅保留B平台原生的opacity过渡 */
.flex.items-center.gap-1.ml-auto.md\:opacity-0.group-hover\:opacity-100 {
  visibility: visible !important;
  display: flex !important;
  pointer-events: auto !important;
  overflow: visible !important;
}
/* 操作行保护 */
.flex.w-full.items-center.justify-between.gap-2.px-2 {
  display: flex !important;
  visibility: visible !important;
  overflow: visible !important;
}

/* ═══ B平台顶部栏适配说明（自动注入）═══
   A: div.sticky > div.flex.justify-between
      ├── 左侧空区
      ├── #ai-model-selector (居中)
      └── 右侧工具(设置按钮等)
   B: <header.flex.justify-between>
      ├── #nav-left (侧边栏开关)
      ├── #nav-middle (可能为空)
      └── #nav-right (通知/主题/语言)
   B平台模型按钮不在header内，选择器:
   button:has(> .flex-1.truncate.text-left)
   ═══════════════════════════════════════ */
header.flex.justify-between { position: relative; overflow: visible; }

/* 1. 隐藏破坏末世氛围的顶部亮色装饰条 */
[class*="bg-[#F1CBCB]"], 
[class*="bg-[#c9e1e9]"] {
    display: none !important;
}

/* 2. 统一聊天框主体：军用物资/末日终端质感 */
.is-user > .border.border-muted,
.is-assistant > .border.border-muted {
    /* 基础背景色：暗沉军绿/黑褐色，角落带有血迹晕染 */
    background-color: #1a1c18 !important;
    background-image: 
        radial-gradient(circle at 100% 100%, rgba(105, 15, 15, 0.4) 0%, transparent 60%),
        linear-gradient(180deg, rgba(20, 22, 18, 0.9) 0%, rgba(10, 12, 10, 0.95) 100%) !important;
    
    /* 边框：破旧、厚重感 */
    border: 2px solid #3e4235 !important;
    border-bottom: 3px solid #5a1111 !important; /* 底部暗红，暗示血迹或生锈 */
    border-radius: 2px !important; /* 锐利的直角，工业感 */
    
    /* 阴影：内部污渍感与外部立体感 */
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.9),
        4px 4px 0px rgba(0, 0, 0, 0.6) !important;
    
    position: relative !important;
    isolation: isolate !important;
    overflow: hidden !important;
}

/* 3. 聊天框背景纹理：老式CRT扫描线与污渍干扰 */
.is-user > .border.border-muted,
.is-assistant > .border.border-muted::after {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%) !important;
    background-size: 100% 4px !important;
    z-index: 0 !important;
    pointer-events: none !important;
    opacity: 0.7 !important;
}

/* 4. 核心文本内容：绝对可读性保证 */
.rili-markdown-renderer {
    color: #F0F0F0 !important; 
    font-family: "Courier New", Consolas, monospace, sans-serif !important;
    font-weight: bold !important;
    text-shadow: none !important;
    background: transparent !important;
    position: relative !important;
    z-index: 2 !important;
}

/* 强调文本呈现警示红色 */
.rili-markdown-renderer strong {
    color: #ff5555 !important;
    background-color: rgba(255, 0, 0, 0.1) !important;
    padding: 0 2px !important;
}

/* ==========================================
   新增修正：强制统一Markdown表格（状态栏）样式
   ========================================== */
.rili-markdown-renderer table {
    background-color: transparent !important;
    border-collapse: collapse !important;
    width: 100% !important;
    margin-top: 10px !important;
    margin-bottom: 10px !important;
}

/* 强制清除所有表格单元格的默认背景，并设置末日风格边框 */
.rili-markdown-renderer th,
.rili-markdown-renderer td {
    background-color: transparent !important;
    border: 1px solid #3e4235 !important; /* 破旧军绿边框 */
    color: #F0F0F0 !important;
    padding: 6px 12px !important;
}

/* 覆盖平台默认的斑马线（交替行）亮色背景 */
.rili-markdown-renderer tr,
.rili-markdown-renderer tr:nth-child(2n) {
    background-color: transparent !important;
}

/* 为表头添加微弱的战术终端底色以作区分 */
.rili-markdown-renderer th {
    background-color: rgba(62, 66, 53, 0.6) !important;
    color: #a8b598 !important;
}

/* 5. 底部附加元素：幸存者战术UI配色 */
.bg-muted.rounded.flex.p-0\.5 > button.rounded-full.size-7,
.flex.items-center.gap-2.text-xs.font-mono.text-muted-foreground,
/* [Token消耗hover逻辑转换未启用]
.bg-muted.rounded.flex.p-0\.5 > button.rounded-full.size-7,
.flex.items-center.gap-2.text-xs.font-mono.text-muted-foreground,
.text-orange-500 {
    color: #a8b598 !important;
    font-family: "Courier New", Consolas, monospace !important;
    font-weight: bold !important;
    position: relative !important;
    z-index: 2 !important;
}
*/

.bg-muted.rounded.flex.p-0\.5 > button.rounded-full.size-7{
    color: #ff5555 !important;
    background-color: rgba(90, 17, 17, 0.3) !important;
}

/* 6. 输出聊天框加载动画：末日雷达/心跳探测仪 */
.style-module__AtdJSq__dot-flashing.style-module__AtdJSq__text {
    display: none !important;
}

.flex.items-center.justify-center.size-6 {
    position: relative !important;
    width: 30px !important;
    height: 30px !important;
}

.flex.items-center.justify-center.size-6::before {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 24px !important;
    height: 24px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='45' fill='none' stroke='%233e4235' stroke-width='4'/%3E%3Ccircle cx='50' cy='50' r='10' fill='%23ff4444'%3E%3Canimate attributeName='opacity' values='1; 0.2; 1' dur='1s' repeatCount='indefinite'/%3E%3Canimate attributeName='r' values='5; 15; 5' dur='1s' repeatCount='indefinite'/%3E%3C/circle%3E%3Cline x1='50' y1='50' x2='50' y2='5' stroke='%23a8b598' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 50 50' to='360 50 50' dur='2s' repeatCount='indefinite'/%3E%3C/line%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    z-index: 3 !important;
}
/* ==========================================
   1. 顶部栏 (Top Bar) - 军用战术面板
   ========================================== */
header.flex.justify-between {
    background: linear-gradient(180deg, #1a1c18 0%, #121411 100%) !important;
    border-bottom: 2px solid #3e4235 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.9) !important;
}

/* 顶部栏模型名称与文字 */
#nav-middle button:has(> .flex-1.truncate.text-left) .flex-1.truncate.text-left {
    color: #a8b598 !important;
    font-family: "Courier New", Consolas, monospace !important;
    font-weight: bold !important;
    letter-spacing: 1px !important;
}

/* 顶部栏所有图标统一为战术绿色 */
header.flex.justify-between svg {
    color: #a8b598 !important;
    filter: drop-shadow(0 0 2px rgba(168, 181, 152, 0.5)) !important;
}

/* ==========================================
   2. 开场白选择器 (Opening Remarks)
   ========================================== */
div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"] {
    background-color: #1a1c18 !important;
    border: 1px solid #3e4235 !important;
    border-radius: 2px !important; /* 废除圆角，采用工业直角 */
    color: #a8b598 !important;
    transition: all 0.3s ease !important;
}

div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"]:hover {
    border-color: #5a1111 !important;
    background-color: #22251f !important;
}

/* ==========================================
   3. 按钮栏 (Button Bar) - 战术指令按键
   ========================================== */
#ai-mod-button2 button.MuiButton-root {
    background-color: #1a1c18 !important;
    border: 1px solid #3e4235 !important;
    color: #a8b598 !important;
    border-radius: 2px !important;
    font-family: "Courier New", Consolas, monospace !important;
    font-weight: bold !important;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.8) !important;
    transition: all 0.1s ease !important;
}

#ai-mod-button2 button.MuiButton-root:hover {
    background-color: #2a2d24 !important;
    border-color: #ff5555 !important;
    color: #ff5555 !important;
    transform: translate(1px, 1px) !important;
    box-shadow: 1px 1px 0px rgba(0, 0, 0, 0.8) !important;
}

#ai-mod-button2 button.MuiButton-root svg {
    color: inherit !important;
}

/* ==========================================
   4. 底部输入栏 (Bottom Bar) - 终端输入台
   ========================================== */
.bg-gradient-to-t {
    background: linear-gradient(to top, #0a0b09 70%, transparent) !important;
}

#ai-chat-bottom-input {
    background-color: #121411 !important;
    border: 2px solid #3e4235 !important;
    border-top: 3px solid #5a1111 !important; /* 顶部锈红警示线 */
    border-radius: 2px !important;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8) !important;
}

#ai-chat-input {
    color: #e0e0e0 !important;
    font-family: "Courier New", Consolas, monospace !important;
    font-size: 15px !important;
}

#ai-chat-input::placeholder {
    color: #4a543b !important;
    font-style: italic !important;
}

/* 文字选中时的血色高亮 */
#ai-chat-input::selection {
    background-color: #8b0000 !important;
    color: #ffffff !important;
}

/* ==========================================
   5. 评论区 (Comment Section) - 幸存者日志档案
   ========================================== */
/* 强行覆盖评论区默认白色背景，加入微弱扫描线 */
div[class*="w-full"][class*="bg-white"][class*="bottom-0"] {
    background-color: #121411 !important;
    background-image: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.2) 50%) !important;
    background-size: 100% 4px !important;
    border-top: 2px solid #3e4235 !important;
}

/* 评论区标题 */
div.text-lg.font-bold {
    color: #ff5555 !important; /* 警示红 */
    font-family: "Courier New", Consolas, monospace !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
}

/* 个人评分文字 */
p.MuiTypography-body1.text-grey-600 {
    color: #a8b598 !important;
}

/* 评分星星：生锈的橙红色 */
span.MuiRating-iconEmpty svg { color: #2a2d24 !important; }
span.MuiRating-iconFilled svg { color: #cc4400 !important; }
/* [Token消耗hover逻辑转换未启用]
span.text-orange-500 { color: #cc4400 !important; font-weight: bold !important; }
*/

/* 评论输入框 */
div.flex.flex-col.border-gray-200 {
    border-color: #3e4235 !important;
    background-color: #1a1c18 !important;
}
textarea.rc-textarea {
    background-color: transparent !important;
    color: #e0e0e0 !important;
}
div.bg-gray-100.text-gray-500 {
    background-color: #121411 !important;
    color: #7a8568 !important;
    border-top: 1px solid #3e4235 !important;
}

/* 发送评论按钮 */
div.cursor-pointer.group.flex.items-center.justify-center svg[data-icon="Send03"] {
    color: #a8b598 !important;
}
div.cursor-pointer.group.flex.items-center.justify-center:hover svg[data-icon="Send03"] {
    color: #ff5555 !important;
}

/* 评论列表与分割线 */
div.style_divider__mW0YX {
    background-color: #2a2d24 !important; /* 暗色分割线 */
}

/* 用户名与内容 */
div.text-sm.text-grey-600 span.font-bold {
    color: #a8b598 !important; /* 战术绿用户名 */
}
span.text-\[10px\] {
    color: #ff5555 !important; /* (你) 的标签标红 */
}
div.break-all {
    color: #cfd6c5 !important; /* 高可读性灰白内容 */
}
div.text-xs.text-grey-600 {
    color: #556044 !important; /* 暗色时间戳 */
}

/* 头像：废土褪色处理 */
div.group img.rounded-full {
    filter: grayscale(50%) sepia(30%) contrast(1.2) !important;
    border: 1px solid #3e4235 !important;
    border-radius: 2px !important; /* 废除圆形头像，改为方形更硬核 */
}

/* 评论回复边框与按钮 */
div.ml-8.border-l {
    border-color: #5a1111 !important; /* 回复线改为暗红 */
}
span.cursor-pointer {
    color: #a8b598 !important;
}
span.cursor-pointer:hover {
    color: #ff5555 !important;
}

/* 评论排序按钮 */
button.MuiButton-containedPrimary {
    background-color: #3e4235 !important;
    color: #e0e0e0 !important;
    border-radius: 2px !important;
}
button.MuiButton-outlinedPrimary {
    border-color: #3e4235 !important;
    color: #a8b598 !important;
    border-radius: 2px !important;
}

/* ==========================================
   6. 分页栏 (Pagination) - 弹药计数器风格
   ========================================== */
.MuiPaginationItem-root {
    color: #a8b598 !important;
    border: 1px solid #3e4235 !important;
    border-radius: 2px !important;
    background-color: #1a1c18 !important;
    font-family: "Courier New", Consolas, monospace !important;
    font-weight: bold !important;
}

.MuiPaginationItem-root:hover {
    background-color: #2a2d24 !important;
}

.MuiPaginationItem-root.Mui-selected {
    background-color: #5a1111 !important; /* 选中页码呈暗血红色 */
    color: #ffffff !important;
    border-color: #ff5555 !important;
}

.MuiPaginationItem-root.Mui-disabled {
    opacity: 0.3 !important;
    border-color: #22251f !important;
}

/* 跳转输入区域 */
.flex.w-full.items-center.justify-between.gap-2.px-2.css-1uwir8f .MuiBox-root {
    color: #a8b598 !important;
}
.MuiInputBase-input {
    color: #e0e0e0 !important;
    background-color: #1a1c18 !important;
    border: 1px solid #3e4235 !important;
    border-radius: 2px !important;
    text-align: center !important;
}
/* ==========================================
   7. 战术终端代码块 (Code Blocks)
   ========================================== */
/* 代码块主容器：军用终端外壳 */
.rili-markdown-renderer pre {
    background-color: #121411 !important;
    border: 2px solid #3e4235 !important;
    border-radius: 2px !important;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.8), 0 4px 6px rgba(0, 0, 0, 0.3) !important;
    background-image: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.2) 50%) !important;
    background-size: 100% 4px !important; /* CRT扫描线 */
}

/* 头部栏：警示红边框分隔 */
.rili-markdown-renderer pre > div > div.flex.justify-between.h-8,
.rili-markdown-renderer pre > div > div.border-b {
    background-color: #0a0b09 !important;
    border-bottom: 2px solid #5a1111 !important; /* 锈红底边 */
}

/* 语言标签：终端字体 */
.rili-markdown-renderer pre > div > div.flex.justify-between > div.text-\[13px\] {
    color: #ff5555 !important;
    font-family: "Courier New", Consolas, monospace !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

/* 复制按钮图标 (SVG) 颜色联动 - 默认战术绿 */
.rili-markdown-renderer pre svg.lucide-copy,
.rili-markdown-renderer pre div[data-tooltip-id^="copy-tooltip"] > svg {
    color: #a8b598 !important;
    transition: all 0.2s ease !important;
}

/* 复制按钮图标 (SVG) 颜色联动 - Hover警示红 */
.rili-markdown-renderer pre .group:hover svg.lucide-copy,
.rili-markdown-renderer pre div[data-tooltip-id^="copy-tooltip"]:hover > svg {
    color: #ff5555 !important;
    transform: scale(1.1) !important;
}

/* 代码内容区：强制覆盖内联样式，采用高对比度废土灰 */
.rili-markdown-renderer pre > div > div[node] {
    background: transparent !important;
    color: #cfd6c5 !important; 
    font-family: "Courier New", Consolas, monospace !important;
}

/* 纯代码块备用覆盖 */
.rili-markdown-renderer pre > code[node] {
    background: transparent !important;
    color: #cfd6c5 !important;
}

/* ==========================================
   8. 生存仪表盘：机密档案折叠面板 (<details> & <summary>)
   ========================================== */
/* 折叠面板主容器 */
.rili-markdown-renderer details {
    background-color: #161814 !important;
    border: 1px solid #3e4235 !important;
    border-left: 4px solid #5a1111 !important; /* 左侧装甲红线 */
    border-radius: 2px !important;
    margin-bottom: 12px !important;
    padding: 0 !important;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5) !important;
    transition: all 0.3s ease !important;
}

.rili-markdown-renderer details[open] {
    border-color: #5a1111 !important;
    box-shadow: 0 0 10px rgba(90, 17, 17, 0.2) !important;
}

/* 折叠面板标题行 */
.rili-markdown-renderer summary {
    background-color: #22251f !important;
    color: #a8b598 !important;
    font-family: "Courier New", Consolas, monospace !important;
    font-size: 1.05em !important;
    font-weight: bold !important;
    padding: 10px 15px !important;
    cursor: pointer !important;
    list-style: none !important; /* 隐藏默认三角(部分浏览器) */
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    border-bottom: 1px solid transparent !important;
}

/* 自定义展开/收起箭头 (战术光标) */
.rili-markdown-renderer summary::-webkit-details-marker {
    display: none !important;
}
.rili-markdown-renderer summary::before {
    content: "[+]" !important;
    color: #ff5555 !important;
    margin-right: 8px !important;
    font-family: monospace !important;
}
.rili-markdown-renderer details[open] > summary::before {
    content: "[-]" !important;
    color: #a8b598 !important;
}

.rili-markdown-renderer details[open] > summary {
    border-bottom: 1px solid #3e4235 !important;
    background-color: #1a1c18 !important;
}

.rili-markdown-renderer summary:hover {
    background-color: #2a2d24 !important;
    color: #e0e0e0 !important;
}

/* 折叠面板内部内容区 */
.rili-markdown-renderer details > *:not(summary) {
    padding: 0 15px !important;
    margin-top: 10px !important;
    margin-bottom: 10px !important;
}

/* ==========================================
   9. 生存数据网格 (Tables) - 属性/需求/记忆
   ========================================== */
.rili-markdown-renderer table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 15px 0 !important;
    background-color: #121411 !important;
    border: 2px solid #3e4235 !important;
    font-family: "Courier New", Consolas, monospace !important;
}

/* 表头：暗绿底色 */
.rili-markdown-renderer th {
    background-color: #2a2d24 !important;
    color: #a8b598 !important;
    border: 1px solid #3e4235 !important;
    padding: 8px 12px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    text-align: left !important;
}

/* 单元格：废土灰 */
.rili-markdown-renderer td {
    border: 1px solid #3e4235 !important;
    padding: 8px 12px !important;
    color: #cfd6c5 !important;
}

/* 斑马线效果：微弱的亮度交替 */
.rili-markdown-renderer tr:nth-child(even) td {
    background-color: #161814 !important;
}

.rili-markdown-renderer tr:hover td {
    background-color: #22251f !important;
    color: #e0e0e0 !important;
}

/* ==========================================
   10. 文本格式化 (Markdown正文元素)
   ========================================== */
/* 粗体文字：战术高亮 */
.rili-markdown-renderer strong {
    color: #a8b598 !important;
    font-weight: bold !important;
    text-shadow: 0 0 2px rgba(168, 181, 152, 0.3) !important;
}

/* 列表项：方形终端点 */
.rili-markdown-renderer ul {
    list-style-type: square !important;
    color: #5a1111 !important; /* 列表点颜色 */
}
.rili-markdown-renderer li {
    color: #cfd6c5 !important; /* 列表文字颜色 */
    margin-bottom: 4px !important;
}

/* 水平分割线 (NPC档案分隔) */
.rili-markdown-renderer hr {
    border: none !important;
    border-top: 2px dashed #3e4235 !important;
    margin: 20px 0 !important;
    background: transparent !important;
}
.rili-markdown-renderer hr::after {
    content: "END OF FILE" !important;
    display: block !important;
    text-align: center !important;
    color: #3e4235 !important;
    font-family: "Courier New", monospace !important;
    font-size: 12px !important;
    margin-top: -10px !important;
    background-color: #121411 !important; /* 遮挡虚线 */
    width: 100px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
/* ==========================================
   [ TACTICAL OS ] 战术平板终端系统核心
   ========================================== */

/* ------------------------------------------
   状态1：桌面 APP 图标模式 (未展开时)
   ------------------------------------------ */
.rili-markdown-renderer details:not([open]) {
    display: inline-flex !important;
    flex-direction: column !important;
    width: 95px !important;
    height: 95px !important;
    margin: 10px 10px 10px 0 !important;
    background: linear-gradient(145deg, #1e2219, #121411) !important;
    border: 2px solid #3e4235 !important;
    border-radius: 22px !important; /* APP圆角 */
    box-shadow: 4px 4px 10px rgba(0,0,0,0.5), inset 2px 2px 5px rgba(255,255,255,0.05) !important;
    vertical-align: top !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

/* APP 悬浮动画 */
.rili-markdown-renderer details:not([open]):hover {
    transform: translateY(-5px) scale(1.05) !important;
    border-color: #a8b598 !important;
    box-shadow: 0 8px 15px rgba(0,0,0,0.6), 0 0 15px rgba(168, 181, 152, 0.3) !important;
}

/* APP 文本与布局 */
.rili-markdown-renderer details:not([open]) > summary {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
    padding: 5px !important;
    font-size: 12px !important;
    color: #8b9977 !important;
    font-family: "Courier New", Consolas, monospace !important;
    font-weight: bold !important;
    text-align: center !important;
    line-height: 1.2 !important;
    list-style: none !important;
}
.rili-markdown-renderer details:not([open]) > summary::-webkit-details-marker {
    display: none !important;
}

/* APP 战术图标注入 (根据顺序自动匹配图标) */
.rili-markdown-renderer details:not([open]) > summary::before {
    font-size: 30px !important;
    margin-bottom: 8px !important;
    color: #a8b598 !important;
    display: block !important;
}
.rili-markdown-renderer details:nth-of-type(1):not([open]) > summary::before { content: "⏱" !important; }  /* 当前情况 */
.rili-markdown-renderer details:nth-of-type(2):not([open]) > summary::before { content: "⚇" !important; }  /* 主角信息 */
.rili-markdown-renderer details:nth-of-type(3):not([open]) > summary::before { content: "⛃" !important; }  /* NPC信息 */
.rili-markdown-renderer details:nth-of-type(4):not([open]) > summary::before { content: "✚" !important; }  /* 生存仪表盘 */
.rili-markdown-renderer details:nth-of-type(5):not([open]) > summary::before { content: "☍" !important; }  /* 世界动态 */
.rili-markdown-renderer details:nth-of-type(6):not([open]) > summary::before { content: "⊞" !important; }  /* 记忆区 */
.rili-markdown-renderer details:nth-of-type(7):not([open]) > summary::before { content: "➤" !important; }  /* 行动推荐 */
.rili-markdown-renderer details:nth-of-type(n+8):not([open]) > summary::before { content: "◈" !important; } /* 备用 */

/* ------------------------------------------
   状态2：平板全屏展开模式 (点击进入后)
   ------------------------------------------ */
.rili-markdown-renderer details[open] {
    display: block !important;
    width: 100% !important;
    margin: 25px 0 !important;
    background-color: #080a08 !important; /* 屏幕底色 */
    border: 16px solid #161814 !important; /* 平板加厚装甲外框 */
    border-radius: 24px !important; /* 平板边缘圆角 */
    box-shadow: 
        0 0 0 2px #000, 
        0 15px 35px rgba(0,0,0,0.8),
        inset 0 0 0 3px #3e4235, /* 屏幕内侧金属边 */
        inset 0 0 40px rgba(168, 181, 152, 0.08) !important; /* 屏幕荧光 */
    background-image: 
        linear-gradient(rgba(168, 181, 152, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(168, 181, 152, 0.04) 1px, transparent 1px) !important;
    background-size: 20px 20px !important; /* 屏幕网格线 */
    overflow: hidden !important;
    animation: tabletOpen 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

@keyframes tabletOpen {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* 顶部导航栏 / 返回按钮 */
.rili-markdown-renderer details[open] > summary {
    display: flex !important;
    align-items: center !important;
    background: #1a1c18 !important;
    border-bottom: 3px solid #3e4235 !important;
    padding: 12px 20px !important;
    color: #cfd6c5 !important;
    font-family: "Courier New", Consolas, monospace !important;
    font-size: 15px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    cursor: pointer !important;
    list-style: none !important;
}
.rili-markdown-renderer details[open] > summary::-webkit-details-marker {
    display: none !important;
}
.rili-markdown-renderer details[open] > summary:hover {
    background: #22251f !important;
}

/* RETURN 图标与警示红 */
.rili-markdown-renderer details[open] > summary::before {
    content: "◀ RETURN / " !important;
    color: #ff5555 !important;
    margin-right: 10px !important;
    font-size: 14px !important;
    text-shadow: 0 0 8px rgba(255, 85, 85, 0.6) !important;
}

/* 伪造的状态栏 (电量/信号) */
.rili-markdown-renderer details[open] > summary::after {
    content: "WIFI: SECURE | BAT: 92% 🔋" !important;
    margin-left: auto !important;
    color: #8b9977 !important;
    font-size: 12px !important;
    font-weight: normal !important;
    letter-spacing: 0 !important;
}

/* 屏幕内部内容区 (CRT闪烁载入动画) */
.rili-markdown-renderer details[open] > *:not(summary) {
    padding: 10px 20px 25px 20px !important;
    color: #cfd6c5 !important;
    font-family: "Courier New", Consolas, monospace !important;
    animation: crtFlicker 0.5s ease-out !important;
}

@keyframes crtFlicker {
    0% { opacity: 0; filter: brightness(3) contrast(2); }
    30% { opacity: 0.5; filter: brightness(0.5) contrast(1); }
    50% { opacity: 0.8; filter: brightness(1.5) contrast(1.2); }
    100% { opacity: 1; filter: brightness(1) contrast(1); }
}

/* ------------------------------------------
   内部组件适配 (表格、强调字、分割线)
   ------------------------------------------ */
.rili-markdown-renderer details[open] table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 15px 0 !important;
    background-color: #121411 !important;
    border: 2px solid #3e4235 !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3) !important;
}
.rili-markdown-renderer details[open] th {
    background-color: #1e2219 !important;
    color: #a8b598 !important;
    border: 1px solid #3e4235 !important;
    padding: 10px 12px !important;
    text-transform: uppercase !important;
}
.rili-markdown-renderer details[open] td {
    border: 1px solid #3e4235 !important;
    padding: 8px 12px !important;
    color: #cfd6c5 !important;
}
.rili-markdown-renderer details[open] tr:nth-child(even) td { background-color: #161814 !important; }
.rili-markdown-renderer details[open] tr:hover td { background-color: #22251f !important; color: #fff !important; }

.rili-markdown-renderer details[open] strong {
    color: #a8b598 !important;
    text-shadow: 0 0 3px rgba(168, 181, 152, 0.4) !important;
}

.rili-markdown-renderer details[open] hr {
    border: none !important;
    border-top: 2px dashed #3e4235 !important;
    margin: 25px 0 !important;
}
.rili-markdown-renderer details[open] hr::after {
    content: "[ SYSTEM EOF ]" !important;
    display: block !important;
    text-align: center !important;
    color: #3e4235 !important;
    font-size: 12px !important;
    margin-top: -10px !important;
    background-color: #080a08 !important;
    width: 120px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ------------------------------------------
   代码块终端化 (保留复制按钮联动)
   ------------------------------------------ */
.rili-markdown-renderer pre {
    background-color: #0c0e0c !important;
    border: 1px solid #3e4235 !important;
    border-left: 4px solid #5a1111 !important;
    border-radius: 4px !important;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8) !important;
}
.rili-markdown-renderer pre > div > div.flex.justify-between.h-8,
.rili-markdown-renderer pre > div > div.border-b {
    background-color: #121411 !important;
    border-bottom: 1px solid #3e4235 !important;
}
.rili-markdown-renderer pre > div > div.flex.justify-between > div.text-\[13px\] {
    color: #a8b598 !important;
    font-family: "Courier New", Consolas, monospace !important;
    font-weight: bold !important;
}
/* 复制按钮颜色联动 */
.rili-markdown-renderer pre svg.lucide-copy,
.rili-markdown-renderer pre div[data-tooltip-id^="copy-tooltip"] > svg {
    color: #a8b598 !important;
}
.rili-markdown-renderer pre .group:hover svg.lucide-copy,
.rili-markdown-renderer pre div[data-tooltip-id^="copy-tooltip"]:hover > svg {
    color: #ff5555 !important;
}
.rili-markdown-renderer pre > div > div[node],
.rili-markdown-renderer pre > code[node] {
    background: transparent !important;
    color: #cfd6c5 !important; 
    font-family: "Courier New", Consolas, monospace !important;
}