/* =========================================
   1. 沧衍星 (Cangyan) 全局暗黑 RPG 基调
========================================= */
.cangyan-ui {
    background-color: #0d0d0f; /* 极深黑曜石背景 */
    color: #cbd5e1;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    padding: 20px;
    border-radius: 12px;
    line-height: 1.6;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}
/* 模拟屏幕扫描线效果 */
.cangyan-ui::before {
    content: " ";
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.02));
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
    z-index: 10;
}
/* 面板通用页眉 */
.panel-header {
    font-size: 1.2em;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid;
    display: flex;
    align-items: center;
}
/* 对话文本样式 */
.dialogue-text {
    color: #60a5fa;
    font-weight: 500;
    text-shadow: 0 0 8px rgba(96, 165, 250, 0.3);
}
/* =========================================
   2. 地理位置主题切换 (全局氛围)
========================================= */
/* 北境 - 幽青灵光 */
.loc-north { border-top: 4px solid #10b981; }
.loc-north .panel-header { color: #10b981; border-color: #10b981; }
.loc-north .sub-header { color: #34d399; background: rgba(16, 185, 129, 0.1); }
/* 南境 - 铁锈火辉 */
.loc-south { border-top: 4px solid #f97316; }
.loc-south .panel-header { color: #f97316; border-color: #f97316; }
.loc-south .sub-header { color: #fb923c; background: rgba(249, 115, 22, 0.1); }
/* 星核 - 畸变紫能 */
.loc-abyss { border-top: 4px solid #a855f7; }
.loc-abyss .panel-header { color: #a855f7; border-color: #a855f7; }
.loc-abyss .sub-header { color: #c084fc; background: rgba(168, 85, 247, 0.1); }
/* =========================================
   3. 角色档案卡与阵营面板逻辑
========================================= */
.char-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}
.char-header {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 12px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}
.sub-header {
    font-size: 0.9em;
    font-weight: bold;
    padding: 4px 8px;
    margin: 10px 0;
    border-radius: 3px;
    display: inline-block;
}
/* 核心属性网格 */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}
.stat-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.stat-item span { font-weight: bold; color: #94a3b8; display: block; font-size: 0.8em; }
/* 人格驱动块 */
.personality-block {
    font-size: 0.9em;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 3px solid #64748b;
}
/* 【阵营显隐核心逻辑】 */
.panel-special { display: none; }
.char-north .panel-north { display: block; border-left: 3px solid #10b981; }
.char-south .panel-south { display: block; border-left: 3px solid #f97316; }
.char-abyss .panel-abyss { display: block; border-left: 3px solid #a855f7; }
/* 技能与列表样式 */
.skill-list, .mod-list, .status-list {
    margin-top: 8px;
    font-size: 0.85em;
}
.skill-list strong { color: #94a3b8; }
.mod-list ul, .leader-list ul {
    list-style: none;
    padding-left: 10px;
    margin: 5px 0;
}
.mod-list li::before { content: "└ "; color: #64748b; }
/* 嵌套灵兽卡 */
.spirit-beast-card {
    margin-top: 15px;
    border: 1px dashed rgba(16, 185, 129, 0.3);
    border-radius: 6px;
}
.spirit-beast-card summary {
    padding: 5px 10px;
    background: rgba(16, 185, 129, 0.05);
    cursor: pointer;
    font-size: 0.85em;
    color: #34d399;
}
.spirit-info { padding: 10px; font-size: 0.85em; background: rgba(0,0,0,0.2); }
/* 储存空间与快照 */
.storage-block {
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85em;
}
.snapshot {
    margin-top: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    font-style: italic;
    font-size: 0.9em;
}
/* =========================================
   4. 记忆、情报与成就 (表格增强)
========================================= */
.memory-panel table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    font-size: 0.85em;
}
.memory-panel th {
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    padding: 8px;
    text-align: left;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}
.memory-panel td {
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.table-title {
    font-weight: bold;
    margin: 15px 0 5px 0;
    color: #e2e8f0;
    display: flex;
    align-items: center;
}
.table-title::before { content: "■"; margin-right: 8px; font-size: 0.8em; }
/* 剧情分支列表 */
.branch-list {
    list-style: none;
    padding: 0;
}
.branch-list li {
    padding: 8px 12px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.9em;
}
.branch-list li:hover {
    background: rgba(255, 255, 255, 0.08);
    padding-left: 18px;
}