/* ------------------------------------------------------------------
   【淫液与寒刃】沈曼华专属沉浸式聊天框美化 (强制覆盖版)
------------------------------------------------------------------ */

/* ===== 全局气泡共有基础物理特性：圆润、湿滑、半透明毛玻璃 ===== */
.group.is-user > div:first-child, 
.group.is-assistant > div:first-child {
    border-radius: 20px !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: none !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

/* ===== USER (林宇航/其他人) 狂暴雄性压迫感：深渊幽蓝 ===== */
.group.is-user > div:first-child {
    background: linear-gradient(135deg, rgba(8, 12, 25, 0.95), rgba(15, 30, 60, 0.85)) !important;
    box-shadow: 0 0 15px rgba(65, 105, 225, 0.2), inset 0 0 10px rgba(135, 206, 235, 0.1) !important;
    border: 1px solid rgba(135, 206, 235, 0.3) !important;
}

/* User 文字：冰冷尖锐的亮蓝 */
.group.is-user .rili-markdown-renderer, 
.group.is-user .rili-markdown-renderer * {
    color: #AEE4FF !important; /* 高亮冰蓝 */
    text-shadow: 0 0 2px rgba(174, 228, 255, 0.3) !important;
}

/* ===== ASSISTANT (沈曼华) 淫荡母犬堕落感：糜烂暗粉 ===== */
.group.is-assistant > div:first-child {
    background: linear-gradient(135deg, rgba(35, 5, 15, 0.95), rgba(55, 10, 25, 0.85)) !important;
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.25), inset 0 0 15px rgba(255, 105, 180, 0.15) !important;
    border: 1px solid rgba(255, 105, 180, 0.3) !important;
}

/* 沈曼华文字：肉欲泛滥的娇嫩粉色 */
.group.is-assistant .rili-markdown-renderer, 
.group.is-assistant .rili-markdown-renderer * {
    color: #FFB6C1 !important; /* 浅粉红，对比度极高 */
    text-shadow: 0 0 2px rgba(255, 182, 193, 0.3) !important;
}

/* ===== 底部操作区细节适配 (消耗与按钮) ===== */
/* AI端附加信息与按钮渲染为暗粉色系 */
.group.is-assistant .text-xs.font-mono.text-muted-foreground {
    color: rgba(255, 182, 193, 0.5) !important;
}
.group.is-assistant .bg-muted.rounded.flex button svg.lucide {
    stroke: rgba(255, 182, 193, 0.7) !important;
}
.group.is-assistant .bg-muted.rounded.flex {
    background: rgba(255, 20, 147, 0.1) !important;
}

/* User端附加信息与按钮渲染为暗蓝色系 */
.group.is-user .text-xs.font-mono.text-muted-foreground {
    color: rgba(174, 228, 255, 0.5) !important;
}
.group.is-user .bg-muted.rounded.flex button svg.lucide {
    stroke: rgba(174, 228, 255, 0.7) !important;
}
.group.is-user .bg-muted.rounded.flex {
    background: rgba(65, 105, 225, 0.1) !important;
}

/* ===== 按钮悬浮常驻 (防止平台默认透明隐藏) ===== */
.group .md\:opacity-0 { 
    opacity: 1 !important; 
}

/* ===== 加载动画改造：跳动的粉色淫心 ===== */
/* 隐藏原生点 */
.flex.gap-2.w-full.h-full.items-center.justify-center > span {
    display: none !important;
}

/* 注入带心跳缩放动画的SVG背景图 */
.flex.gap-2.w-full.h-full.items-center.justify-center::after {
    content: "" !important;
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23FF1493' d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'%3E%3CanimateTransform attributeName='transform' type='scale' values='1;1.2;1' dur='0.8s' repeatCount='indefinite' additive='sum'/%3E%3C/path%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* 美化状态栏区域 */
text {
    display: block;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    color: #e0e0ff;
    line-height: 1.6;
    background: rgba(10, 10, 20, 0.7);
    padding: 20px;
    border-radius: 10px;
    margin: 10px 0;
}
/* 美化 details/summary 折叠栏 */
details {
    margin-bottom: 15px;
    border: 1px solid #4a3a8c;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(30, 30, 60, 0.5);
}
details[open] {
    border-color: #9d4edd;
    box-shadow: 0 0 10px rgba(157, 78, 221, 0.3);
}
summary {
    padding: 12px 15px;
    background: linear-gradient(90deg, rgba(106, 13, 173, 0.7), rgba(74, 58, 140, 0.7));
    color: #d0b3ff;
    font-weight: bold;
    cursor: pointer;
    list-style: none; /* 隐藏默认箭头 */
    position: relative;
    transition: background 0.3s;
}
summary:hover {
    background: linear-gradient(90deg, rgba(126, 33, 193, 0.8), rgba(94, 78, 160, 0.8));
}
summary::-webkit-details-marker {
    display: none; /* 兼容Webkit隐藏箭头 */
}
summary:after {
    content: '▼';
    position: absolute;
    right: 15px;
    transition: transform 0.3s;
    color: #c77dff;
}
details[open] > summary:after {
    transform: rotate(180deg);
}
/* details 内部内容样式 */
details > div, details > p {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
/* 针对不同summary的图标点缀 */
summary[title*="场景状态"]:before { content: '🕒 '; }
summary[title*="我的信息"]:before { content: '📋 '; }
summary[title*="记忆核心"]:before { content: '💾 '; }
summary[title*="行动与互动建议"]:before { content: '🎮 '; }
summary[title*="短期记忆"]:before { content: '📝 '; }
summary[title*="长期记忆"]:before { content: '🧠 '; }
/* 列表样式 */
details ul, details ol {
    padding-left: 25px;
    margin: 10px 0;
}
details li {
    margin-bottom: 5px;
}
/* 段落样式 */
p {
    margin: 15px 0;
    text-align: justify;
}
/* 用于状态栏内部强调 */
.highlight {
    color: #ffcc00;
    font-weight: bold;
}
.status-warning {
    color: #ff6b6b;
}
.status-good {
    color: #7fffd4;
}