/* ═══ 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; }

/* [Token消耗hover逻辑转换未启用]
.text-purple-500 {
    /* --- 布局结构 (保持原样) --- */
    display: block !important;
    width: 100% !important;
    position: relative !important;
    text-align: right !important;
    margin-top: 12px !important;
    padding-top: 8px !important;
    /* --- 核心逻辑 (保持原样) --- */
    visibility: hidden !important; 
    /* --- 字体样式修改：使用深棕色，更接近陈旧墨迹 --- */
    font-family: 'Georgia', 'SimSun', 'STKaiti', serif !important; /* 统一字体风格 */
    font-size: 0.85rem !important;
    color: #4a3728 !important;      /* 修改：将原本的灰色改为深棕褐色 */
    font-style: italic !important;  /* 新增：斜体，模仿手写批注 */
}
*/

/* 
   1. 永久存在的分割线 
   修改：由简单的虚线改为更具古典韵味的装饰线
*/
/* [Token消耗hover逻辑转换未启用]
.text-purple-500::after {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 10% !important;       
    width: 80% !important;         
    height: 1px !important;
    border-top: none !important;    
    background: linear-gradient(90deg, transparent, rgba(92, 64, 51, 0.4), transparent) !important;
    visibility: visible !important; 
    pointer-events: none !important;
}
*/

/* 
   2. "查看消耗" 提示文字 
   修改：文案与颜色，使其融入羊皮纸背景
*/
/* [Token消耗hover逻辑转换未启用]
.text-purple-500::before {
    content: "❧ 墨迹消耗" !important; /* 修改：加上花码符号，文案更古典 */
    position: absolute !important;
    top: 8px !important;
    right: 0 !important;
    
    /* --- 样式修改 --- */
    color: #8b7355 !important;     /* 修改：使用古铜色/干枯玫瑰色，比纯灰更有质感 */
    cursor: help !important;       /* 修改：鼠标样式改为问号，增加神秘感 */
    font-weight: normal !important;
    font-family: 'Georgia', serif !important;
    font-style: italic !important;
    letter-spacing: 1px !important; /* 新增：增加字间距，更优雅 */
    
    visibility: visible !important;    
    transition: all 0.4s ease-in-out !important; /* 修改：放慢过渡时间 */
    opacity: 0.7 !important;       /* 修改：默认稍微透明，像褪色的字迹 */
}
*/

/* [Token消耗hover逻辑转换未启用]
.text-purple-500:hover {
    visibility: visible !important;
}
*/

/* [Token消耗hover逻辑转换未启用]
.text-purple-500:hover::before {
    visibility: hidden !important;
    opacity: 0 !important;
    transform: translateY(-5px) !important; /* 修改：稍微加大位移 */
}
*/
/* 1. 隐藏默认加载元素 */
.flex.items-center.justify-center.size-6 > .flex.gap-2 {
    display: none !important;
}

