/* =========================================================
   PRTS / 酒馆风格 混合排版全局样式表 (终极整合防截断版)
   ========================================================= */

/* ---------------------------------------------------------
   【类别1】系统底层面板 (思维链、世界信息) - PRTS亮青色科技风
   --------------------------------------------------------- */
.ak-sys-panel {
    background: #2b3036;
    border: 2px solid #00acc1;
    border-radius: 4px;
    margin-bottom: 12px;
    color: #00ffd1;
    font-family: "Consolas", "Monaco", "PingFang SC", sans-serif;
    overflow: hidden;
}

.ak-sys-panel summary {
    background: rgba(0, 172, 193, 0.15);
    padding: 14px 18px;
    font-size: 15px;
    font-weight: bold;
    color: #00ffd1;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid transparent;
}

.ak-sys-panel[open] summary { border-bottom: 1px dashed rgba(0, 255, 209, 0.3); }
.ak-sys-panel summary:hover { background: rgba(0, 172, 193, 0.25); }
.ak-sys-panel summary::-webkit-details-marker { display: none; }
.ak-sys-panel summary::after { content: "▼"; font-size: 12px; transition: transform 0.3s ease; }
.ak-sys-panel[open] summary::after { transform: rotate(180deg); }

/* 约束思维链内部的换行与间距，避免生成大段丑陋空白 */
.ak-sys-panel .panel-body {
    padding: 16px 20px;
    line-height: 1.7;
    color: #a0d8e0;
    font-size: 13.5px;
    white-space: pre-wrap; 
    word-break: break-all;
}

/* ---------------------------------------------------------
   【类别2】角色状态面板 (终端、状态、目标) - 酒馆深蓝灰
   --------------------------------------------------------- */
.ak-status-panel {
    background: #1e2329;
    border: 1px solid #2f3846;
    border-radius: 6px;
    margin-bottom: 12px;
    color: #a4b2c6;
    font-family: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
    overflow: hidden;
}

.ak-status-panel summary {
    background: rgba(47, 56, 70, 0.3);
    padding: 12px 16px;
    font-size: 15px;
    font-weight: bold;
    color: #5aa1e5;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid transparent;
    transition: background 0.2s;
}

.ak-status-panel[open] summary { border-bottom: 1px solid #2f3846; }
.ak-status-panel summary:hover { background: rgba(47, 56, 70, 0.5); }
.ak-status-panel summary::-webkit-details-marker { display: none; }
.ak-status-panel summary::after { content: "▼"; color: #435b7a; font-size: 12px; transition: transform 0.3s ease; }
.ak-status-panel[open] summary::after { transform: rotate(180deg); }

.ak-status-panel .panel-body {
    padding: 16px;
    line-height: 1.8;
    font-size: 14px;
    white-space: pre-wrap; 
}

/* ---------------------------------------------------------
   【类别3】辅助区域样式 (正文、选项、底部注脚)
   --------------------------------------------------------- */
.ak-prose-box {
    background: rgba(22, 26, 30, 0.85);
    border: 1px solid #1a4d5c;
    border-radius: 4px;
    padding: 22px;
    margin-bottom: 15px;
    color: #d0d8e0;
    line-height: 1.8;
}

.ak-dialogue { color: #6a9bd8; font-weight: 500; }

.ak-action-box {
    background: #252a2f;
    border: 2px solid #00ffd1;
    border-left: 6px solid #00ffd1;
    padding: 18px;
    color: #e0ffff;
    margin: 15px 0;
}

.ak-footer { font-size: 11px; color: #666; text-align: right; margin-top: 8px; }

/* ---------------------------------------------------------
   【类别4】记忆区表格样式 (Excel严谨风格 & 自动换行强制约束)
   --------------------------------------------------------- */
.ak-memory-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0 20px 0;
    table-layout: fixed; 
    color: #d0d8e0;
    font-size: 13.5px;
    background: rgba(26, 30, 36, 0.4);
}

.ak-memory-table th, .ak-memory-table td {
    border: 1px solid #435b7a;
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    word-wrap: break-word; 
    overflow-wrap: break-word; 
    white-space: pre-wrap; 
}

.ak-memory-table th {
    background-color: rgba(47, 56, 70, 0.6);
    font-weight: bold;
    color: #a4b2c6;
}

.ak-memory-table th:nth-child(1) { width: 8%; text-align: center; }
.ak-memory-table th:nth-child(2) { width: 22%; }
.ak-memory-table th:nth-child(3) { width: 18%; }
.ak-memory-table th:nth-child(4) { width: 52%; }

/* 强化记忆规则的显示权重，吸引模型注意力 */
.ak-memory-rules {
    background: rgba(255, 100, 100, 0.05);
    border-left: 4px solid #ff4d4d;
    border-radius: 2px;
    padding: 14px;
    font-size: 13px;
    color: #c9d1d9;
    margin-bottom: 20px;
    line-height: 1.7;
}

.ak-memory-rules strong {
    color: #ff7675;
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
}