/* =========================================
   NEO-BRUTALISM UI CORE FOR ROLEPLAY ENGINE
   ========================================= */

/* 1. 根容器：复古纸张底色与硬核外框 */
ai {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-family: 'Helvetica Neue', Arial, 'Microsoft YaHei', sans-serif;
    background-color: #FFFDF5; /* 奶白底色 */
    padding: 18px;
    border: 4px solid #000; /* 极粗纯黑边框 */
    border-radius: 0px; /* 拒绝圆角 */
    box-shadow: 8px 8px 0px #000; /* 标志性的死黑硬阴影 */
    color: #000;
    margin-bottom: 20px;
}

/* 2. 顶部状态栏 (Header)：高亮波普黄 */
ai hd {
    display: block;
    background-color: #FFE600;
    padding: 12px 16px;
    font-weight: 900;
    font-size: 1.1em;
    border: 3px solid #000;
    box-shadow: 4px 4px 0px #000;
    text-align: center;
    letter-spacing: 1px;
}

/* 3. 可折叠面板基础样式：拟物化交互 */
ai details {
    background-color: #FFF;
    border: 3px solid #000;
    box-shadow: 5px 5px 0px #000;
    transition: transform 0.1s ease, box-shadow 0.1s ease; /* 极快的交互反馈 */
    overflow: hidden; /* 防止内部元素溢出边框 */
}

/* 悬浮与点击状态：模拟物理按键被按下的压迫感 */
ai details:hover {
    transform: translate(2px, 2px);
    box-shadow: 3px 3px 0px #000;
}
ai details[open] {
    box-shadow: 3px 3px 0px #000;
    transform: translate(2px, 2px);
}

/* 4. 标题栏 (Summary)：消除默认箭头，采用撞色设计 */
ai summary {
    padding: 14px 16px;
    font-weight: 900;
    font-size: 1.1em;
    cursor: pointer;
    border-bottom: 3px solid #000;
    user-select: none;
    list-style: none; /* 隐藏默认三角箭头 */
    display: flex;
    align-items: center;
    position: relative;
}
ai summary::-webkit-details-marker {
    display: none;
}

/* 模块专属配色方案 (波普风) */
ai details:nth-of-type(1) summary { background-color: #90E0FF; } /* 玩家 - 亮蓝 */
ai details:nth-of-type(2) summary { background-color: #FF90E8; } /* 角色 - 亮粉 */
ai details:nth-of-type(3) summary { background-color: #FFE600; } /* 记忆 - 明黄 */
ai details:nth-of-type(4) summary { background-color: #B4FF90; } /* 选项 - 荧光绿 */

/* 5. 数据行条目：工业虚线分割 */
ai d {
    display: block;
    padding: 10px 16px;
    border-bottom: 2px dashed #000;
    font-size: 0.95em;
    font-weight: 700;
    background-color: #FFFDF5;
}
ai d:last-child {
    border-bottom: none;
}

/* 6. 核心数值状态条：赛博朋克黑底亮字 */
ai d.bar {
    background-color: #000;
    color: #FF90E8; /* 默认粉色字体突显情色/情绪值 */
    font-family: monospace;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: none;
}

/* 7. 记忆回廊标题与表格：极简硬核风 */
ai details p {
    font-weight: 900;
    text-align: center;
    background: #000;
    color: #FFF;
    margin: 0;
    padding: 10px;
    border-bottom: 3px solid #000;
    text-transform: uppercase;
    letter-spacing: 1px;
}
ai table {
    width: 100%;
    border-collapse: collapse;
    background: #FFF;
    font-size: 0.9em;
    border-bottom: 3px solid #000;
}
ai th, ai td {
    border: 2px solid #000;
    padding: 10px;
    text-align: left;
    font-weight: 700;
}
ai th {
    background-color: #EEEEEE;
    color: #000;
}
ai tr:nth-child(even) td {
    background-color: #F8F8F8; /* 斑马线背景 */
}

/* 8. 正文渲染区容错 (如果在<ai>内有未包裹的Markdown文本) */
ai > p {
    font-size: 1.05em;
    line-height: 1.7;
    font-weight: 500;
    margin: 10px 0;
    padding: 0 5px;
}