/* 2. 加载容器：确保足够高度容纳华丽动画 */
.flex.items-center.justify-center.size-6 {
    position: relative !important;
    width: 100% !important;
    height: 200px !important;
    min-height: 200px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 25px 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

/* 3. 主动画：巴洛克徽章 + 羽毛笔书写 + 华丽装饰环 */
.flex.items-center.justify-center.size-6::before {
    content: "" !important;
    position: absolute !important;
    top: 18px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 130px !important;
    height: 110px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 120'%3E%3Cdefs%3E%3CradialGradient id='baroqueGold' cx='50%25' cy='50%25'%3E%3Cstop offset='0%25' stop-color='%23FFD700' stop-opacity='0.9'/%3E%3Cstop offset='50%25' stop-color='%23D4AF37' stop-opacity='0.6'/%3E%3Cstop offset='100%25' stop-color='%23B8860B' stop-opacity='0.2'/%3E%3C/radialGradient%3E%3CradialGradient id='inkBloom'%3E%3Cstop offset='0%25' stop-color='%238B1C1C' stop-opacity='0.8'/%3E%3Cstop offset='100%25' stop-color='%235c4033' stop-opacity='0.1'/%3E%3C/radialGradient%3E%3Cfilter id='luxuryGlow'%3E%3CfeGaussianBlur in='SourceGraphic' stdDeviation='1.5' result='blur'/%3E%3CfeMerge%3E%3CfeMergeNode in='blur'/%3E%3CfeMergeNode in='blur'/%3E%3CfeMergeNode in='SourceGraphic'/%3E%3C/feMerge%3E%3C/filter%3E%3Cfilter id='softGlow'%3E%3CfeGaussianBlur stdDeviation='2.5'/%3E%3C/filter%3E%3C/defs%3E%3C!-- 背景脉动光晕 --%3E%3Cellipse cx='70' cy='60' rx='50' ry='45' fill='url(%23baroqueGold)' filter='url(%23softGlow)' opacity='0.25'%3E%3Canimate attributeName='rx' values='48;58;48' dur='3s' repeatCount='indefinite'/%3E%3Canimate attributeName='ry' values='43;53;43' dur='3s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.2;0.35;0.2' dur='3s' repeatCount='indefinite'/%3E%3C/ellipse%3E%3C!-- 墨水晕染效果 --%3E%3Ccircle cx='70' cy='60' r='0' fill='url(%23inkBloom)' opacity='0.4'%3E%3Canimate attributeName='r' values='0;35;0' dur='4s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0;0.5;0' dur='4s' repeatCount='indefinite'/%3E%3C/circle%3E%3C!-- 外层华丽装饰环（顺时针旋转）--%3E%3Cg filter='url(%23luxuryGlow)'%3E%3Ccircle cx='70' cy='60' r='48' fill='none' stroke='%23D4AF37' stroke-width='2.5' stroke-dasharray='8,4' opacity='0.7' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 70 60' to='360 70 60' dur='10s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' from='0' to='24' dur='2s' repeatCount='indefinite'/%3E%3C/circle%3E%3C!-- 中层装饰环（逆时针旋转）--%3E%3Ccircle cx='70' cy='60' r='40' fill='none' stroke='%235c4033' stroke-width='1.8' stroke-dasharray='5,3,2,3' opacity='0.6'%3E%3CanimateTransform attributeName='transform' type='rotate' from='360 70 60' to='0 70 60' dur='8s' repeatCount='indefinite'/%3E%3C/circle%3E%3C!-- 内层精细环 --%3E%3Ccircle cx='70' cy='60' r='33' fill='none' stroke='%23D4AF37' stroke-width='1' stroke-dasharray='3,2' opacity='0.5'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 70 60' to='360 70 60' dur='6s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.4;0.7;0.4' dur='2s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C!-- 中心巴洛克盾徽纹章 --%3E%3Cg transform='translate(70,60)' filter='url(%23luxuryGlow)'%3E%3C!-- 盾牌主体 --%3E%3Cpath d='M-22,-28 L22,-28 L28,-18 Q28,22 0,40 Q-28,22 -28,-18 Z' fill='%238B1C1C' stroke='%23D4AF37' stroke-width='2.5' opacity='0.85'%3E%3Canimate attributeName='opacity' values='0.8;0.95;0.8' dur='3s' repeatCount='indefinite'/%3E%3C/path%3E%3C!-- 内盾装饰 --%3E%3Cpath d='M-18,-22 L18,-22 L22,-14 Q22,18 0,32 Q-22,18 -22,-14 Z' fill='none' stroke='%23D4AF37' stroke-width='1.5' opacity='0.6'/%3E%3C!-- 巴洛克中心花纹（对称卷草纹）--%3E%3Cpath d='M0,-20 Q10,-12 8,-2 Q6,6 0,8 M0,-20 Q-10,-12 -8,-2 Q-6,6 0,8 M0,8 Q8,16 6,26 Q4,30 0,32 M0,8 Q-8,16 -6,26 Q-4,30 0,32' fill='none' stroke='%23D4AF37' stroke-width='2' opacity='0.9' stroke-linecap='round'/%3E%3C!-- 装饰宝石（中心）--%3E%3Ccircle cx='0' cy='0' r='6' fill='%23D4AF37'%3E%3Canimate attributeName='r' values='5;7;5' dur='2.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='0' cy='0' r='4' fill='%23FFD700'%3E%3Canimate attributeName='opacity' values='0.7;1;0.7' dur='1.8s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='0' cy='0' r='2' fill='%23FFF' opacity='0.9'/%3E%3C!-- 三颗小宝石装饰 --%3E%3Ccircle cx='0' cy='-15' r='2.5' fill='%23D4AF37' opacity='0.8'%3E%3Canimate attributeName='opacity' values='0.6;1;0.6' dur='2s' begin='0s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='-10' cy='10' r='2.5' fill='%23D4AF37' opacity='0.8'%3E%3Canimate attributeName='opacity' values='0.6;1;0.6' dur='2s' begin='0.7s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='10' cy='10' r='2.5' fill='%23D4AF37' opacity='0.8'%3E%3Canimate attributeName='opacity' values='0.6;1;0.6' dur='2s' begin='1.4s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C!-- 四角巴洛克装饰叶片（旋转）--%3E%3Cg opacity='0.75'%3E%3Cpath d='M70,8 Q78,10 82,18 Q78,14 70,12' fill='%23D4AF37' stroke='%235c4033' stroke-width='1'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 70 60' to='360 70 60' dur='15s' repeatCount='indefinite'/%3E%3C/path%3E%3Cpath d='M132,60 Q130,68 122,72 Q126,68 128,60' fill='%23D4AF37' stroke='%235c4033' stroke-width='1'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 70 60' to='360 70 60' dur='15s' repeatCount='indefinite'/%3E%3C/path%3E%3Cpath d='M70,112 Q62,110 58,102 Q62,106 70,108' fill='%23D4AF37' stroke='%235c4033' stroke-width='1'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 70 60' to='360 70 60' dur='15s' repeatCount='indefinite'/%3E%3C/path%3E%3Cpath d='M8,60 Q10,52 18,48 Q14,52 12,60' fill='%23D4AF37' stroke='%235c4033' stroke-width='1'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 70 60' to='360 70 60' dur='15s' repeatCount='indefinite'/%3E%3C/path%3E%3C/g%3E%3C!-- 羽毛笔书写效果（右上角优雅划过）--%3E%3Cg opacity='0.8'%3E%3C!-- 羽毛笔主体 --%3E%3Cpath d='M95,25 Q98,28 100,35' stroke='%235c4033' stroke-width='2' fill='none' stroke-linecap='round'%3E%3Canimate attributeName='d' values='M95,25 Q98,28 100,35;M100,30 Q102,33 104,40;M95,25 Q98,28 100,35' dur='4s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0;1;1;0' dur='4s' repeatCount='indefinite'/%3E%3C/path%3E%3C!-- 墨迹点 --%3E%3Ccircle cx='100' cy='35' r='1.5' fill='%238B1C1C'%3E%3Canimate attributeName='r' values='0;2;0' dur='4s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0;0.8;0' dur='4s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C!-- 闪烁金色光点装饰 --%3E%3Ccircle cx='45' cy='35' r='1.5' fill='%23FFD700'%3E%3Canimate attributeName='opacity' values='0;1;0' dur='3s' begin='0s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='95' cy='70' r='1.5' fill='%23FFD700'%3E%3Canimate attributeName='opacity' values='0;1;0' dur='3s' begin='1s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='50' cy='85' r='1.5' fill='%23FFD700'%3E%3Canimate attributeName='opacity' values='0;1;0' dur='3s' begin='2s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    pointer-events: none !important;
    z-index: 1 !important;
}
/* ========================================
   修正：打字效果文字完整显示
   ======================================== */

.flex.items-center.justify-center.size-6::after {
    content: "往者不可谏，来者犹可追" !important;
    position: absolute !important;
    bottom: 18px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: block !important;
    font-family: 'Georgia', 'STKaiti', 'KaiTi', 'SimSun', serif !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    color: #8B1C1C !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    box-sizing: content-box !important;
    border-right: 2.5px solid #8B1C1C !important;
    padding-right: 0.3rem !important;
    letter-spacing: 0.08em !important;
    text-shadow: 
        0 0 4px rgba(139, 28, 28, 0.4),
        0 1px 2px rgba(0, 0, 0, 0.2) !important;
    animation:
        baroqueTyping 7s steps(12, end) infinite,
        baroqueCaret 1s steps(1, end) infinite !important;
    z-index: 2 !important;
}

/* 打字动画：增加宽度和停留时间 */
@keyframes baroqueTyping {
    0%, 5% {
        width: 0;
    }
    65% {
        width: 13em; /* 增加宽度确保容纳所有文字 */
    }
    100% {
        width: 13em; /* 35%的时间(2.45秒)完整显示 */
    }
}

/* 光标闪烁动画 */
@keyframes baroqueCaret {
    0%, 49% {
        border-right-color: #8B1C1C;
    }
    50%, 100% {
        border-right-color: transparent;
    }
}

/* ========================================
   响应式适配（更新移动端宽度）
   ======================================== */

@media (max-width: 480px) {
    .flex.items-center.justify-center.size-6::after {
        font-size: 0.75rem !important;
        bottom: 15px !important;
        border-right-width: 2px !important;
    }
    
    @keyframes baroqueTyping {
        0%, 5% {
            width: 0;
        }
        65%, 100% {
            width: 12em; /* 移动端小字体对应宽度 */
        }
    }
}

@media (max-width: 360px) {
    .flex.items-center.justify-center.size-6::after {
        font-size: 0.7rem !important;
        letter-spacing: 0.05em !important;
    }
    
    @keyframes baroqueTyping {
        0%, 5% {
            width: 0;
        }
        65%, 100% {
            width: 11.5em;
        }
    }
}

/* 低动效模式 */
@media (prefers-reduced-motion: reduce) {
    .flex.items-center.justify-center.size-6::after {
        animation-duration: 10s, 1.5s !important;
    }
}
[class*="bg-[#F1CBCB]"], 
        [class*="bg-[#c9e1e9]"] {
            display: none !important;
        }
.is-user > .border.border-muted,
.is-assistant > .border.border-muted {
    background-color: #f4ecd8;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E"),
        radial-gradient(circle at center, transparent 50%, rgba(74, 14, 14, 0.1) 100%);
    border: 4px double #5c4033; 
    border-radius: 4px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.4),
        inset 0 0 60px rgba(139, 69, 19, 0.15);
    padding: 30px;
    width: 100%;
    max-width: 800px;
    color: #2b1d15;
    font-family: 'Georgia', 'Songti SC', 'SimSun', serif;
    position: relative;
    overflow: visible;
    box-sizing: border-box;
}
.is-assistant > .border.border-muted::after {
    content: "";
    position: absolute !important;
    bottom: 1px !important;
    right: 10px !important;
    width: 140px !important;
    height: 140px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3Cpath id='sealPath' d='M 15,50 A 35,35 0 1,1 85,50 A 35,35 0 1,1 15,50' /%3E%3Cfilter id='ink-blur'%3E%3CfeGaussianBlur in='SourceGraphic' stdDeviation='0.5'/%3E%3C/filter%3E%3C/defs%3E%3C!-- 外圈旋转文字 --%3E%3Ctext fill='rgba(138,28,28,0.12)' font-family='Georgia, serif' font-weight='bold' font-size='10' letter-spacing='2'%3E%3CtextPath href='%23sealPath'%3ETOP SECRET • 1789 • CLASSIFIED •%3C/textPath%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 50 50' to='360 50 50' dur='60s' repeatCount='indefinite'/%3E%3C/text%3E%3C!-- 内圈装饰 --%3E%3Ccircle cx='50' cy='50' r='32' fill='none' stroke='rgba(138,28,28,0.15)' stroke-width='1.5' stroke-dasharray='5,3'/%3E%3Ccircle cx='50' cy='50' r='28' fill='none' stroke='rgba(138,28,28,0.1)' stroke-width='0.5'/%3E%3C!-- 中心徽记 --%3E%3Cpath d='M50 25 L55 40 L70 40 L58 50 L63 65 L50 55 L37 65 L42 50 L30 40 L45 40 Z' fill='rgba(138,28,28,0.08)' stroke='rgba(138,28,28,0.15)' stroke-width='1'/%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    pointer-events: none !important;
    z-index: 0 !important;
    mix-blend-mode: multiply; 
}

