/* ========================================= */
/* 林晚秋：柔和纯爱风 + 动态交互高级 UI 版 (终极防爆破+满溢版) */
/* ========================================= */

/* --- 隐藏导演思维链 --- */
think {
    display: none !important;
}

/* --- ✨ 终极暴力正文排版修复 (整合移动端特化版) ✨ --- */
text {
    display: block;
    white-space: pre-wrap !important; 
    line-height: 1.8 !important;      
    font-size: 15px;
    color: #4a4a4a;
    margin: 15px 0; 
    padding: 10px 5px;
    word-wrap: break-word;            
}

/* 🛡️ 兜底防御：只针对 text 容器内部的 p 标签，绝对不污染全站！ */
text p {
    display: block !important;
    margin-top: 10px !important;
    margin-bottom: 10px !important;
    line-height: 1.8 !important;
    white-space: pre-wrap !important;
    color: inherit;
}

/* --- 顶部状态栏 --- */
#status_top {
    font-size: 12px;
    color: #8a7b82;
    text-align: center;
    padding-bottom: 10px;
    margin-bottom: 15px;
    letter-spacing: 1px;
    border-bottom: 1px dashed rgba(255, 192, 203, 0.5);
}

/* --- 底部综合状态面板基底与变量 --- */
#status_bottom {
    --bg-main: rgba(255, 240, 245, 0.6); 
    --bg-panel: rgba(255, 255, 255, 0.85); 
    --text-main: #5c4a52; 
    --accent-color: #d17a95; 
    --divider-color: rgba(255, 192, 203, 0.5); 
    --shadow-color: rgba(255, 182, 193, 0.2); 
    
    background-color: var(--bg-main);
    border: 1px solid var(--divider-color);
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 4px 12px var(--shadow-color);
    margin-top: 25px;
}

/* --- 动态交互面板 (折叠卡片) --- */
#status_top + details, 
#status_bottom details {
    background-color: var(--bg-panel);
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.4s ease-in-out;
    padding: 5px 15px; 
}

#status_top + details[open], 
#status_bottom details[open] {
    border-color: var(--divider-color);
    box-shadow: 0 4px 12px var(--shadow-color);
    padding-bottom: 12px;
}

/* --- 标题栏交互与 +/- 动态标记 --- */
#status_top + details summary, 
#status_bottom summary {
    font-weight: bold;
    font-size: 14px;
    color: var(--accent-color);
    padding: 12px 0 12px 25px; 
    cursor: pointer;
    outline: none;
    list-style: none; 
    position: relative; 
    transition: color 0.3s ease;
    user-select: none;
}

#status_top + details summary::-webkit-details-marker, 
#status_bottom summary::-webkit-details-marker {
    display: none; 
}

#status_top + details summary::before, 
#status_bottom summary::before {
    content: '＋';
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
}

/* 修复被切断的 CSS：展开后的状态 */
#status_top + details[open] > summary, 
#status_bottom details[open] > summary {
    color: var(--text-main);
    border-bottom: 1px solid var(--divider-color);
    margin-bottom: 10px;
}

#status_top + details[open] > summary::before, 
#status_bottom details[open] > summary::before {
    content: '－';
}

/* --- ✨ 动态心情波动条 (无限爱意满溢版) ✨ --- */
.mood-display {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--divider-color);
}

.mood-bar-container { 
    width: 100%; 
    height: 10px; 
    background-color: rgba(255, 192, 203, 0.3); 
    border-radius: 5px; 
    position: relative; 
    margin-top: 5px;
}

/* 第一层基础条：温柔的底色，满管 100% */
.mood-bar-wave { 
    position: absolute; top: 0; left: 0; height: 100%; 
    width: min(calc(var(--mood-value, 50) * 1%), 100%); 
    background-color: var(--accent-color); 
    border-radius: 5px; 
    background-image: linear-gradient(45deg, rgba(255,255,255,0.2) 25%, transparent 25%), 
                      linear-gradient(-45deg, rgba(255,255,255,0.2) 25%, transparent 25%), 
                      linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.2) 75%), 
                      linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.2) 75%); 
    background-size: 20px 20px; 
    animation: wave-move 3s linear infinite; 
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1); 
}

/* 🌊 第二层满溢条：爱意决堤，温柔上涌 (超过100显示) */
.mood-bar-wave::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 5px;
    
    /* 溢出计算逻辑 */
    width: clamp(0%, calc((var(--mood-value, 50) - 100) * 1%), 100%);
    
    /* 液态流光渐变（温柔的玫瑰粉到深邃的暖红） */
    background: linear-gradient(90deg, #f4a2b3, #e05263, #f4a2b3);
    background-size: 200% 100%;
    
    /* 内发光和外晕染 */
    box-shadow: 0 0 10px rgba(224, 82, 99, 0.5), inset 0 0 8px rgba(255, 255, 255, 0.6);
    
    /* 呼吸感动画 */
    animation: love-surge 4s ease-in-out infinite;
    transition: width 1.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes wave-move { 
    0% { background-position: 0 0; } 
    100% { background-position: 20px 0; } 
}

@keyframes love-surge {
    0% { 
        background-position: 0% 50%; 
        box-shadow: 0 0 6px rgba(224, 82, 99, 0.3), inset 0 0 6px rgba(255, 255, 255, 0.4); 
    }
    50% { 
        background-position: 100% 50%; 
        box-shadow: 0 0 14px rgba(224, 82, 99, 0.7), inset 0 0 10px rgba(255, 255, 255, 0.8); 
    }
    100% { 
        background-position: 0% 50%; 
        box-shadow: 0 0 6px rgba(224, 82, 99, 0.3), inset 0 0 6px rgba(255, 255, 255, 0.4); 
    }
}