/* =========================================
   Sugar-Dark (暗夜糖心) - 私密交易App UI
   ========================================= */

/* --- 核心聊天容器 (暗黑磨砂质感) --- */
.wx-box { 
    max-width: 400px; 
    margin: 20px auto; 
    background: #121016; /* 极深紫灰底色 */
    border-radius: 16px; 
    border: 1px solid rgba(255, 105, 180, 0.3); /* 暧昧粉边框 */
    overflow: hidden; 
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.15), inset 0 0 10px rgba(0,0,0,0.5); 
    color: #e0e0e0; 
}

/* --- 顶部导航栏 --- */
.wx-top { 
    background: linear-gradient(180deg, #1f1a24 0%, #121016 100%); 
    padding: 15px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); 
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.wx-top span:nth-child(1) { color: #ff4b82; font-size: 15px; } /* 返回键粉色 */
.wx-top span:nth-child(2) { font-size: 16px; font-weight: 600; color: #fff; letter-spacing: 1px; text-shadow: 0 0 5px rgba(255,255,255,0.3); }
.wx-top span:nth-child(3) { color: #ff4b82; font-size: 18px; }

/* --- 聊天主区域 --- */
.wx-chat { 
    padding: 15px; 
    height: 350px; 
    overflow-y: auto; 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
    background-image: radial-gradient(circle at center, #1a1520 0%, #121016 100%);
}
.wx-chat::-webkit-scrollbar { width: 4px; }
.wx-chat::-webkit-scrollbar-thumb { background: rgba(255, 105, 180, 0.3); border-radius: 4px; }
.wx-time { text-align: center; color: #666; font-size: 11px; letter-spacing: 1px; }

/* --- 消息布局 --- */
.wx-msg-l, .wx-msg-r { display: flex; gap: 12px; align-items: flex-start; }
.wx-msg-r { flex-direction: row-reverse; }

/* --- 头像设计 --- */
.wx-ava-daddy { 
    width: 42px; height: 42px; 
    background: #000; 
    border-radius: 50%; /* 圆形头像 */
    border: 2px solid #d4af37; /* 金主专属暗金边框 */
    display: flex; justify-content: center; align-items: center; 
    color: #d4af37; font-size: 11px; font-weight: bold; flex-shrink: 0; 
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}
.wx-ava-me { 
    width: 42px; height: 42px; 
    background: #000; 
    border-radius: 50%; 
    border: 2px solid #ff4b82; /* 玩家专属魅惑粉边框 */
    display: flex; justify-content: center; align-items: center; 
    color: #ff4b82; font-size: 11px; font-weight: bold; flex-shrink: 0; 
    box-shadow: 0 0 8px rgba(255, 75, 130, 0.4);
}

/* --- 气泡设计 --- */
.wx-bub-l { 
    background: #1e1b24; 
    padding: 12px 14px; 
    border-radius: 4px 16px 16px 16px; /* 尖角朝左上 */
    max-width: 70%; 
    font-size: 14px; line-height: 1.5; 
    color: #ddd;
    border: 1px solid rgba(255,255,255,0.05);
}
.wx-bub-r { 
    background: linear-gradient(135deg, #ff4b82 0%, #ff7eb3 100%); /* 渐变粉紫 */
    padding: 12px 14px; 
    border-radius: 16px 4px 16px 16px; /* 尖角朝右上 */
    max-width: 70%; 
    font-size: 14px; line-height: 1.5; 
    color: #fff; 
    box-shadow: 0 4px 12px rgba(255, 75, 130, 0.3);
}

/* --- 💸 黑金转账卡片 (极致诱惑) --- */
.wx-transfer { 
    background: linear-gradient(135deg, #1a1a1a 0%, #2c2a25 100%); 
    padding: 14px 16px; 
    border-radius: 12px; 
    max-width: 75%; 
    color: #d4af37; /* 暗金色文字 */
    display: flex; flex-direction: column; gap: 6px; 
    border: 1px solid #d4af37;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.15);
    position: relative;
    overflow: hidden;
}
/* 转账卡片的高光扫过效果 */
.wx-transfer::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg); animation: shimmer 3s infinite;
}
@keyframes shimmer { 100% { left: 200%; } }

.wx-tf-top { display: flex; align-items: center; gap: 10px; }
.wx-icon { 
    background: #d4af37; color: #1a1a1a; 
    width: 28px; height: 28px; 
    border-radius: 50%; 
    display: flex; justify-content: center; align-items: center; 
    font-weight: 900; font-size: 16px; 
}
.wx-tf-top span:nth-child(2) { font-size: 16px; font-weight: bold; }
.wx-transfer div:last-child { font-size: 12px; color: #a99a75; margin-top: 4px; border-top: 1px dashed rgba(212, 175, 55, 0.3); padding-top: 6px;}

/* --- 底部输入区 --- */
.wx-bot { 
    background: #121016; 
    padding: 12px 15px; 
    border-top: 1px solid rgba(255,255,255,0.05); 
    display: flex; align-items: center; gap: 12px; 
}
.wx-bot div:first-child { color: #888; border-color: #888; } /* 语音图标变暗 */
.wx-input { 
    flex: 1; background: #1e1b24; 
    height: 38px; border-radius: 20px; 
    border: 1px solid rgba(255,255,255,0.1); 
    color: #fff; padding: 0 15px;
}
.wx-bot div:nth-child(3), .wx-bot div:nth-child(4) { color: #888; font-size: 24px; }

/* =========================================
   心声与状态面板美化 (赛博堕落风)
   ========================================= */

/* 心声面板 */
.vb-box { 
    background: rgba(20, 15, 25, 0.8); 
    padding: 12px; 
    border-radius: 8px; 
    margin: 15px 0; 
    border-left: 4px solid #9d4edd; /* 毒药紫 */
    box-shadow: 0 0 10px rgba(157, 78, 221, 0.2);
    color: #ccc;
    font-size: 14px;
}
.vb-title { font-size: 0.85em; color: #9d4edd; margin-bottom: 8px; font-weight: bold; text-transform: uppercase; letter-spacing: 1px;}
.vb-item { margin-bottom: 6px; line-height: 1.4; }
.vb-item b { color: #ff7eb3; }

/* 状态栏折叠框美化 */
details {
    background: #16141a;
    border: 1px solid rgba(255, 105, 180, 0.2);
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 5px 10px;
    color: #ddd;
}
summary {
    cursor: pointer;
    padding: 8px 0;
    font-weight: bold;
    color: #ff4b82;
    outline: none;
    user-select: none;
}
summary::marker { color: #ff4b82; }
details[open] summary { border-bottom: 1px dashed rgba(255, 105, 180, 0.3); margin-bottom: 10px; }
/* --- 正文区域美化 (沉浸式阅读) --- */
.text-content {
    background: #16141a; /* 稍微深一点的底色 */
    color: #e0e0e0;
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid #ff4b82; /* 霓虹粉左边框，呼应主题 */
    line-height: 1.8;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    margin: 15px 0;
}

/* --- 代码块美化 (状态栏/档案) --- */
pre {
    background: #0d0b10 !important; /* 极深黑背景 */
    border: 1px solid #332d3d !important;
    border-radius: 8px !important;
    padding: 15px !important;
    color: #d4af37 !important; /* 档案内容用暗金色，更有“黑金卡”质感 */
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 13px !important;
    overflow-x: auto;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

/* 如果有行内代码 */
code {
    background: rgba(255, 105, 180, 0.1);
    color: #ff7eb3;
    padding: 2px 4px;
    border-radius: 4px;
}
/* --- 寻找金主中 (动态呼吸雷达) --- */
.sugar-loading-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(18, 16, 22, 0.85); /* 半透明暗黑底 */
    border: 1px solid #ff4b82;
    color: #ff4b82;
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
    margin: 20px auto;
    width: fit-content;
    box-shadow: 0 0 15px rgba(255, 75, 130, 0.3);
    animation: pulse-glow 2s infinite; /* 呼吸灯动画 */
}

/* 雷达旋转动画 */
.sugar-spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 75, 130, 0.3);
    border-top-color: #ff4b82;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin { 
    100% { transform: rotate(360deg); } 
}
@keyframes pulse-glow {
    0% { box-shadow: 0 0 10px rgba(255, 75, 130, 0.2); border-color: rgba(255, 75, 130, 0.5); }
    50% { box-shadow: 0 0 25px rgba(255, 75, 130, 0.8); border-color: rgba(255, 75, 130, 1); }
    100% { box-shadow: 0 0 10px rgba(255, 75, 130, 0.2); border-color: rgba(255, 75, 130, 0.5); }
}
/* --- 全局按钮 & 快捷回复按钮美化 (霓虹魅影) --- */
button, 
.btn, 
[class*="btn"], 
[class*="reply"] {
    background: linear-gradient(135deg, #9d4edd 0%, #ff4b82 100%) !important; /* 毒药紫到魅惑粉渐变 */
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 20px !important;
    font-weight: bold !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5) !important;
    box-shadow: 0 4px 12px rgba(255, 75, 130, 0.3) !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(5px);
}

/* 按钮悬停和点击时的“高潮”反馈 */
button:hover, 
.btn:hover, 
[class*="btn"]:hover, 
[class*="reply"]:hover {
    background: linear-gradient(135deg, #ff4b82 0%, #9d4edd 100%) !important; /* 渐变反转 */
    box-shadow: 0 6px 20px rgba(255, 75, 130, 0.7) !important;
    transform: translateY(-2px) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}
button:active {
    transform: translateY(1px) !important;
    box-shadow: 0 2px 5px rgba(255, 75, 130, 0.5) !important;
}
/* --- 暴力拦截所有可能的聊天加载状态 --- */
.typing-indicator, 
.message-loading, 
.chat-loading, 
.loading-dots,
.reply-loading,
.typing,
[class*="typing"],
[class*="Typing"],
[class*="loading-message"],
[class*="dot-flashing"] {
    /* 把原本的三个点或者转圈圈隐身 */
    visibility: hidden !important; 
    position: relative !important;
    display: inline-block !important;
    min-width: 150px !important;
    min-height: 30px !important;
}

/* --- 强制注入我们的赛博名片 --- */
.typing-indicator::after, 
.message-loading::after, 
.chat-loading::after, 
.loading-dots::after,
.reply-loading::after,
.typing::after,
[class*="typing"]::after,
[class*="Typing"]::after,
[class*="loading-message"]::after,
[class*="dot-flashing"]::after {
    content: "📡 寻找金主中..." !important;
    visibility: visible !important; /* 让我们的文字显形 */
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #ff4b82 !important; /* 魅惑粉 */
    font-size: 14px !important;
    font-weight: bold !important;
    letter-spacing: 2px !important;
    white-space: nowrap !important;
    background: #16141a !important; /* 用深色底盖住可能漏出来的原UI */
    padding: 6px 16px !important;
    border-radius: 20px !important;
    border: 1px solid #ff4b82 !important;
    box-shadow: 0 0 10px rgba(255, 75, 130, 0.4) !important;
    animation: neon-pulse 1.5s infinite alternate !important;
}

/* 呼吸灯动画 */
@keyframes neon-pulse {
    0% { opacity: 0.7; box-shadow: 0 0 5px rgba(255, 75, 130, 0.2); }
    100% { opacity: 1; box-shadow: 0 0 15px rgba(255, 75, 130, 0.8); }
}