/* =========================================
   暗流引擎 - 高紧凑灵动版 (Micro-Pulse)
   包含极秘CG模块美化
   ========================================= */

/* 1. 隐藏GM思维链 */
.gm-chain { display: none !important; }

/* 2. 角色彩色对话高亮 */
.dia-pc { color: #82CAFF; font-weight: bold; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }   
.dia-su { color: #FF99CC; font-weight: bold; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }   
.dia-lin { color: #FFE066; font-weight: bold; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }  
.dia-npc { color: #A8B8C8; font-weight: bold; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }  

/* 3. 正文与基础面板精简 */
.story-text {
    background: linear-gradient(145deg, #2a080d 0%, #1a0508 100%);
    color: #FDF5F5; padding: 12px 14px; border-radius: 6px;
    font-size: 0.95em; line-height: 1.6; border: 1px solid #4a0e17; 
}
.story-text p { margin-bottom: 0.8em; }

status-top {
    display: block; background: #3d0a14; border-left: 4px solid #ff3333; 
    padding: 6px 10px; margin-bottom: 10px; color: #eee;
    font-size: 0.85em; font-weight: bold; border-radius: 4px;
}

/* 4. 小巧灵动的数值组容器 */
pulse-bar {
    display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px;
    background: #110204; padding: 6px; border-radius: 6px; border: 1px solid #360a11;
}
.pulse {
    flex: 1 1 48%; /* 占满半宽，实现两列小巧排版 */
    margin: 0 !important; padding: 4px 6px;
    background: #2a080d; border-radius: 4px; color: #ddd;
    display: flex; align-items: center; gap: 4px;
    border: 1px solid #4a0e17; font-size: 0.75em; font-weight: bold;
}

/* 🩸 变量驱动血色微型进度条 */
.bar {
    position: relative; display: inline-block; min-width: 45px;
    text-align: center; background: #000; color: #fff;
    border-radius: 2px; padding: 1px 3px; overflow: hidden;
    z-index: 1; font-family: monospace; font-size: 0.95em;
}
.bar::before {
    content: ""; position: absolute; top: 0; left: 0; height: 100%;
    width: var(--p); /* 引擎读取AI输出的百分比 */
    background: linear-gradient(90deg, #5e111f 0%, #cc0000 100%);
    z-index: -1; transition: width 0.5s ease-in-out;
}
/* 危险条目特型 */
.pulse.blood .bar::before, .bar-lust .bar::before, .bar-fall .bar::before {
    background: linear-gradient(90deg, #800000 0%, #ff1a1a 100%);
    animation: blood-pump 1.5s infinite alternate;
}

/* 🚨 呼吸警告标签 */
.alert-badge {
    padding: 1px 4px; font-size: 0.85em; font-weight: bold; border-radius: 2px;
    background: #2a080d; color: #ffcccc; border: 1px solid #8b0000;
    animation: badge-breathe 2s infinite ease-in-out;
}
.pulse.blood .alert-badge {
    background: #4a0e17; color: #fff; border-color: #ff3333;
    animation: danger-blink 1s infinite steps(2, start);
}

/* 5. 视角穿插模块 */
inner-voice { display: block; background: #2b0b18; border-left: 3px solid #d279a6; padding: 8px 12px; margin: 8px 0; font-style: italic; color: #ffcce6; font-size: 0.85em; }
husband-pov { display: block; background: #141414; border-top: 3px solid #4a5c4a; padding: 8px 12px; margin: 12px 0; color: #b3c6b3; font-size: 0.85em; }

/* 6. 底部模块精简紧凑 */
status-bottom { display: block; margin-top: 15px; }
.mod { background: #23060b; border: 1px solid #4a0e17; border-radius: 6px; margin-bottom: 6px; overflow: hidden; }
.mod > summary { background: #360a11; padding: 6px 10px; font-size: 0.85em; font-weight: bold; color: #fff; cursor: pointer; border-bottom: 1px solid #4a0e17;}
.mod p { margin: 4px 10px; font-size: 0.8em; color: #e8d0d4; display: flex; flex-wrap: wrap; gap: 6px; align-items: center;}
.tab { border-left: 2px solid #5e111f; margin: 6px 10px; padding-left: 6px; }
.tab > summary { font-size: 0.8em; color: #ffb3b3; cursor: pointer; font-weight: bold;}

.mod-memory table { width: calc(100% - 20px); margin: 6px 10px; border-collapse: collapse; background: #110204; font-size: 0.75em; color: #eee;}
.mod-memory th, .mod-memory td { padding: 4px; border: 1px solid #360a11; text-align: center; }

/* 行动面板缩小 */
.act { margin: 4px 10px; padding: 6px; font-size: 0.8em; border-radius: 4px; font-weight: bold; background: #360a11; color: #fff; cursor: pointer;}
.act-safe { border-left: 3px solid #4CAF50; } .act-mid { border-left: 3px solid #FFC107; } .act-bold { border-left: 3px solid #F44336; }

/* =========================================
   7. 极秘影像记录 (CG系统美化) - 完美融合版
   ========================================= */
.cg-frame {
    margin: 15px 0;
    background: linear-gradient(180deg, #1f0308 0%, #0d0103 100%);
    border: 1px solid #731224;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(115, 18, 36, 0.4), inset 0 0 20px rgba(0, 0, 0, 0.8);
    position: relative;
}

/* 顶部标题栏，赛博血色警报风格 */
.cg-title {
    background: linear-gradient(90deg, #4a0e17 0%, #8b0000 50%, #4a0e17 100%);
    color: #fff;
    text-align: center;
    padding: 8px 10px;
    font-size: 0.85em;
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: 0 0 5px #ff4d4d;
    border-bottom: 1px solid #cc0000;
    animation: cg-title-pulse 2s infinite alternate;
}

/* 内容区文字底衬 */
.cg-content {
    padding: 12px;
    color: #fce8eb; /* 带点粉红的冷白，欲拒还迎 */
    font-size: 0.9em;
    line-height: 1.6;
    text-align: justify;
}

/* 针对世界书中输出图片的强制覆写与动画增强 */
.cg-content img {
    width: 100% !important;
    border-radius: 4px;
    border: 1px solid #4a0e17;
    /* 强制使用更贴合引擎的红粉色欲望光晕，覆盖掉行内样式 */
    box-shadow: 0 0 15px rgba(255, 51, 51, 0.5) !important; 
    margin-bottom: 12px !important;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    display: block;
}

/* 玩家悬停图片时的放大与爆浆高亮效果 */
.cg-content img:hover {
    transform: scale(1.03);
    box-shadow: 0 0 25px rgba(255, 26, 26, 0.9) !important;
    cursor: crosshair; /* 游标变为十字瞄准，增加调教感 */
}

/* 动画帧补充 */
@keyframes blood-pump { 0% { filter: brightness(1); } 100% { filter: brightness(1.5); box-shadow: 0 0 4px #ff1a1a; } }
@keyframes badge-breathe { 0%, 100% { box-shadow: 0 0 2px #8b0000; text-shadow: 0 0 1px #ff4d4d; } 50% { box-shadow: 0 0 6px #ff3333; text-shadow: 0 0 4px #ff4d4d; } }
@keyframes danger-blink { 0%, 100% { background: #8b0000; color: #fff; } 50% { background: transparent; color: #ff6666; } }
@keyframes cg-title-pulse {
    0% { filter: brightness(1); box-shadow: 0 0 5px rgba(204, 0, 0, 0.5); }
    100% { filter: brightness(1.3); box-shadow: 0 0 15px rgba(255, 26, 26, 0.8); }
}