/* ========================================================
   AWAKEN_TERMINAL 天道面板系统 UI样式表 v4.0 (双端捕获防御版)
   新增：正文全包围边框、指令冲突包容、剧情对话特效
======================================================== */

/* =============== [正文阅读舱: 双重防御捕获] =============== */
/* 同时监听 roco-story 和 rev-main，防止标签被模型改名 */
.roco-story, .rev-main {
    display: block;
    margin: 25px 0;
    padding: 20px 25px;
    background: rgba(10, 11, 16, 0.7); 
    border: 1px solid rgba(0, 240, 255, 0.4); /* 完整的全包围赛博边框 */
    border-radius: 4px;
    color: #e2f3f5;
    font-size: 1.05rem;
    line-height: 1.85; 
    letter-spacing: 0.5px;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1), inset 0 0 20px rgba(0, 240, 255, 0.05); /* 内外双发光 */
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif; 
    white-space: pre-wrap;
    position: relative;
    overflow: hidden;
}

/* 顶部附加一条高亮扫描线，增强界面感 */
.roco-story::before, .rev-main::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, #00f0ff, transparent);
    opacity: 0.7;
}

/* 穿透 Markdown 默认段落，防止自带边距撑破防线 */
.roco-story p, .rev-main p { margin: 0 0 1em 0 !important; color: inherit; line-height: inherit; }

/* 针对你提示词里的特种对话包裹进行美化联动 */
.char-dialogue { color: #00f0ff; text-shadow: 0 0 5px rgba(0, 240, 255, 0.5); font-weight: bold; }
.inner-thought { color: #a371f7; font-style: italic; opacity: 0.9; }
.system-alert { background: rgba(255, 42, 42, 0.15); border-left: 3px solid #ff2a2a; padding: 5px 10px; color: #ff2a2a; font-family: 'Consolas', monospace; display: block; margin: 10px 0;}


/* =============== [终端状态栏: .coser-panel (维持天道风格)] =============== */
.coser-panel {
    --cyan: #00f0ff; --purple: #b026ff; --red: #ff2a2a; --bg-dark: rgba(10, 11, 16, 0.85); --text-main: #e2f3f5;
    display: block; background-color: var(--bg-dark); color: var(--text-main);
    font-family: 'Consolas', 'Courier New', monospace !important; 
    border: 1px solid rgba(0, 240, 255, 0.3); 
    margin: 15px 0; padding: 15px 20px; position: relative;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.6); line-height: 1.7; font-size: 1rem; border-radius: 2px; transition: all 0.3s ease-in-out;
}

/* 动态边角截断器 */
.coser-panel::before, .coser-panel::after {
    content: ''; position: absolute; width: 15px; height: 15px; border: 2px solid var(--cyan); pointer-events: none; transition: 0.3s;
}
.coser-panel::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.coser-panel::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.coser-panel:hover { border-color: var(--cyan); box-shadow: 0 0 15px rgba(0,240,255,0.15), inset 0 0 10px rgba(0,240,255,0.05); }

/* 栏目标题特效 */
.coser-panel summary {
    list-style: none; cursor: pointer; color: var(--cyan); font-size: 1.15rem; font-weight: 700;
    margin-bottom: 15px; padding: 5px 0 5px 12px; border-left: 4px solid var(--cyan); 
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.8);
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.15) 0%, rgba(0,0,0,0) 70%);
    display: flex; align-items: center; transition: background 0.2s;
}
.coser-panel summary::-webkit-details-marker { display: none; }
.coser-panel summary::before { content: "[+] "; color: var(--purple); font-family: inherit; margin-right: 8px; font-size: 0.9em; text-shadow: 0 0 5px var(--purple); }
.coser-panel[open] > summary::before { content: "[-] "; }
.coser-panel summary:hover { background: linear-gradient(90deg, rgba(0, 240, 255, 0.25) 0%, rgba(0,0,0,0) 100%); }

/* 标记与表格覆盖 */
.coser-panel hr { border: none; border-bottom: 1px dashed var(--purple); margin: 15px 0; opacity: 0.6; }
.coser-panel ul { list-style-type: square; padding-left: 20px; }
.coser-panel li { margin-bottom: 6px; }
.coser-panel li::marker { color: var(--purple); }
.coser-panel table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.95rem; background: rgba(0, 0, 0, 0.4); }
.coser-panel th, .coser-panel td { border: 1px solid rgba(0, 240, 255, 0.3); padding: 8px; text-align: left; }
.coser-panel th { background: rgba(176, 38, 255, 0.2); color: #fff; text-shadow: 0 0 5px var(--cyan); }
.coser-panel tr:nth-child(even) { background: rgba(0, 240, 255, 0.05); }

/* 异化面板 */
.coser-panel.author-panel { --cyan: #b026ff; --purple: #00f0ff; }
.coser-panel.author-panel summary { text-shadow: 0 0 8px var(--cyan); }
.coser-panel.thinking-panel { opacity: 0.8; border-style: dashed; }
.coser-panel.thinking-panel:hover { opacity: 1; }

/* =============== [移动端空间压缩协议] =============== */
@media screen and (max-width: 768px) {
    .roco-story, .rev-main { margin: 15px 0; padding: 15px 12px; font-size: 0.95rem; }
    .coser-panel { margin: 10px 0; padding: 10px 12px; font-size: 0.9rem; }
    .coser-panel summary { font-size: 1rem; margin-bottom: 8px; padding-left: 8px; }
    .coser-panel::before, .coser-panel::after { width: 10px; height: 10px; }
    .coser-panel table { display: block; overflow-x: auto; white-space: nowrap; font-size: 0.85rem; }
}