.rili-markdown-renderer summary::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    background-size: contain;
    background-repeat: no-repeat;
    transition: filter 0.3s ease;
}
.rili-markdown-renderer summary:hover::before {
    filter: drop-shadow(0 0 2px rgba(138, 28, 28, 0.5));
}

.rili-markdown-renderer details:nth-of-type(3) summary::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' stroke='%235c4033' fill='none' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20' opacity='0.5'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'%3E%3Canimate attributeName='d' values='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z; M12 2a15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1 4-10 15.3 15.3 0 0 1-4-10z; M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z' dur='4s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
}

.rili-markdown-renderer details:nth-of-type(4) summary::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' stroke='%238a1c1c' fill='none' stroke-width='1.5'%3E%3Cpath d='M12 3v18' opacity='0.5'/%3E%3Cg%3E%3Cpath d='M6 6h12l-6-3z'/%3E%3Cpath d='M6 6L3 12h6zM18 6l-3 6h6z'/%3E%3CanimateTransform attributeName='transform' type='rotate' values='-5 12 3; 5 12 3; -5 12 3' dur='6s' repeatCount='indefinite'/%3E%3C/g%3E%3C/svg%3E");
}

.rili-markdown-renderer details:nth-of-type(8) summary::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' stroke='%235c4033' fill='none' stroke-width='1.5'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3Cpath d='M12 6h5' stroke='%238a1c1c' stroke-dasharray='5'%3E%3Canimate attributeName='d' values='M12 6h5; M12 10h5; M12 14h5; M12 6h5' dur='3s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
}


.rili-markdown-renderer {
    --primary-color: #2b1d15;
    --accent-color: #8a1c1c;
    --accent-color-rgb: 138, 28, 28;
    --secondary-color: #5c4033;
    --overlay-bg-color: #1a1510;
    --gold-color: #b8860b;
    font-size: 15px;
    line-height: 1.6;
}
.rili-markdown-renderer top_status,
.rili-markdown-renderer world_news,
.rili-markdown-renderer news_item,
.rili-markdown-renderer faction_panel,
.rili-markdown-renderer player_panel,
.rili-markdown-renderer npc_panel,
.rili-markdown-renderer surrounding_panel,
.rili-markdown-renderer archive_panel,
.rili-markdown-renderer choice,
.rili-markdown-renderer opt,
.rili-markdown-renderer list,
.rili-markdown-renderer attr_list,
.rili-markdown-renderer trait_list,
.rili-markdown-renderer equip_list,
.rili-markdown-renderer network_list,
.rili-markdown-renderer clothing_section {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* 信息标签样式 */
.rili-markdown-renderer info {
    display: inline; /* 保持内联以配合文本流 */
    font-weight: bold;
    color: var(--accent-color);
    margin-right: 4px;
}

.rili-markdown-renderer details {
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(92, 64, 51, 0.3);
    padding-bottom: 10px;
}

.rili-markdown-renderer summary {
    list-style: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    color: var(--secondary-color);
    padding: 6px 0 6px 30px;
    position: relative;
    transition: color 0.3s;
    font-variant: small-caps;
    letter-spacing: 1px;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(to right, transparent, var(--accent-color), transparent) 1;
}

.rili-markdown-renderer summary::-webkit-details-marker {
    display: none;
}

.rili-markdown-renderer summary::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a1c1c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10' opacity='0.5'/%3E%3Cpath d='M12 2L12 22M2 12L22 12'/%3E%3Cpath d='M12 2 L14 8 L22 12 L14 16 L12 22 L10 16 L2 12 L10 8 Z' fill='%238a1c1c' fill-opacity='0.2'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='10s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
}

.rili-markdown-renderer details[open] > summary::before {
    filter: brightness(1.2);
    transform: translateY(-50%) scale(1.1);
}

.rili-markdown-renderer summary:hover {
    color: var(--accent-color);
    text-shadow: 0 0 1px rgba(138, 28, 28, 0.3);
}

.rili-markdown-renderer top_status {
    padding: 15px;
    background: rgba(0,0,0,0.03);
    border: 1px dashed #8d6e63;
    margin-top: 10px;
    line-height: 1.8;
    font-family: 'Courier New', monospace;
}

.rili-markdown-renderer top_status info::before {
    content: "✦ ";
    color: var(--gold-color);
    font-size: 0.8em;
}

