/* wechat.css - 微信模式样式（主题变量、聊天界面、搜索面板） */

/* ==================== 微信主题 ==================== */
:root {
    --wechat-bg: #ededed;
    --wechat-header-bg: #ededed;
    --wechat-header-text: #000;
    --wechat-user-bubble: #95ec69;
    --wechat-user-text: #000;
    --wechat-ai-bubble: #fff;
    --wechat-ai-text: #000;
    --wechat-pattern-color: rgba(0, 0, 0, 0.05);
    --wechat-bubble-opacity: 1;
    --wechat-accent: #07c160;
}
[data-wechat-theme="pink"] {
    --wechat-bg: #fdf5f6;
    --wechat-header-bg: linear-gradient(135deg, #e8b4b8 0%, #d4a5a5 100%);
    --wechat-header-text: #fff;
    --wechat-user-bubble: #f5d5d8;
    --wechat-user-text: #5a4a4e;
    --wechat-ai-bubble: #fff;
    --wechat-ai-text: #5a4a4e;
    --wechat-pattern-color: rgba(232, 180, 184, 0.15);
    --wechat-accent: #e8b4b8;
}
[data-wechat-theme="blue"] {
    --wechat-bg: #f5f6fa;
    --wechat-header-bg: linear-gradient(135deg, #94A0D3 0%, #7b89c4 100%);
    --wechat-header-text: #fff;
    --wechat-user-bubble: #c5cce8;
    --wechat-user-text: #4a4e69;
    --wechat-ai-bubble: #eef0f8;
    --wechat-ai-text: #4a4e69;
    --wechat-pattern-color: rgba(148, 160, 211, 0.15);
    --wechat-accent: #94A0D3;
}
[data-wechat-theme="purple"] {
    --wechat-bg: #f9f7fb;
    --wechat-header-bg: linear-gradient(135deg, #c4b5d4 0%, #a594b8 100%);
    --wechat-header-text: #fff;
    --wechat-user-bubble: #ddd4e8;
    --wechat-user-text: #5a5060;
    --wechat-ai-bubble: #f3f0f8;
    --wechat-ai-text: #5a5060;
    --wechat-pattern-color: rgba(196, 181, 212, 0.15);
    --wechat-accent: #c4b5d4;
}
[data-wechat-theme="brown"] {
    --wechat-bg: #f7f4f1;
    --wechat-header-bg: linear-gradient(135deg, #b5a191 0%, #968272 100%);
    --wechat-header-text: #fff;
    --wechat-user-bubble: #d9cfc5;
    --wechat-user-text: #5a524a;
    --wechat-ai-bubble: #f3eeea;
    --wechat-ai-text: #5a524a;
    --wechat-pattern-color: rgba(181, 161, 145, 0.15);
    --wechat-accent: #b5a191;
}
[data-wechat-theme="dark"] {
    --wechat-bg: #1a1d21;
    --wechat-header-bg: linear-gradient(135deg, #2d3339 0%, #1a1d21 100%);
    --wechat-header-text: #e0e0e0;
    --wechat-user-bubble: #5a7a94;
    --wechat-user-text: #fff;
    --wechat-ai-bubble: #2d3339;
    --wechat-ai-text: #e0e0e0;
    --wechat-pattern-color: rgba(124, 157, 184, 0.12);
    --wechat-input-bg: #2d3339;
    --wechat-input-text: #e0e0e0;
    --wechat-input-border: #4a5568;
    --wechat-accent: #5a7a94;
}
[data-wechat-theme="dark"] .wechat-voice-convert {
    color: rgba(255, 255, 255, 0.4);
}
[data-wechat-theme="red"] {
    --wechat-bg: #faf5f5;
    --wechat-header-bg: linear-gradient(135deg, #c4232e 0%, #A20609 100%);
    --wechat-header-text: #fff;
    --wechat-user-bubble: #e8b4b6;
    --wechat-user-text: #4a1a1c;
    --wechat-ai-bubble: #faf0f0;
    --wechat-ai-text: #4a1a1c;
    --wechat-pattern-color: rgba(162, 6, 9, 0.1);
    --wechat-accent: #A20609;
}

/* ==================== 微信模式样式 ==================== */
.wechat-page {
    background: #ededed;
}

/* 微信消息列表 */
.wechat-list {
    flex: 1;
    overflow-y: auto;
}

.wechat-list-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.wechat-list-item:hover {
    background: #f5f5f5;
}

.wechat-list-item:active {
    background: #ebebeb;
}

.wechat-list-avatar {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: visible;
    margin-right: 12px;
    position: relative;
}

.wechat-list-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.wechat-unread-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    background: #f44336;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-sizing: border-box;
    line-height: 1;
}

.wechat-list-info {
    flex: 1;
    min-width: 0;
}

.wechat-list-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #000;
}

.wechat-list-preview {
    font-size: 13px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wechat-list-meta {
    text-align: right;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.wechat-list-time {
    font-size: 11px;
    color: #b0b0b0;
}

/* 微信聊天界面 */
.wechat-chat-header {
    padding: 10px 12px;
    background: var(--wechat-header-bg, #ededed);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    position: relative;
}

.wechat-chat-back {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wechat-header-text, #000);
    z-index: 1;
}

.wechat-chat-header-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.wechat-chat-title {
    font-size: 17px;
    font-weight: 500;
    color: var(--wechat-header-text, #000);
}

.wechat-chat-typing {
    font-size: 11px;
    color: var(--wechat-header-text, #999);
    opacity: 0.7;
    margin-top: 2px;
    display: none;
}

.wechat-chat-typing.show {
    display: block;
}

.wechat-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 1;
}

.wechat-chat-memory-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wechat-header-text, #000);
    opacity: 0.8;
    transition: opacity 0.2s;
}
.wechat-chat-memory-btn:active {
    opacity: 0.5;
}

.wechat-chat-settings {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wechat-header-text, #000);
    z-index: 1;
}

/* 微信聊天消息区 */
.wechat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 12px;
    background: var(--wechat-bg, #ededed);
}

.wechat-msg {
    display: flex;
    margin-bottom: 12px;
    align-items: flex-start;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.wechat-msg.user {
    flex-direction: row-reverse;
}

.wechat-msg-avatar {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: var(--accent-light);
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wechat-msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wechat-msg.user .wechat-msg-avatar {
    background: #7bb978;
}

.wechat-msg-avatar:has(img) {
    background: transparent;
}

.wechat-msg-body {
    max-width: 75%;
    margin: 0 10px;
}

.wechat-msg-bubble {
    padding: 10px 12px;
    border-radius: 4px;
    font-size: var(--chat-font-size, 15px);
    line-height: 1.5;
    word-break: break-word;
    position: relative;
    font-family: var(--chat-font);
}

.wechat-msg.assistant .wechat-msg-bubble {
    background: var(--wechat-ai-bubble, #fff);
    color: var(--wechat-ai-text, #000);
}

.wechat-msg.user .wechat-msg-bubble {
    background: var(--wechat-user-bubble, #95ec69);
    color: var(--wechat-user-text, #000);
}

.wechat-msg-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.wechat-msg.user .wechat-msg-time {
    text-align: right;
}

/* 图片消息样式 */
.wechat-msg-image {
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    max-width: 200px;
}
.wechat-msg-image img {
    display: block;
    max-width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 4px;
}

/* 文件消息卡片 */
.wechat-file-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #fff;
    border-radius: 6px;
    min-width: 180px;
    max-width: 240px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.wechat-file-card-icon {
    font-size: 28px;
    flex-shrink: 0;
}
.wechat-file-card-name {
    font-size: 13px;
    color: #333;
    line-height: 1.3;
    word-break: break-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 语音消息样式 */
.wechat-voice-bubble {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 12px !important;
}

/* 语音消息三种长度 */
.wechat-voice-bubble.voice-short {
    width: 80px;
}
.wechat-voice-bubble.voice-medium {
    width: 120px;
}
.wechat-voice-bubble.voice-long {
    width: 180px;
}

.wechat-voice-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* 语音播放动画 */
.wechat-voice-icon.playing {
    animation: voice-playing 1s infinite;
}
@keyframes voice-playing {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* 语音loading动画 */
.wechat-voice-loading {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top-color: #999;
    border-radius: 50%;
    animation: voice-loading-spin 0.8s linear infinite;
    flex-shrink: 0;
    display: none;
}
.wechat-voice-loading.show {
    display: block;
}
.wechat-voice-icon.hidden {
    display: none;
}
@keyframes voice-loading-spin {
    to { transform: rotate(360deg); }
}

.wechat-voice-duration {
    font-size: 14px;
    color: var(--wechat-ai-text, #333);
}
.wechat-msg.user .wechat-voice-duration {
    color: var(--wechat-user-text, #333);
}
.wechat-voice-icon {
    stroke: var(--wechat-ai-text, currentColor);
}
.wechat-msg.user .wechat-voice-icon {
    stroke: var(--wechat-user-text, currentColor);
}

.wechat-msg.user .wechat-voice-bubble {
    flex-direction: row-reverse;
}

/* 转文字按钮 */
.wechat-voice-convert {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.35);
    margin-left: 8px;
    cursor: pointer;
    white-space: nowrap;
}
.wechat-msg.user .wechat-voice-convert {
    margin-left: 0;
    margin-right: 8px;
}

/* 语音文字内容 */
.wechat-voice-text {
    display: none;
    font-size: 13px;
    color: var(--wechat-ai-text, #666);
    margin-top: 6px;
    padding: 8px;
    background: var(--wechat-ai-bubble, #f5f5f5);
    border-radius: 4px;
}
.wechat-msg.user .wechat-voice-text {
    background: var(--wechat-user-bubble, #f5f5f5);
    color: var(--wechat-user-text, #666);
}
.wechat-voice-text.show {
    display: block;
}

/* 微信输入区 */
.wechat-input-area {
    padding: 8px 12px;
    background: var(--wechat-bg, #f7f7f7);
    border-top: 1px solid rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.wechat-input-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.wechat-input-box {
    flex: 1;
    background: var(--wechat-input-bg, #fff);
    border-radius: 6px;
    border: 1px solid var(--wechat-input-border, #e0e0e0);
    padding: 8px 12px;
    min-height: 36px;
    max-height: 100px;
    overflow-y: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wechat-input-box textarea {
    flex: 1;
    border: none;
    background: none;
    resize: none;
    font-size: 15px;
    line-height: 1.4;
    outline: none;
    font-family: inherit;
    min-height: 20px;
    max-height: 80px;
    color: var(--wechat-input-text, #000);
}
.wechat-input-box textarea::placeholder {
    color: var(--wechat-input-text, #999);
    opacity: 0.6;
}

.wechat-upload-btn {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    padding: 0;
}
.wechat-upload-btn:hover {
    color: #07c160;
}

.wechat-input-btns {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.wechat-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.wechat-btn-hold {
    background: #e0e0e0;
    color: #666;
}

.wechat-btn-hold:hover {
    background: #d0d0d0;
}

.wechat-btn-send {
    background: var(--wechat-accent, #07c160);
    color: #fff;
}

.wechat-btn-send:hover {
    filter: brightness(0.9);
}

.wechat-btn-send:disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    filter: none;
}

/* 时间分割线 */
.wechat-time-divider {
    text-align: center;
    margin: 16px 0;
}

.wechat-time-divider span {
    font-size: 12px;
    color: #b0b0b0;
    background: #ededed;
    padding: 4px 12px;
    border-radius: 4px;
}

/* 加载更多按钮 */
.wechat-load-more {
    text-align: center;
    padding: 12px 0;
    margin-bottom: 8px;
}
.wechat-load-more span {
    font-size: 13px;
    color: #576b95;
    cursor: pointer;
    padding: 8px 16px;
    background: rgba(87, 107, 149, 0.08);
    border-radius: 16px;
    transition: background 0.2s;
}
.wechat-load-more span:active {
    background: rgba(87, 107, 149, 0.15);
}

/* 拍一拍系统消息 */
.wechat-system-msg {
    text-align: center;
    margin: 12px 0;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
.wechat-system-msg span {
    font-size: 12px;
    color: #999;
    background: transparent;
}

/* 加号展开面板 */
.wechat-plus-panel {
    display: none;
    background: #f7f7f7;
    border-top: 1px solid #e0e0e0;
    padding: 15px 10px;
}
.wechat-plus-panel.show {
    display: block;
}
.wechat-plus-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px 10px;
}
.wechat-plus-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.wechat-plus-item:active {
    opacity: 0.7;
}
.wechat-plus-icon {
    width: 50px;
    height: 50px;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.wechat-plus-item span {
    font-size: 11px;
    color: #666;
}
.wechat-plus-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    flex-shrink: 0;
}
.wechat-plus-btn.active svg {
    transform: rotate(45deg);
}
.wechat-plus-btn svg {
    transition: transform 0.2s;
}
.wechat-voice-btn {
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    flex-shrink: 0;
}
.wechat-voice-btn:hover {
    color: #07c160;
}
.wechat-voice-btn:active {
    color: #06ae56;
}
.wechat-voice-btn.recording {
    color: #ff4444;
    animation: voicePulse 1s ease-in-out infinite;
}
@keyframes voicePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* 弹窗样式 */
.wechat-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.wechat-modal-overlay.show {
    display: flex;
}
/* Toast 提示样式 */
.wechat-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    max-width: 80%;
    text-align: center;
    animation: toastFadeIn 0.3s ease;
}
.wechat-toast.success {
    background: rgba(7, 193, 96, 0.9);
}
.wechat-toast.error {
    background: rgba(250, 81, 81, 0.9);
}
@keyframes toastFadeIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.wechat-modal {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    width: 280px;
    max-width: 90%;
}
.wechat-modal-title {
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    margin-bottom: 15px;
    color: #333;
}
.wechat-modal-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}
.wechat-modal-input:focus {
    outline: none;
    border-color: #07c160;
}
.wechat-modal-btns {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
.wechat-modal-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}
.wechat-modal-btn.cancel {
    background: #f5f5f5;
    color: #666;
}
.wechat-modal-btn.confirm {
    background: #07c160;
    color: #fff;
}

/* 转账卡片样式 */
.wechat-transfer-card {
    background: linear-gradient(135deg, #ffa726, #ff9800);
    border-radius: 8px;
    padding: 12px;
    color: #fff;
    min-width: 180px;
}
.wechat-transfer-title {
    font-size: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.wechat-transfer-amount {
    font-size: 24px;
    font-weight: bold;
}
.wechat-transfer-note {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.3);
    padding-top: 6px;
}
.wechat-transfer-status {
    font-size: 11px;
    opacity: 0.8;
    margin-top: 4px;
}
.wechat-transfer-card.clickable {
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.wechat-transfer-card.clickable:active {
    transform: scale(0.97);
}
.wechat-transfer-card.accepted {
    background: linear-gradient(135deg, #66bb6a, #43a047);
}
.wechat-transfer-card.declined {
    background: linear-gradient(135deg, #bdbdbd, #9e9e9e);
}

/* 转账操作弹窗 */
.wechat-transfer-actions-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1002;
    justify-content: center;
    align-items: center;
}
.wechat-transfer-actions-modal.show {
    display: flex;
}
.wechat-transfer-actions-content {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    width: 280px;
    text-align: center;
}
.wechat-transfer-actions-header {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}
.wechat-transfer-actions-info {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}
.wechat-transfer-actions-amount {
    font-size: 32px;
    font-weight: bold;
    color: #ff9800;
    margin: 16px 0;
}
.wechat-transfer-actions-note {
    font-size: 13px;
    color: #999;
    margin-bottom: 20px;
}
.wechat-transfer-actions-btns {
    display: flex;
    gap: 12px;
}
.wechat-transfer-actions-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}
.wechat-transfer-actions-btn.decline {
    background: #f5f5f5;
    color: #666;
}
.wechat-transfer-actions-btn.accept {
    background: linear-gradient(135deg, #ff9800, #ffa726);
    color: #fff;
}

/* 语音输入弹窗 */
.wechat-voice-input-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1002;
    justify-content: center;
    align-items: center;
}
.wechat-voice-input-modal.show {
    display: flex;
}
.wechat-voice-input-content {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    width: 300px;
    text-align: center;
}
.wechat-voice-input-indicator {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #07c160, #06ad56);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wechat-voice-input-indicator.error {
    background: linear-gradient(135deg, #fa5151, #e04040);
}
.wechat-voice-input-waves {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 30px;
}
.wechat-voice-input-waves span {
    width: 4px;
    height: 10px;
    background: #fff;
    border-radius: 2px;
    animation: voiceWave 0.8s ease-in-out infinite;
}
.wechat-voice-input-waves span:nth-child(1) { animation-delay: 0s; }
.wechat-voice-input-waves span:nth-child(2) { animation-delay: 0.1s; }
.wechat-voice-input-waves span:nth-child(3) { animation-delay: 0.2s; }
.wechat-voice-input-waves span:nth-child(4) { animation-delay: 0.3s; }
.wechat-voice-input-waves span:nth-child(5) { animation-delay: 0.4s; }
@keyframes voiceWave {
    0%, 100% { height: 10px; }
    50% { height: 25px; }
}
.wechat-voice-input-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 12px;
}
.wechat-voice-input-preview {
    font-size: 14px;
    color: #333;
    min-height: 60px;
    max-height: 120px;
    overflow-y: auto;
    padding: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: left;
    word-break: break-all;
    width: 100%;
    box-sizing: border-box;
    resize: none;
    font-family: inherit;
    line-height: 1.5;
}
.wechat-voice-input-preview:focus {
    outline: none;
    border-color: #07c160;
}
.wechat-voice-input-preview:empty::before {
    content: attr(placeholder);
    color: #999;
}
.wechat-voice-input-btns {
    display: flex;
    gap: 12px;
}
.wechat-voice-input-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}
.wechat-voice-input-btn.cancel {
    background: #f5f5f5;
    color: #666;
}
.wechat-voice-input-btn.send {
    background: linear-gradient(135deg, #07c160, #06ad56);
    color: #fff;
}
.wechat-voice-input-btn.send:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 手动语音输入弹窗（假语音） */
.fake-voice-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1002;
    justify-content: center;
    align-items: center;
}
.fake-voice-modal.show {
    display: flex;
}
.fake-voice-content {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    width: 300px;
}
.fake-voice-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.fake-voice-hint {
    font-size: 12px;
    color: #999;
    margin-bottom: 16px;
}
.fake-voice-textarea {
    width: 100%;
    min-height: 100px;
    max-height: 200px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    resize: none;
    box-sizing: border-box;
    line-height: 1.5;
}
.fake-voice-textarea:focus {
    outline: none;
    border-color: #07c160;
}
.fake-voice-btns {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}
.fake-voice-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}
.fake-voice-btn.cancel {
    background: #f5f5f5;
    color: #666;
}
.fake-voice-btn.send {
    background: linear-gradient(135deg, #07c160, #06ad56);
    color: #fff;
}
.fake-voice-btn.send:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 长按菜单样式 */
.wechat-context-menu {
    display: none;
    position: fixed;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1001;
    min-width: 120px;
    overflow: hidden;
}
.wechat-context-menu.show {
    display: block;
}
.wechat-context-menu-item {
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #f0f0f0;
}
.wechat-context-menu-item:last-child {
    border-bottom: none;
}
.wechat-context-menu-item:active {
    background: #f5f5f5;
}
.wechat-context-menu-item.danger {
    color: #fa5151;
}

/* 多选模式样式 */
.wechat-multiselect-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 12px 16px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}
.wechat-multiselect-bar.show {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.wechat-multiselect-bar button {
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    cursor: pointer;
}
.wechat-multiselect-bar .cancel-btn {
    background: #f0f0f0;
    color: #333;
}
.wechat-multiselect-bar .delete-btn {
    background: #fa5151;
    color: #fff;
}
.wechat-multiselect-bar .export-btn {
    background: #576b95;
    color: #fff;
}
.wechat-msg.selected,
.wechat-system-msg.selected {
    background: rgba(7, 193, 96, 0.1);
}
.wechat-msg .select-checkbox {
    display: none;
    width: 22px;
    height: 22px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}
.wechat-multiselect-mode .wechat-msg .select-checkbox {
    display: block;
}
.wechat-msg.selected .select-checkbox {
    background: #07c160;
    border-color: #07c160;
}
.wechat-msg.selected .select-checkbox::after {
    content: '✓';
    color: #fff;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

/* 引用消息样式 */
.wechat-quote-preview {
    display: none;
    background: var(--wechat-ai-bubble, #f5f5f5);
    padding: 8px 12px;
    margin: 0 12px 8px;
    border-radius: 8px;
    border-left: 3px solid var(--wechat-user-bubble, #07c160);
    position: relative;
}
.wechat-quote-preview.show {
    display: block;
}
.wechat-quote-preview-content {
    font-size: 13px;
    color: var(--wechat-ai-text, #666);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: calc(100% - 30px);
}
.wechat-quote-preview-name {
    font-size: 12px;
    color: var(--wechat-ai-text, #999);
    opacity: 0.7;
    margin-bottom: 2px;
}
.wechat-quote-preview-close {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: none;
    background: #ddd;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    color: #666;
}
.wechat-msg-quote {
    background: rgba(0,0,0,0.05);
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 6px;
    border-left: 2px solid var(--wechat-user-bubble, #07c160);
    font-size: 12px;
    color: var(--wechat-ai-text, #666);
    max-width: 100%;
    overflow: hidden;
}
.wechat-msg-quote-name {
    font-size: 11px;
    opacity: 0.7;
    margin-bottom: 2px;
}
.wechat-msg-quote-content {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
/* 用户气泡内的引用样式适配 */
.wechat-msg.user .wechat-msg-quote {
    color: var(--wechat-user-text, #666);
    border-left-color: var(--wechat-ai-bubble, #fff);
}

/* 微信主题选择器 */
.wechat-theme-selector {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.wechat-theme-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    padding: 2px;
    transition: all 0.2s;
}
.wechat-theme-dot > div {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}
.wechat-theme-dot.active {
    border-color: #07c160;
}
.wechat-theme-dot:hover {
    transform: scale(1.1);
}

/* 微信背景图案选择器 */
.wechat-pattern-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.wechat-pattern-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.wechat-pattern-preview {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 2px solid #ddd;
    transition: all 0.2s;
}
.wechat-pattern-option.active .wechat-pattern-preview {
    border-color: #07c160;
}
.wechat-pattern-option span {
    font-size: 11px;
    color: #666;
}
.wechat-pattern-grid {
    background-image:
        linear-gradient(var(--wechat-pattern-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--wechat-pattern-color) 1px, transparent 1px);
    background-size: 8px 8px;
    background-color: var(--wechat-bg);
}
.wechat-pattern-dots {
    background-image: radial-gradient(var(--wechat-pattern-color) 2px, transparent 2px);
    background-size: 8px 8px;
    background-color: var(--wechat-bg);
}
.wechat-pattern-stripes {
    background-image: repeating-linear-gradient(
        90deg,
        var(--wechat-pattern-color) 0px,
        var(--wechat-pattern-color) 4px,
        transparent 4px,
        transparent 8px
    );
    background-color: var(--wechat-bg);
}

/* 微信消息区域背景图案 */
.wechat-messages[data-pattern="grid"] {
    background-image:
        linear-gradient(var(--wechat-pattern-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--wechat-pattern-color) 1px, transparent 1px) !important;
    background-size: 20px 20px !important;
    background-color: var(--wechat-bg) !important;
}
.wechat-messages[data-pattern="dots"] {
    background-image:
        radial-gradient(var(--wechat-pattern-color) 4px, transparent 4px),
        radial-gradient(var(--wechat-pattern-color) 4px, transparent 4px) !important;
    background-size: 28px 28px !important;
    background-position: 0 0, 14px 14px !important;
    background-color: var(--wechat-bg) !important;
}
.wechat-messages[data-pattern="stripes"] {
    background-image: repeating-linear-gradient(
        90deg,
        var(--wechat-pattern-color) 0px,
        var(--wechat-pattern-color) 10px,
        transparent 10px,
        transparent 20px
    ) !important;
    background-color: var(--wechat-bg) !important;
}
.wechat-messages[data-pattern="custom"] {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* 微信气泡透明度 - 通过JS动态设置背景色alpha值实现，不影响文字 */

/* 微信聊天设置页 */
.wechat-settings-section {
    background: #fff;
    margin-bottom: 12px;
}

.wechat-settings-item {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
}

.wechat-settings-item:last-child {
    border-bottom: none;
}

.wechat-settings-label {
    font-size: 15px;
    color: #000;
}

.wechat-settings-value {
    font-size: 14px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 4px;
}

.wechat-settings-input {
    width: 80px;
    padding: 6px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.wechat-settings-select {
    padding: 6px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    color: #333;
}

/* 空状态 - 微信风格 */
.wechat-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #b0b0b0;
    padding: 40px;
}

.wechat-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.wechat-empty-text {
    font-size: 14px;
    text-align: center;
}

/* ==================== 微信搜索面板 ==================== */
.wechat-search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99998;
}
.wechat-search-overlay.show {
    display: block;
}
.wechat-search-panel {
    display: none;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    height: 70vh;
    background: #fff;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    z-index: 99999;
    flex-direction: column;
    overflow: hidden;
}
.wechat-search-panel.show {
    display: flex;
}
.wechat-search-panel-header {
    display: flex;
    align-items: center;
    padding: 12px 16px 8px;
    flex-shrink: 0;
}
.wechat-search-collapse-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}
.wechat-search-collapse-btn:active {
    opacity: 0.5;
}
.wechat-search-bar {
    flex: 1;
    position: relative;
    margin-left: 8px;
}
.wechat-search-input {
    width: 100%;
    height: 36px;
    border: none;
    border-radius: 18px;
    background: #ededed;
    padding: 0 16px 0 36px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}
.wechat-search-input:focus {
    background: #e4e4e4;
}
.wechat-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
    pointer-events: none;
}
.wechat-search-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
/* 快照条目 */
.wechat-snapshot-item {
    padding: 12px 16px;
    border-bottom: 0.5px solid #e8e8e8;
    cursor: pointer;
}
.wechat-snapshot-item:active {
    background: #ececec;
}
.wechat-snapshot-user {
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.wechat-snapshot-assistant {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.wechat-snapshot-time {
    font-size: 11px;
    color: #b0b0b0;
    text-align: right;
}
/* 搜索结果条目 */
.wechat-search-result-item {
    padding: 12px 16px;
    border-bottom: 0.5px solid #e8e8e8;
    cursor: pointer;
}
.wechat-search-result-item:active {
    background: #ececec;
}
.wechat-search-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.wechat-search-result-sender {
    font-size: 13px;
    color: #333;
    font-weight: 500;
}
.wechat-search-result-time {
    font-size: 11px;
    color: #b0b0b0;
}
.wechat-search-result-content {
    font-size: 14px;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wechat-search-result-content .keyword-highlight {
    color: #07c160;
    font-weight: 600;
}
.wechat-search-load-more {
    text-align: center;
    padding: 16px;
    color: #999;
    font-size: 13px;
    cursor: pointer;
}
.wechat-search-load-more:active {
    opacity: 0.6;
}
.wechat-search-empty {
    text-align: center;
    padding: 40px 16px;
    color: #b0b0b0;
    font-size: 14px;
}
/* 消息跳转高亮动画 */
@keyframes msg-highlight {
    0% { background-color: rgba(7, 193, 96, 0.3); }
    100% { background-color: transparent; }
}
.wechat-msg-highlight {
    animation: msg-highlight 2s ease-out;
}

