/* ====== 容器基础 ====== */
ai{display:block;background:linear-gradient(135deg,#111116 0%,#1a1a2e 100%);color:#ccc;font:14px/1.6 sans-serif;padding:12px;border-radius:12px;border:1px solid #ff475733;box-shadow:0 0 25px #ff475718,inset 0 0 60px #00000040;position:relative;overflow:hidden}
ai::before{content:"";position:absolute;top:0;left:0;right:0;height:1px;background:linear-gradient(90deg,transparent,#ff4757,#a29bfe,transparent)}
ai::after{content:"";position:absolute;bottom:0;left:0;right:0;height:1px;background:linear-gradient(90deg,transparent,#fd79a8,#55efc4,transparent)}

/* ====== 思维链 ====== */
ai>details:first-child{background:linear-gradient(135deg,#0a0a12,#0d1117);border:1px solid #55efc433;border-radius:8px;margin-bottom:10px;overflow:hidden}
ai>details:first-child>summary{color:#55efc4;font:bold 13px monospace;padding:8px 12px;cursor:pointer;list-style:none;display:flex;align-items:center;gap:6px;transition:background .3s}
ai>details:first-child>summary:hover{background:#55efc40a}
ai>details:first-child>summary::before{content:"▶";font-size:10px;transition:transform .3s;display:inline-block}
ai>details:first-child[open]>summary::before{transform:rotate(90deg)}
.tc{padding:8px 12px;font:12px/1.7 'Courier New',monospace;color:#7fdbca;background:#00000050;border-top:1px solid #55efc418}
.tc p{margin:0;padding:6px 0;border-bottom:1px dashed #ffffff08}
.tc p:last-child{border:none}
.tc p::before{color:#55efc480;font-weight:bold;margin-right:4px}
.tc p[t="威胁"]::before{content:"[THREAT]";color:#ff4757}
.tc p[t="反制"]::before{content:"[COUNTER]";color:#fdcb6e}
.tc p[t="NPC"]::before{content:"[NPC.AI]";color:#a29bfe}
.tc p[t="体态"]::before{content:"[BODY]";color:#fd79a8}
.tc p[t="记忆监控"]::before{content:"[MEM.SYS]";color:#55efc4}
.tc d{display:block;padding-left:16px;color:#5f7f7a}
.tc d::before{content:"› ";color:#55efc440}

/* ====== 头部信息栏 ====== */
hd{display:flex;justify-content:space-between;flex-wrap:wrap;gap:4px 12px;padding:8px 10px;margin-bottom:10px;border-bottom:1px solid #ffffff10;position:relative;font-size:13px}
hd::after{content:"";position:absolute;bottom:-1px;left:0;right:0;height:1px;background:linear-gradient(90deg,transparent,#ff475740,#a29bfe40,transparent)}
hd span{white-space:nowrap}
hd span:first-child{color:#ff4757}
hd span:nth-child(2){color:#fdcb6e}
hd span:last-child{color:#a29bfe}

/* ====== 正文 ====== */
article{padding:8px 4px 12px;line-height:1.85;color:#ddd;border-bottom:1px solid #ffffff08;margin-bottom:10px}
article p{margin:0 0 10px;text-indent:2em}
article p:last-child{margin-bottom:0}

/* ====== 通用details样式 ====== */
ai>details{margin-bottom:8px;border:1px solid #ffffff10;border-radius:8px;overflow:hidden;transition:border-color .3s}
ai>details:hover{border-color:#ffffff20}
ai>details>summary{padding:8px 12px;cursor:pointer;font:bold 13px sans-serif;list-style:none;display:flex;align-items:center;gap:6px;transition:all .3s;position:relative}
ai>details>summary::before{content:"▸";font-size:12px;transition:transform .3s;display:inline-block;width:12px}
ai>details[open]>summary::before{transform:rotate(90deg)}
ai>details>summary:hover{background:#ffffff06}

/* ====== 记忆中枢 ====== */
ai>details:nth-of-type(2)>summary{color:#6c5ce7;border-bottom:1px solid #6c5ce718}
ai>details:nth-of-type(2){border-color:#6c5ce720}
.mem{padding:8px 10px;background:#00000030;font-size:12px}
.mem p{margin:0;padding:6px 0}
.mem p[t]::before{font-weight:bold;display:block;margin-bottom:4px;font-size:13px}
.mem p[t="短期"]::before{content:"◈ 短期记忆 (STM)";color:#fdcb6e}
.mem p[t="长期"]::before{content:"◈ 长期记忆 (LTM)";color:#6c5ce7}
.mem p[t="短期"]{border-bottom:1px dashed #ffffff08}
.mem d{display:block;padding:3px 0 3px 12px;color:#999;line-height:1.6;position:relative}
.mem d::before{content:"";position:absolute;left:4px;top:10px;width:4px;height:4px;border-radius:50%;background:#ffffff20}
.mem p[t="长期"] d{padding:6px 0 6px 12px;border-bottom:1px dotted #ffffff06}
.mem p[t="长期"] d:last-child{border:none}

/* ====== 个人面板 ====== */
ai>details:nth-of-type(3)>summary{color:#55efc4;border-bottom:1px solid #55efc418}
ai>details:nth-of-type(3){border-color:#55efc420}
.pn{padding:8px 10px;background:#00000030;font-size:12px}
.pn p{margin:0;padding:6px 0;border-bottom:1px dashed #ffffff08}
.pn p:last-child{border:none}
.pn p[t]::before{font-weight:bold;display:block;margin-bottom:3px;font-size:13px}
.pn p[t="{{user}}"]::before{content:"◈ {{user}}";color:#55efc4}
.pn p[t="暗流"]::before{content:"◈ 暗流网络";color:#a29bfe}
.pn d{display:block;padding:2px 0 2px 12px;color:#999}

/* ====== 女性档案 ====== */
ai>details:nth-of-type(4)>summary{color:#fd79a8}
ai>details:nth-of-type(4){border-color:#fd79a830;position:relative}
ai>details:nth-of-type(4)::before{content:"";position:absolute;inset:0;border-radius:8px;box-shadow:inset 0 0 30px #fd79a808;pointer-events:none}
.fp{padding:10px;background:#fd79a806}
.fp .bar{display:block;padding:6px 8px;background:#00000040;border-radius:4px;font-size:12px;color:#fd79a8;font-weight:bold;text-align:center;border:1px solid #fd79a820;margin-bottom:8px}
.fp .bd{display:grid;grid-template-columns:1fr 1fr;gap:4px 10px;font-size:12px;padding:4px 0}
.fp .bd d{display:block;padding:3px 6px;color:#daa;border-left:2px solid #fd79a830;transition:all .3s}
.fp .bd d:hover{background:#fd79a80a;border-left-color:#fd79a8;color:#ffb8b8}
.fp .voice{display:block;margin-top:8px;padding:8px 10px;background:linear-gradient(135deg,#fd79a80a,#ff475708);border-radius:6px;font-style:italic;color:#ff9ff3;font-size:12px;border:1px solid #fd79a815;position:relative}
.fp .voice::before{content:"";position:absolute;top:-1px;left:20px;right:20px;height:1px;background:linear-gradient(90deg,transparent,#fd79a840,transparent)}

/* ====== 男性NPC面板 ====== */
ai>details:nth-of-type(5)>summary{color:#74b9ff}
ai>details:nth-of-type(5){border-color:#74b9ff20}
.mp{padding:8px 10px;background:#00000030;font-size:12px}
.mp p{margin:0;padding:6px 0;border-left:3px solid #74b9ff30;padding-left:10px}
.mp p[t]::before{font-weight:bold;display:block;margin-bottom:3px;font-size:13px;color:#74b9ff}
.mp p[t]::before{content:"◈ "attr(t)}
.mp d{display:block;padding:2px 0;color:#8ab4d6}
.mp d:last-child{font-style:italic;color:#74b9ff90;margin-top:2px}

/* ====== 行动选项 ====== */
.act{margin-top:10px;padding:10px;border-top:1px solid #ffffff10;display:grid;grid-template-columns:1fr 1fr;gap:6px}
.act d{display:block;padding:8px 10px;background:linear-gradient(135deg,#ffffff06,#ffffff03);border:1px solid #ff475725;border-radius:6px;font-size:12px;color:#ccc;cursor:default;transition:all .3s;text-align:center;position:relative;overflow:hidden}
.act d::before{content:"";position:absolute;inset:0;background:linear-gradient(135deg,#ff475710,#a29bfe10);opacity:0;transition:opacity .3s}
.act d:hover{border-color:#ff4757;color:#fff;transform:translateY(-1px);box-shadow:0 2px 10px #ff475720}
.act d:hover::before{opacity:1}
.act d:last-child{border-color:#a29bfe25}
.act d:last-child:hover{border-color:#a29bfe;box-shadow:0 2px 10px #a29bfe20}

/* ====== 呼吸动画 ====== */
@keyframes glow{0%,100%{box-shadow:0 0 25px #ff475718,inset 0 0 60px #00000040}50%{box-shadow:0 0 35px #ff475725,inset 0 0 60px #00000040}}
ai{animation:glow 4s ease-in-out infinite}

/* ====== 滚动条 ====== */
ai ::-webkit-scrollbar{width:4px}
ai ::-webkit-scrollbar-thumb{background:#ff475740;border-radius:2px}
ai ::-webkit-scrollbar-track{background:transparent}