.rili-markdown-renderer world_news {
    display: block;
    background-color: #fcfcfc; /* 邸报纸张稍白 */
    background-image: linear-gradient(#e0e0e0 1px, transparent 1px);
    background-size: 100% 28px; /* 行线 */
    padding: 15px;
    border: 1px solid #ccc;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
    position: relative;
}

/* 警告框 */
.rili-markdown-renderer warning {
    display: block;
    background: rgba(138, 28, 28, 0.1);
    border-left: 4px solid var(--accent-color);
    padding: 10px;
    margin-bottom: 15px;
    font-style: italic;
    font-size: 0.9em;
}

.rili-markdown-renderer news {
    display: block;
    text-align: center;
    font-weight: bold;
    font-size: 1.1em;
    margin: 20px 0 10px 0;
    border-bottom: 2px double #000;
    padding-bottom: 5px;
}

.rili-markdown-renderer news::before, .rili-markdown-renderer news::after {
    content: " ❖ ";
    color: var(--accent-color);
}

/* 新闻条目 */
.rili-markdown-renderer news_item {
    display: block;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #999;
}

.rili-markdown-renderer tag {
    display: inline-block;
    padding: 2px 6px;
    margin-right: 6px;
    font-size: 0.8em;
    border-radius: 2px;
    color: #fff;
    font-weight: bold;
    vertical-align: text-bottom;
}

.rili-markdown-renderer tag[type="pinned"] { background-color: #d4af37; box-shadow: 0 0 5px #d4af37; } /* 圣谕金 */
.rili-markdown-renderer tag[type="chat"] { background-color: #556b2f; } /* 军报绿 */
.rili-markdown-renderer tag[type="hot"] { background-color: #8a1c1c; animation: pulse 2s infinite; } /* 紧急红 */
.rili-markdown-renderer tag[type="new"] { background-color: #4682b4; } /* 异闻蓝 */
.rili-markdown-renderer tag[type="academic"] { background-color: #2f4f4f; } /* 官方黑 */
.rili-markdown-renderer tag[type="gossip"] { background-color: #cd853f; } /* 流言褐 */

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.rili-markdown-renderer content {
    display: inline;
}

.rili-markdown-renderer author {
    display: inline-block;
    margin-left: 5px;
    font-size: 0.85em;
    color: #666;
    font-style: italic;
}

.rili-markdown-renderer faction_panel event {
    display: block;
    padding: 8px;
    background: rgba(255, 255, 255, 0.4);
    border-left: 3px solid var(--secondary-color);
    font-family: 'KaiTi', serif;
}
.rili-markdown-renderer faction_panel list li {
    list-style: none;
    padding: 8px 10px 8px 35px; /* 留出图标位置 */
    margin: 5px 0;
    background: rgba(255,255,255,0.3);
    border-left: 3px solid transparent;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    cursor: crosshair;
    border-bottom: 1px dotted rgba(0,0,0,0.1);
}

/* 默认图标 */
.rili-markdown-renderer faction_panel list li::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c4033' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.6;
    transition: all 0.3s;
}

/* Hover 效果 */
.rili-markdown-renderer faction_panel list li:hover {
    background: rgba(138, 28, 28, 0.05);
    border-left-color: var(--accent-color);
    padding-left: 45px; /* 文字右移 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.rili-markdown-renderer faction_panel list li:hover::before {
    opacity: 1;
    transform: translateY(-50%) scale(1.2);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a1c1c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E");
}

.rili-markdown-renderer player_panel header {
    display: block;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.1em;
    font-weight: bold;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 5px;
}
.rili-markdown-renderer player_panel header::before {
    content: "◈ ";
    color: var(--accent-color);
}

/* 属性网格系统 */
.rili-markdown-renderer attr_list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}
/* 覆盖 T 标签在网格中的样式 */
.rili-markdown-renderer attr_list T {
    width: auto !important;
    margin: 0 !important;
    background: #fff8e1;
    border: 1px solid #d7ccc8;
}

/* 生命值与士气 - 视觉化条 */
.rili-markdown-renderer player_panel status {
    display: block;
    margin: 8px 0;
    padding: 5px 10px;
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
    border-left: 5px solid #8a1c1c; /* HP Red */
}
.rili-markdown-renderer player_panel status:nth-of-type(2) {
    border-left-color: #1976d2; /* Morale Blue */
}

/* 特质列表 */
.rili-markdown-renderer trait_list li {
    list-style: none;
    padding: 5px 0;
    border-bottom: 1px dotted #aaa;
    color: #424242;
}

/* 装备栏 - Strong 标签作为分割线 */
.rili-markdown-renderer equip_list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
/* 专门针对装备列表中的 T 标签内的 strong 进行样式重写 */
.rili-markdown-renderer equip_list T strong {
    display: block; /* 强制独占一行 */
    width: 100%;
    background-color: var(--secondary-color);
    color: #fff;
    padding: 2px 8px;
    margin-bottom: 5px;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 2px;
    position: relative;
}
/* 装饰性箭头 */
.rili-markdown-renderer equip_list T strong::after {
    content: "▼";
    position: absolute;
    right: 8px;
    font-size: 0.8em;
    opacity: 0.7;
}

/* Tooltip 基础样式 (保留第一次设计，适配新布局) */
.rili-markdown-renderer T {
    position: relative;
    display: block;
    width: 96%;
    margin: 5px auto;
    padding: 0.5em 0.8em;
    text-align: center;
    color: var(--primary-color);
    background: rgba(var(--accent-color-rgb), 0.05);
    border: 1px solid rgba(var(--accent-color-rgb), 0.2);
    border-radius: 2px;
    cursor: help;
    transition: all 0.3s ease;
}
.rili-markdown-renderer T:hover {
    background: rgba(var(--accent-color-rgb), 0.1);
    border-color: var(--accent-color);
}
.rili-markdown-renderer T Ti {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    z-index: 1500;
    width: 260px;
    padding: 1em;
    border-radius: 4px;
    background-color: var(--overlay-bg-color);
    color: #dcdcdc;
    border: 1px solid var(--gold-color);
    pointer-events: none;
    white-space: normal;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
}
.rili-markdown-renderer T:hover Ti {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}


.rili-markdown-renderer npc_panel {
    border: 1px solid rgba(184, 134, 11, 0.5);
    padding: 15px;
    background: rgba(0,0,0,0.02);
    position: relative;
}
/* 角落装饰 */
.rili-markdown-renderer npc_panel::before {
    content: "";
    position: absolute;
    top: -1px; left: -1px;
    width: 20px; height: 20px;
    border-top: 3px solid var(--gold-color);
    border-left: 3px solid var(--gold-color);
}
.rili-markdown-renderer npc_panel::after {
    content: "";
    position: absolute;
    bottom: -1px; right: -1px;
    width: 20px; height: 20px;
    border-bottom: 3px solid var(--gold-color);
    border-right: 3px solid var(--gold-color);
}
/* 关系网 */
.rili-markdown-renderer network_list li {
    list-style: none;
    padding: 5px;
    margin-bottom: 5px;
    background: #fff;
    border: 1px solid #ddd;
    border-left: 3px solid #795548;
}
/* 强制 info 换行显示，避免重叠 */
.rili-markdown-renderer npc_panel > info {
    display: block;
    margin-bottom: 6px;
    border-bottom: 1px dashed rgba(0,0,0,0.1);
    padding-bottom: 2px;
}

.rili-markdown-renderer clothing_section {
    display: block;
    margin-left: 15px;
    padding: 10px;
    background: rgba(255,255,255,0.4);
    border-left: 2px solid var(--secondary-color);
    margin-bottom: 10px;
}
.rili-markdown-renderer clothing_section info {
    display: block; /* 服装每项独占一行 */
}


.rili-markdown-renderer surrounding_panel {
    display: block;
    padding: 12px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid #ccc;
    border-left: 4px solid var(--secondary-color);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}
/* 悬浮 SVG 装饰 */
.rili-markdown-renderer surrounding_panel::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 10px;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c4033' stroke-width='2'%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.3;
}

.rili-markdown-renderer surrounding_panel:hover {
    transform: translateX(5px);
    box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
    background: #fff;
}


.rili-markdown-renderer archive_panel hr {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, transparent, var(--accent-color), transparent);
    margin: 25px 0;
    position: relative;
}
/* 分割线装饰 */
.rili-markdown-renderer archive_panel hr::after {
    content: "§";
    position: absolute;
    left: 50%;
    top: -12px;
    transform: translateX(-50%);
    background: #f4ecd8; /* 与大背景同色 */
    padding: 0 10px;
    color: var(--accent-color);
    font-size: 1.2em;
}
.rili-markdown-renderer archive_panel table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.9em;
}
.rili-markdown-renderer archive_panel th {
    background: var(--secondary-color);
    color: #fff;
    padding: 8px;
    text-align: left;
}
.rili-markdown-renderer archive_panel td {
    border: 1px solid #ccc;
    padding: 6px;
}

.rili-markdown-renderer choice {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px;
}

.rili-markdown-renderer opt {
    display: block;
    position: relative;
    padding: 15px 20px 15px 40px;
    background: #fff;
    border: 1px solid #8d6e63;
    color: #3e2723;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 2px 2px 0px #5d4037;
    z-index: 1;
    overflow: hidden;
}

/* 选项字母序号装饰 */
.rili-markdown-renderer opt::first-letter {
    font-size: 1.2em;
    color: #8a1c1c;
    margin-right: 5px;
}

/* Hover 时的动态墨迹扩散效果 */
.rili-markdown-renderer opt::before {
    content: "";
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: #8a1c1c;
    z-index: -1;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease-in-out;
}

.rili-markdown-renderer opt:hover {
    color: #fff;
    border-color: #8a1c1c;
    transform: translateY(-2px);
    box-shadow: 4px 4px 0px #3e2723;
}
.rili-markdown-renderer opt:hover::first-letter {
    color: #fff;
}
.rili-markdown-renderer opt:hover::before {
    transform: scaleX(1);
}

/* =========================================
    📜 模块：法兰西之声 · 权力博弈 (Power Play Voices)
    重塑：去扁平化、增加物理质感、阵营极端区分
   ========================================= */

/* 通用容器：赋予对话深度感 */
span[class^="say-"] {
    display: block;
    margin: 2em 0;
    padding: 18px 25px;
    position: relative;
    font-size: 15px;
    line-height: 1.8;
    box-sizing: border-box;
}

/* 🗡️ 玩家/主角：【共和国公民证】 (The Civic ID) 
   设计：干净、坚硬、具有法律效力的石板质感 */
.say-pc {
    background: #ffffff;
    color: #1a1a1a;
    border: 2px solid #2c3e50;
    font-family: var(--font-serif);
    /* 装饰：左侧的三色绶带，象征立场 */
    border-left: 10px solid transparent;
    border-image: linear-gradient(to bottom, #1a237e 33%, #ffffff 33%, #ffffff 66%, #8b0000 66%) 1;
    box-shadow: 8px 8px 0px rgba(44, 62, 80, 0.1);
}
.say-pc::before {
    content: "REP. FRANÇAISE";
    position: absolute;
    top: -12px;
    left: 20px;
    font-size: 10px;
    font-weight: 900;
    background: #2c3e50;
    color: #fff;
    padding: 2px 10px;
    letter-spacing: 2px;
}

/* ⚜️ 保皇派：【凡尔赛蓝金大理石】 (Versailles Majesty) 
   设计：深蓝底色、金箔刻字，极其显眼且傲慢 */
.say-royal {
    background: linear-gradient(135deg, #0d124a 0%, #1a237e 100%);
    color: #c5a059 !important;
    font-family: var(--font-serif);
    font-style: italic;
    border: 1px solid #c5a059;
    /* 装饰：复杂的金边框架 */
    outline: 2px solid #c5a059;
    outline-offset: -6px;
    padding: 25px 35px !important;
    text-shadow: 0px 1px 2px rgba(0,0,0,0.8);
    box-shadow: 0 10px 30px rgba(13, 18, 74, 0.4);
}
/* 阵营标志：取代 Emoji 的几何纹章 */
.say-royal::after {
    content: "⚜"; /* 使用标准字符但通过 CSS 放大 */
    position: absolute;
    right: 15px;
    bottom: 5px;
    font-size: 40px;
    color: rgba(197, 160, 89, 0.15);
    font-style: normal;
}

/* ⚖️ 立宪派：【内克尔的秘密档案】 (The Secret Dossier) 
   设计：陈旧的牛皮纸、大量的火漆印章印记，极其明显的办公感 */
.say-const {
    background-color: #f4ecd8;
    background-image: radial-gradient(#d4c5a3 0.5px, transparent 0.5px);
    background-size: 15px 15px;
    color: #2c3e50;
    border: 1px solid #d4c5a3;
    font-family: var(--font-mono);
    /* 模拟文件夹的折角 */
    clip-path: polygon(0 0, 95% 0, 100% 10%, 100% 100%, 0 100%);
    box-shadow: 4px 4px 15px rgba(0,0,0,0.1);
}
/* 右下角火漆印章 */
.say-const::after {
    content: "OFFICIEL";
    position: absolute;
    right: 20px;
    top: -10px;
    background: #8b0000;
    color: #fff;
    font-size: 9px;
    padding: 2px 8px;
    transform: rotate(5deg);
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}

/* 🔥 激进派：【圣安东尼区的焦灼传单】 (The Scorched Manifesto) 
   设计：黑红撞色、边缘不规则、视觉冲击力极强 */
.say-radi {
    background: #1a1a1a;
    color: #e74c3c !important;
    font-weight: 900;
    font-family: var(--font-sans);
    border: none;
    /* 边缘烧焦效果 */
    mask-image: linear-gradient(45deg, #000 95%, transparent 100%), 
                linear-gradient(-45deg, #000 95%, transparent 100%);
    padding: 20px 30px !important;
    border-left: 5px solid #8b0000;
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.2);
}
.say-radi::before {
    content: "LIBERTÉ";
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    font-size: 8px;
    color: #8b0000;
}

/* 🎭 阴谋家：【菲利普的丝绒耳语】 (The Velvet Whisper) 
   设计：深紫色渐变、模糊的边缘、如同影子般浮现 */
.say-shade {
    background: linear-gradient(to right, #2e1a47, #1a0f2e);
    color: #b39ddb !important;
    border: none;
    border-right: 4px solid #4a235a;
    padding-left: 40px !important;
    font-style: italic;
    /* 阴影扩散，产生一种不稳定的模糊感 */
    box-shadow: inset 0 0 20px rgba(0,0,0,0.6);
    filter: drop-shadow(0 5px 10px rgba(46, 26, 71, 0.5));
}

/* 💥 震撼：【断头台的震颤】 (The Great Shout) */
.shout {
    display: block;
    background: #fff;
    color: #000;
    font-size: 1.5em;
    font-weight: 900;
    text-align: center;
    border: 5px double #000;
    padding: 20px;
    margin: 30px 0;
    text-transform: uppercase;
    letter-spacing: 5px;
    /* 强力的动态投影 */
    box-shadow: 15px 15px 0px #8b0000;
    animation: megaShake 0.5s infinite;
}

/* 🎬 动效补丁 */
@keyframes megaShake {
    0% { transform: translate(0,0); }
    25% { transform: translate(2px, 2px); }
    50% { transform: translate(-2px, -2px); }
    75% { transform: translate(1px, -1px); }
    100% { transform: translate(0,0); }
}

/* 🌙 夜间模式适配：增加对比度 */
@media (prefers-color-scheme: dark) {
    .say-pc { background: #1a1a1a; color: #fff; border-color: #555; }
    .say-const { background-color: #2c2c2c; color: #d4c5a3; border-color: #444; }
}

/* ===================================================================
   📜 模块五：革命与公文 (Input & Controls - 1789 Edition)
   设计：凡尔赛书案、三色胸章、路易火漆、秘密档案
   =================================================================== */

/* --- 1. 输入框：巴士底狱公文纸 (Revolutionary Document) --- */
#ai-chat-input, 
textarea, 
input[type="text"] {
    /* 📜 材质：陈旧的拉德内纸 (Parchment Texture) */
    background-color: #f4f1ea !important;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E"),
        linear-gradient(rgba(43, 43, 43, 0.02) 1px, transparent 1px) !important;
    background-size: 100% 100%, 100% 28px !important; /* 模拟行线 */
    
    /* 🖼️ 边框：古铜色双线边框 */
    border: 1px solid #d4c5a3 !important;
    border-left: 4px solid #8b0000 !important; /* 左侧血红线条，暗示革命的激进 */
    border-radius: 2px !important;
    
    /* 🖋️ 字体：衬线体，模仿羽毛笔书写 */
    font-family: 'Georgia', 'Times New Roman', serif !important;
    color: #2b2b2b !important;
    font-size: 16px !important;
    line-height: 1.8 !important;
    
    padding: 12px 15px !important;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1), inset 0 0 10px rgba(93, 64, 55, 0.05) !important;
    transition: all 0.3s ease !important;
}

/* 聚焦态：提笔书写 (Ink Absorption) */
#ai-chat-input:focus, 
textarea:focus, 
input[type="text"]:focus {
    outline: none !important;
    background-color: #fffdf9 !important;
    border-color: #c5a059 !important; /* 聚焦时变为宫廷金 */
    box-shadow: 
        0 0 8px rgba(197, 160, 89, 0.3),
        inset 0 0 5px rgba(0, 0, 0, 0.05) !important;
}

/* --- 2. 通用按钮：革命胸章与火漆 (The Cockade & Seal) --- */
.MuiButtonBase-root, 
button, 
.btn,
[role="button"] {
    /* 🎖️ 材质：模仿黄铜或硬纸质地 */
    background: #e8e8e8 !important;
    border: 1px solid #2c3e50 !important; /* 立宪派墨水蓝边框 */
    color: #2c3e50 !important;
    
    font-family: 'Georgia', serif !important;
    font-weight: 700 !important;
    text-transform: uppercase !important; /* 革命口号通常大写 */
    letter-spacing: 1px !important;
    border-radius: 0 !important; /* 方正的官印感 */
    padding: 8px 16px !important;
    
    /* 装饰：左侧的三色条纹（蓝-白-红）*/
    border-left: 6px solid transparent !important;
    border-image: linear-gradient(to bottom, #1a237e 33%, #fff 33%, #fff 66%, #8b0000 66%) 1 !important;
    
    box-shadow: 3px 3px 0px #2c3e50 !important; /* 块状阴影 */
    transform: translate(0, 0) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* 交互态：革命者的决意 */
.MuiButtonBase-root:hover, 
button:hover, 
.btn:hover,
[role="button"]:hover {
    background: #2c3e50 !important; /* 变为深墨水色 */
    color: #c5a059 !important;      /* 浮现宫廷金文字 */
    border-color: #c5a059 !important;
    transform: translate(-1px, -1px) !important;
    box-shadow: 5px 5px 0px #8b0000 !important; /* 阴影变为革命红 */
}

.MuiButtonBase-root:active, 
button:active {
    transform: translate(2px, 2px) !important;
    box-shadow: none !important;
}

/* --- 3. 功能区特化：机密档案标签 (Classified Tags) --- */
.flex.w-full.items-center.justify-between.gap-2.px-2 button,
.MuiButton-sizeSmall {
    font-size: 11px !important;
    padding: 2px 8px !important;
    background: rgba(197, 160, 89, 0.1) !important; /* 浅金底 */
    border: 1px dashed #c5a059 !important;
    color: #5d4037 !important;
    box-shadow: none !important;
    border-left: none !important; /* 取消大按钮的条纹 */
}

.flex.w-full.items-center.justify-between.gap-2.px-2 button:hover,
.MuiButton-sizeSmall:hover {
    background: #8b0000 !important; /* 悬停变为警告红 */
    color: #fff !important;
    border-style: solid !important;
}

/* --- 4. 🌙 秘密行动模式：午夜巴黎 (Midnight Paris) --- */
@media (prefers-color-scheme: dark) {
    /* 输入框：墨池档案 */
    #ai-chat-input, textarea, input[type="text"] {
        background-color: #1a1510 !important; /* 阴谋深棕 */
        border-color: #4a235a !important;     /* 阴谋紫边缘 */
        color: #dcdcdc !important;
        box-shadow: inset 0 2px 10px rgba(0,0,0,0.7) !important;
    }

    /* 按钮：黑铁令牌 (Black Iron Seal) */
    .MuiButtonBase-root, button, .btn {
        background: #1a1a1a !important;       /* 火药黑 */
        border-color: #8b0000 !important;
        color: #8b0000 !important;
        box-shadow: 3px 3px 0px #000 !important;
    }
    
    /* 按钮悬停：流血的黄金 */
    .MuiButtonBase-root:hover, button:hover {
        background: #8b0000 !important;
        color: #c5a059 !important;
        border-color: #c5a059 !important;
        box-shadow: 0 0 15px rgba(139, 0, 0, 0.5) !important;
    }
}

/* ===================================================================
   📜 模块十一 · 顶栏：双相纪元 (The Dual Era Header)
   设计：凡尔赛金色卷草纹 x 革命三色绶带
   =================================================================== */

/* 1. 顶部容器溢出修复，确保装饰元素可见 */
header.flex.justify-between.w-full.top-0 .flex.items-center.justify-between.w-full.relative {
    overflow: visible !important;
}

/* 2. 左侧：旧制度的挽歌 (Versailles Elegance) */
#nav-middle::before {
    content: "⚜️ L'État, c'est moi" !important; /* "朕即国家" - 路易十四 */
    position: absolute !important;
    right: 100% !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    
    /* 🖋️ 字体：古典波旁王室风格 */
    font-family: 'Georgia', 'Times New Roman', serif !important;
    font-size: 12px !important;
    font-style: italic !important;
    font-weight: bold !important;
    letter-spacing: 2px !important;
    white-space: nowrap !important;
    margin-right: 30px !important;
    
    /* ✨ 视觉：黄金流沙效果 */
    color: #c5a059 !important; /* 宫廷金  */
    text-shadow: 0 0 8px rgba(197, 160, 89, 0.4) !important;
    
    /* 🎨 装饰：巴洛克卷草纹边框 */
    padding: 4px 12px !important;
    border-bottom: 1px solid #c5a059 !important;
    mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent) !important;
    
    /* 🎞️ 动效：呼吸闪烁，如同摇曳的烛光 */
    animation: versaillesGlow 4s ease-in-out infinite !important;
    pointer-events: none !important;
}

/* 3. 右侧：共和的战歌 (The Republican Anthem) */
#nav-middle::after {
    content: "LIBERTÉ · OU · LA · MORT ⚔️" !important; /* "自由或死亡" */
    position: absolute !important;
    left: 100% !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    
    /* 🖋️ 字体：激进派标语风格（无衬线，厚重） */
    font-family: 'Helvetica Neue', 'Arial', sans-serif !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: 1px !important;
    white-space: nowrap !important;
    margin-left: 30px !important;
    
    /* ✨ 视觉：鲜血与硝烟 */
    color: #8b0000 !important; /* 革命红 [cite: 146] */
    
    /* 🎨 装饰：革命三色绶带底衬 (蓝-白-红) */
    padding: 4px 15px !important;
    background: linear-gradient(90deg, 
        rgba(26, 35, 126, 0.1) 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(139, 0, 0, 0.1) 100%) !important;
    border-bottom: 2px solid #8b0000 !important;
    
    /* 🎞️ 动效：轻微震动，模拟战鼓感 */
    animation: revolutionShake 5s ease-in-out infinite !important;
    pointer-events: none !important;
}

/* =========================================
   🎬 专属动效定义
   ========================================= */

/* 宫廷金：烛光呼吸效果 */
@keyframes versaillesGlow {
    0%, 100% { opacity: 0.6; filter: brightness(1) drop-shadow(0 0 2px #c5a059); }
    50% { opacity: 1; filter: brightness(1.3) drop-shadow(0 0 10px #ffeb3b); }
}

/* 革命红：战火震颤效果 [cite: 177] */
@keyframes revolutionShake {
    0%, 90%, 100% { transform: translateY(-50%) translateX(0); }
    92% { transform: translateY(-50%) translateX(2px); }
    94% { transform: translateY(-50%) translateX(-2px); }
    96% { transform: translateY(-50%) translateX(1px); }
    98% { transform: translateY(-50%) translateX(-1px); }
}

/* --- 🌙 夜间模式：幽灵般的历史余音 --- */
@media (prefers-color-scheme: dark) {
    #nav-middle::before {
        color: rgba(197, 160, 90, 0.5) !important;
        text-shadow: 0 0 15px rgba(197, 160, 90, 0.2) !important;
    }
    #nav-middle::after {
        color: rgba(231, 76, 60, 0.6) !important;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
        background: linear-gradient(90deg, 
            rgba(26, 35, 126, 0.2) 0%, 
            rgba(0, 0, 0, 0.3) 50%, 
            rgba(139, 0, 0, 0.2) 100%) !important;
    }
}

/* --- 📱 移动端自适应：隐藏复杂装饰以确保操作性 --- */
@media screen and (max-width: 1200px) {
    #nav-middle::before,
    #nav-middle::after {
        font-size: 10px !important;
        margin: 0 10px !important;
    }
}

@media screen and (max-width: 1024px) {
    #nav-middle::before,
    #nav-middle::after {
        display: none !important; /* 彻底移除，防止遮挡模型切换按钮 */
    }
}

/* ===================================================================
   📜 模块十一 · 终极补丁：历史的重量 (The Epoch Weights)
   设计：凡尔赛蓝金大理石 x 巴士底狱硝烟花岗岩
   去 Emoji 化 | 增强材质感 | 叙事性深度升级
   =================================================================== */

/* 1. 顶栏容器强化：确保装饰件拥有足够的溢出空间 */
header.flex.justify-between.w-full.top-0 .flex.items-center.justify-between.w-full.relative {
    overflow: visible !important;
    perspective: 1000px; /* 为可能的 3D 效果做准备 */
}

/* 2. 左侧：【波旁王权 · 永恒大理石】 (Ancien Régime - Marble & Gold) */
#nav-middle::before {
    /* 叙事内容：双行设计，增加厚重感 */
    content: "SOUVERAINETÉ SACRÉE\A L'AUTORITÉ DU TRÔNE" !important; 
    white-space: pre !important; /* 支持 \A 换行 */
    position: absolute !important;
    right: calc(100% + 40px) !important;
    top: 50% !important;
    transform: translateY(-50%) rotateY(10deg) !important; /* 微微侧倾，增加立体感 */
    
    /* 🏛️ 材质：皇家蓝大理石底座 */
    background: linear-gradient(135deg, #1a237e 0%, #0d124a 100%) !important;
    background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='marble'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.03' numOctaves='5' /%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.2 0' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23marble)' opacity='0.3'/%3E%3C/svg%3E") !important;
    
    /* 🖋️ 字体：金箔压印 */
    font-family: 'Georgia', serif !important;
    font-size: 10px !important;
    line-height: 1.4 !important;
    text-align: right !important;
    color: #c5a059 !important;
    font-weight: 900 !important;
    letter-spacing: 0.15em !important;
    text-shadow: 0 1px 0 rgba(0,0,0,0.8), 0 0 5px rgba(197, 160, 89, 0.5) !important;

    /* 🖼️ 边框：双线金边框架 */
    padding: 8px 15px !important;
    border: 2px solid #c5a059 !important;
    outline: 1px solid #c5a059 !important;
    outline-offset: -5px !important;
    box-shadow: 
        5px 5px 15px rgba(0,0,0,0.4),
        inset 0 0 15px rgba(0,0,0,0.5) !important;

    /* 🎞️ 动效：权力之光闪烁 */
    animation: royalPulse 6s ease-in-out infinite !important;
}

/* 3. 右侧：【共和意志 · 硝烟纪念碑】 (Republic - Granite & Blood) */
#nav-middle::after {
    /* 叙事内容：双行设计 */
    content: "VOLONTÉ NATIONALE\A LA RÉPUBLIQUE OU LA MORT" !important;
    white-space: pre !important;
    position: absolute !important;
    left: calc(100% + 40px) !important;
    top: 50% !important;
    transform: translateY(-50%) rotateY(-10deg) !important;

    /* 🧱 材质：被硝烟熏黑的花岗岩 */
    background: linear-gradient(135deg, #2b2b2b 0%, #1a1a1a 100%) !important;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.5' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23grain)' opacity='0.1'/%3E%3C/svg%3E") !important;

    /* 🖋️ 字体：凿刻血迹 */
    font-family: 'Arial Black', sans-serif !important;
    font-size: 10px !important;
    line-height: 1.4 !important;
    text-align: left !important;
    color: #e74c3c !important; /* 革命红 */
    font-weight: 900 !important;
    letter-spacing: 0.05em !important;
    text-shadow: 
        1px 1px 0px #8b0000,
        0px 0px 8px rgba(231, 76, 60, 0.4) !important;

    /* 🖼️ 边框：沉重黑铁与血染丝带 */
    padding: 8px 15px !important;
    border: 2px solid #8b0000 !important;
    border-bottom: 4px solid #8b0000 !important; /* 底部加厚，像底座 */
    box-shadow: 
        -5px 5px 15px rgba(0,0,0,0.4),
        inset 0 0 20px rgba(0,0,0,0.6) !important;

    /* 🎞️ 动效：革命的震颤 */
    animation: republicTremor 8s linear infinite !important;
}

/* =========================================
   🎬 超强大动效定义
   ========================================= */

/* 王室光辉：缓慢的金属反光掠过感 */
@keyframes royalPulse {
    0%, 100% { filter: contrast(1.1) brightness(1); }
    50% { filter: contrast(1.2) brightness(1.2); box-shadow: 0 0 25px rgba(197, 160, 89, 0.4); }
}

/* 革命震颤：长间隔后的剧烈波动（模拟街道上的炮声） */
@keyframes republicTremor {
    0%, 94% { transform: translateY(-50%) rotateY(-10deg) scale(1); }
    95% { transform: translateY(-50.5%) rotateY(-10deg) scale(1.02); filter: brightness(1.5); }
    96% { transform: translateY(-49.5%) rotateY(-10deg) scale(0.98); }
    97% { transform: translateY(-50%) rotateY(-10deg) scale(1.01); }
    98% { transform: translateY(-50%) rotateY(-10deg) scale(1); filter: brightness(1); }
}

/* --- 🌙 夜间模式：幽灵般的历史残影 --- */
@media (prefers-color-scheme: dark) {
    #nav-middle::before {
        background: linear-gradient(135deg, #0a0e2a 0%, #000 100%) !important;
        border-color: #8a6d3b !important;
        color: #8a6d3b !important;
    }
    #nav-middle::after {
        background: linear-gradient(135deg, #1a1a1a 0%, #000 100%) !important;
        border-color: #5d0000 !important;
        color: #c0392b !important;
    }
}

/* --- 📱 移动端自适应：彻底移除装饰以保核心交互 --- */
@media screen and (max-width: 1350px) {
    #nav-middle::before,
    #nav-middle::after {
        transform: translateY(-50%) scale(0.8) !important;
        margin: 0 10px !important;
    }
}

@media screen and (max-width: 1100px) {
    #nav-middle::before,
    #nav-middle::after {
        display: none !important;
    }
}

/* ===================================================================
   🖌️ 模块十二：下半部交互区 (The Revolutionary Bureau)
   设计：议会书案、火漆封蜡、黄铜印章、征兵公报
   =================================================================== */

/* 1. 底部整体渐变背景：战火后的余烬 (Vignette of Paris) */
.bg-gradient-to-t.from-white {
    background: linear-gradient(to top, 
        #f4f1ea 0%, 
        rgba(244, 241, 234, 0.95) 40%, 
        rgba(244, 241, 234, 0) 100%) !important;
    backdrop-filter: blur(2px) !important;
}

/* 2. 功能按钮区 (Mod/流式/思维链)：国民议会黄铜签 (Brass Assembly Tokens) */
#ai-mod-button2 button,
.MuiButton-outlinedSizeSmall {
    /* 🎖️ 材质：拉丝黄铜感 */
    background: linear-gradient(145deg, #e8e8e8, #d4c5a3) !important;
    border: 1px solid #c5a059 !important; /* 宫廷金边 */
    color: #2c3e50 !important; /* 墨水蓝字 */
    
    font-family: 'Georgia', serif !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-size: 11px !important;
    
    /* 🛡️ 立体感：金属牌边缘阴影 */
    box-shadow: 
        1px 1px 0px #b8860b,
        2px 2px 3px rgba(0,0,0,0.2) !important;
    margin-bottom: 6px !important;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    border-radius: 0 !important; /* 坚硬的几何感 */
}

#ai-mod-button2 button:hover {
    background: #2c3e50 !important; /* 变为激进派黑蓝 */
    color: #fff !important;
    border-color: #8b0000 !important; /* 浮现革命红 */
    transform: scale(1.05) !important;
    box-shadow: 0 0 12px rgba(139, 0, 0, 0.4) !important;
}

/* 特殊：思维链/高亮状态 (极速升温) */
#ai-mod-button2 button[class*="selected"], 
#ai-mod-button2 button:contains("开启") {
    background: #8b0000 !important;
    color: #fff !important;
    border: 1px solid #ffeb3b !important;
    animation: urgentPulse 2s infinite !important;
}

/* 3. 输入框容器：革命请愿书 (The People's Petition) */
.border-gray-200.rounded-xl.border-grey-300 {
    /* 📜 材质：陈旧厚重的公文纸 */
    background-color: #fcfaf2 !important;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h40v40H0V0zm1 1v38h38V1H1z' fill='%23d4c5a3' fill-opacity='0.05'/%3E%3C/svg%3E") !important;
    
    border: 1px solid #2c3e50 !important;
    border-top: 5px solid #2c3e50 !important; /* 像公文夹的铁封条 */
    border-radius: 0 !important;
    box-shadow: 
        0 10px 25px rgba(0,0,0,0.1),
        inset 0 0 40px rgba(212, 197, 163, 0.2) !important;
}

/* 输入框本体：羽毛笔笔触 */
#ai-chat-input {
    background: transparent !important;
    font-family: 'Georgia', 'Songti SC', serif !important;
    color: #1a1a1a !important;
    line-height: 1.8 !important;
    caret-color: #8b0000 !important; /* 红色光标，如滴血 */
}

/* 4. 发送按钮：路易十六的火漆印 (The Royal/Revolutionary Seal) */
#ai-send-button, 
.group.flex.items-center.justify-center.w-8.h-8 {
    background: #8b0000 !important; /* 火漆红 */
    border: 2px solid #5d0000 !important;
    color: #fff !important;
    border-radius: 50% !important; /* 圆形印章感 */
    width: 42px !important;
    height: 42px !important;
    box-shadow: 
        0 2px 5px rgba(0,0,0,0.3),
        inset 0 0 8px rgba(255,255,255,0.3) !important;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
}

#ai-send-button:hover {
    transform: rotate(15deg) scale(1.1) !important; /* 盖章时的倾斜感 */
    background: #2c3e50 !important; /* 悬停变为墨水蓝 */
    box-shadow: 0 0 15px rgba(44, 62, 80, 0.5) !important;
}

/* 5. 翻页器 (Pagination)：档案索引 (Archival Index) */
.MuiPagination-ul li button {
    background: transparent !important;
    border: 1px solid #d4c5a3 !important;
    color: #5d4037 !important;
    font-family: 'Georgia', serif !important;
    font-variant-numeric: oldstyle-nums !important;
    border-radius: 0 !important;
}

.MuiPagination-ul li .Mui-selected {
    background: #2c3e50 !important;
    color: #c5a059 !important;
    border-color: #c5a059 !important;
    font-weight: bold !important;
}

/* 6. 字数统计：验尸官的编号印 (Tally Mark) */
.flex.items-center.px-1.h-5.rounded-md.bg-gray-100 {
    background-color: transparent !important;
    border: 1px solid #8b0000 !important;
    color: #8b0000 !important;
    font-family: 'Courier New', monospace !important; /* 打字机/记录感 */
    font-weight: bold !important;
    border-radius: 0 !important;
    transform: rotate(-5deg); /* 像随手盖下的戳 */
}

/* =========================================
   🎬 专属动效定义
   ========================================= */
@keyframes urgentPulse {
    0% { box-shadow: 0 0 0 0 rgba(139, 0, 0, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(139, 0, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(139, 0, 0, 0); }
}

/* --- 🌙 秘密会议模式 (Midnight Assembly) --- */
@media (prefers-color-scheme: dark) {
    .bg-gradient-to-t.from-white { 
        background: linear-gradient(to top, #0b0c10 0%, transparent 100%) !important; 
    }
    
    /* 输入框容器：黑铁书台 */
    .border-gray-200.rounded-xl.border-grey-300 {
        background-color: #1a1a1a !important;
        border-color: #4a235a !important;
        box-shadow: inset 0 0 20px rgba(0,0,0,0.8) !important;
    }
    
    #ai-chat-input { color: #c5a059 !important; }

    /* 功能按钮：冷钢勋章 */
    #ai-mod-button2 button, .MuiButton-outlinedSizeSmall {
        background: #2c2c2c !important;
        border-color: #444 !important;
        color: #7f8c8d !important;
    }
    
    #ai-mod-button2 button:hover {
        background: #8b0000 !important;
        color: #fff !important;
    }
}

/* ===================================================================
   📜 模块四：雅各宾之辩 · 街头告示 (The Jacobin Forum)
   设计：手揉纸质感、火漆密封、墨渍晕染、断头台阴影
   =================================================================== */

/* 1. 评论容器：革命传单 (The Revolutionary Pamphlet) */
.flex.items-start.gap-2:has(.break-all) {
    padding: 18px 20px !important;
    margin: 15px 0 !important;
    border-radius: 2px !important; 
    
    /* 🎨 底色：手工拉德内纸 (Handmade Paper) */
    background-color: #f7f3e9 !important;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='paperNoise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.04' numOctaves='5' /%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.05 0' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paperNoise)' opacity='0.4'/%3E%3C/svg%3E") !important;
    
    /* 🖼️ 边框：模仿撕裂的纸张边缘与血迹浸染 */
    border: 1px solid #d4c5a3 !important;
    border-left: 5px solid #8b0000 !important; /* 激进派的血色标记 */
    
    /* ⚖️ 阴影：多重纸张堆叠感 */
    box-shadow: 
        1px 1px 0px #d4c5a3,
        2px 2px 0px #c5b593,
        5px 5px 15px rgba(0, 0, 0, 0.1) !important;

    /* 动画：如同传单被风吹动 */
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1) !important;
    position: relative !important;
    overflow: visible !important;
}

/* 2. 🖱️ 悬停交互：点燃革命之火 (The Spark of Insurrection) */
.flex.items-start.gap-2:has(.break-all):hover {
    background-color: #fffdf9 !important;
    border-color: #c5a059 !important; /* 悬停时显现出宫廷金边缘 */
    
    /* ☁️ 阴影：加深投影，模拟断头台落下的压迫感 */
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15) !important;
    
    /* 移动：轻微上浮并旋转，模拟纸张被拿起 */
    transform: translateY(-4px) rotate(-0.5deg) !important;
}

/* 3. 头像美化：浮雕人像 (The Cameo Portrait) */
.flex.items-start.gap-2:has(.break-all) img.rounded-full {
    border: 2px solid #5c4033 !important;
    padding: 2px !important;
    background: #f4ecd8 !important;
    border-radius: 50% !important; /* 椭圆浮雕感 [cite: 52] */
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3) !important;
    
    /* 🕰️ 滤镜：18世纪版画质感 */
    filter: grayscale(1) contrast(1.2) sepia(50%) !important;
    transition: all 0.5s ease !important;
}

.flex.items-start.gap-2:has(.break-all):hover img.rounded-full {
    border-color: #8b0000 !important;
    filter: grayscale(0) contrast(1.1) !important; /* 悬停时“复活” */
    transform: scale(1.1) rotate(5deg) !important;
}

/* 4. 用户名与标识：手写签名感 (The Script Signature) */
.flex.items-start.gap-2:has(.break-all) .text-sm.text-grey-600 {
    color: #2c3e50 !important; /* 立宪派墨色 [cite: 147] */
    font-family: 'Georgia', 'STKaiti', serif !important;
    font-weight: 900 !important;
    letter-spacing: 0.5px !important;
    border-bottom: 1px solid rgba(44, 62, 80, 0.2) !important;
}

/* 5. 评论正文：陈年墨渍 (Old Inkblot) */
.flex.items-start.gap-2:has(.break-all) .break-all {
    color: #2b2b2b !important;
    font-family: 'Georgia', 'Songti SC', serif !important;
    line-height: 1.8 !important;
    font-size: 15px !important;
    margin-top: 8px !important;
    /* 模拟墨水洇散的效果 */
    text-shadow: 0.5px 0.5px 1px rgba(0,0,0,0.05) !important;
}

/* 6. 底部操作栏：档案分割线 */
.flex.items-start.gap-2:has(.break-all) .text-xs.text-grey-600 {
    margin-top: 15px !important;
    padding-top: 8px !important;
    border-top: 1px double #d4c5a3 !important;
    color: #7f8c8d !important;
    font-style: italic !important;
}

/* ❤️ 点赞按钮：火漆封口 (The Crimson Wax Seal) */
.flex.items-start.gap-2:has(.break-all) button:has(.text-red-500) {
    background: radial-gradient(circle, #a93226 0%, #8b0000 100%) !important;
    padding: 4px 12px !important;
    border: none !important;
    border-radius: 50% !important; /* 圆形火漆感 */
    color: #fff !important;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3), inset 0 0 5px rgba(255,255,255,0.2) !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.flex.items-start.gap-2:has(.break-all) button:has(.text-red-500):hover {
    transform: scale(1.2) rotate(-10deg) !important;
    filter: brightness(1.2) !important;
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.4) !important;
}

/* 7. ↩️ 回复按钮：秘密信条 (Secret Codename) */
.flex.items-start.gap-2:has(.break-all) .text-xs button {
    opacity: 0.4 !important;
    color: #2c3e50 !important;
    font-family: 'Georgia', serif !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
}

.flex.items-start.gap-2:has(.break-all):hover .text-xs button {
    opacity: 1 !important;
    color: #8b0000 !important;
    text-decoration: underline !important;
}

/* --- 🌙 终夜模式：凡尔赛的幽灵 (Ghosts of Versailles) --- */
@media (prefers-color-scheme: dark) {
    .flex.items-start.gap-2:has(.break-all) {
        background-color: #1a1510 !important; /* 阴谋深棕 [cite: 58] */
        background-image: none !important;
        border-color: #4a235a !important; /* 阴谋紫 [cite: 148] */
        box-shadow: 5px 5px 15px rgba(0,0,0,0.5) !important;
    }
    
    .flex.items-start.gap-2:has(.break-all) .break-all {
        color: #dcdcdc !important;
    }
    
    .flex.items-start.gap-2:has(.break-all):hover {
        background-color: #0d0d0d !important;
        border-left-color: #e74c3c !important;
    }
}