/* 心动聊天室 - 优化布局版 */

/* ===== 聊天容器 ===== */
.chat-container {
    max-width: 800px;
    margin: 0 auto 24px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 18px;
    border: 1px solid rgba(255, 107, 139, 0.12);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 680px;
}

/* ===== 聊天室标题栏 ===== */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(255, 107, 139, 0.08);
    flex-shrink: 0;
}

.chat-header-left,
.chat-header-right {
    display: flex;
    align-items: center;
}

.chat-header-right {
    gap: 10px;
}


.chat-header-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.chat-online-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
    background: rgba(76, 175, 80, 0.08);
    padding: 4px 12px;
    border-radius: 20px;
}

.online-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4CAF50;
    animation: onlinePulse 2s ease-in-out infinite;
}

@keyframes onlinePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(76,175,80,0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 4px rgba(76,175,80,0); }
}

/* ===== 消息列表 ===== */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 107, 139, 0.2) transparent;
}

.chat-messages::-webkit-scrollbar { width: 5px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255, 107, 139, 0.25); border-radius: 10px; }

/* ===== 系统消息 ===== */
.chat-system-msg {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 12px 0;
    padding: 6px 16px;
    font-size: 12px;
    color: #999;
}

.system-icon { font-size: 14px; }

.system-text {
    background: rgba(255, 107, 139, 0.08);
    padding: 4px 14px;
    border-radius: 20px;
    border: 1px dashed rgba(255, 107, 139, 0.2);
}

/* ===== 时间分割线 ===== */
.chat-time-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px 0;
    gap: 10px;
    font-size: 11px;
    color: #bbb;
    white-space: nowrap;
    font-family: 'Montserrat', 'Noto Sans SC', sans-serif;
}

.chat-time-divider::before,
.chat-time-divider::after {
    content: '';
    flex: 1;
    max-width: 80px;
    height: 0;
    border-top: 1px dashed rgba(255, 107, 139, 0.2);
}

/* ===== 消息气泡 ===== */
.chat-msg {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    animation: msgSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes msgSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 头像容器 */
.chat-avatar-wrap {
    flex-shrink: 0;
    width: 36px;
}

/* 用户头像（圆形图片） */
.chat-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: block;
}

/* 头像占位（首字母渐变） */
.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #fff;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 消息体 */
.chat-msg-body {
    max-width: calc(100% - 56px);
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* 昵称（仅别人的消息显示） */
.chat-msg-name {
    font-size: 12px;
    font-weight: 600;
    color: #FF6B8B;
    margin-bottom: 4px;
    display: block;
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 气泡（别人的消息 - 左侧） */
.chat-bubble {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 4px 16px 16px 16px;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    word-break: break-word;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    position: relative;
    display: inline-block;
    max-width: 100%;
    box-sizing: border-box;
}

/* 气泡左侧小三角（别人的消息） */
.chat-msg:not(.self) .chat-bubble::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 12px;
    width: 0;
    height: 0;
    border-right: 6px solid rgba(255, 255, 255, 0.9);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

/* 气泡内文字 */
.bubble-text {
    margin: 0;
}

/* 引用回复内容（在气泡内顶部） */
.chat-bubble .reply-quote {
    background: rgba(255, 107, 139, 0.08);
    border-left: 3px solid #FF6B8B;
    border-radius: 0 6px 6px 0;
    padding: 6px 10px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #888;
    line-height: 1.5;
    cursor: pointer;
    transition: background 0.2s ease;
}

.reply-quote:hover {
    background: rgba(255, 107, 139, 0.14);
}

.reply-quote .quote-name {
    color: #FF6B8B;
    font-weight: 600;
    display: block;
}

.reply-quote .quote-text {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 280px;
}

/* ===== 气泡底部元信息 ===== */
.chat-bubble-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
    line-height: 1;
}

.bubble-time {
    font-size: 10px;
    color: rgba(0,0,0,0.3);
    font-family: 'Montserrat', sans-serif;
}

.bubble-location {
    font-size: 10px;
    color: #FF9EB5;
    background: rgba(255, 107, 139, 0.06);
    padding: 1px 6px;
    border-radius: 8px;
    white-space: nowrap;
}

.bubble-client {
    font-size: 10px;
    color: rgba(0,0,0,0.25);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

/* ===== 气泡内图片 ===== */
.chat-bubble .bubble-img {
    display: block;
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    object-fit: cover;
    margin-bottom: 4px;
}

.chat-bubble .bubble-img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(255, 107, 139, 0.2);
}

/* ===== 消息操作按钮 ===== */
.chat-msg-actions {
    display: flex;
    gap: 2px;
    margin-top: 2px;
    padding: 0 2px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.chat-msg:hover .chat-msg-actions {
    opacity: 1;
}

.msg-action-btn {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border: none;
    background: none;
    color: rgba(0, 0, 0, 0.25);
    font-size: 11px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.msg-action-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.6);
}

.msg-action-btn.action-retract {
    color: rgba(255, 71, 87, 0.5);
}

.msg-action-btn.action-retract:hover {
    background: rgba(255, 71, 87, 0.08);
    color: #ff4757;
}

/* ===== 自己的消息（靠右） ===== */
.chat-msg.self {
    flex-direction: row-reverse;
}

.chat-msg.self .chat-msg-body {
    align-items: flex-end;
}

.chat-msg.self .chat-bubble {
    background: linear-gradient(135deg, #FF6B8B, #FF9EB5);
    color: #fff;
    border: none;
    border-radius: 16px 4px 16px 16px;
    box-shadow: 0 2px 10px rgba(255, 107, 139, 0.3);
}

/* 自己消息右侧小三角 */
.chat-msg.self .chat-bubble::before {
    content: '';
    position: absolute;
    right: -6px;
    top: 12px;
    width: 0;
    height: 0;
    border-left: 6px solid #FF9EB5;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

/* 自己的消息元信息颜色 */
.chat-msg.self .bubble-time { color: rgba(255,255,255,0.6); }
.chat-msg.self .bubble-location { color: rgba(255,255,255,0.8); background: rgba(255,255,255,0.15); }
.chat-msg.self .bubble-client { color: rgba(255,255,255,0.5); }

.chat-msg.self .chat-bubble .reply-quote {
    background: rgba(255, 255, 255, 0.15);
    border-left-color: rgba(255, 255, 255, 0.6);
}

.chat-msg.self .chat-bubble .reply-quote .quote-name {
    color: rgba(255, 255, 255, 0.9);
}

.chat-msg.self .chat-bubble .reply-quote .quote-text {
    color: rgba(255, 255, 255, 0.7);
}

.chat-msg.self .chat-msg-actions {
    flex-direction: row-reverse;
}

.chat-msg.self .chat-msg-actions .msg-action-btn {
    color: rgba(255, 107, 139, 0.5);
}

.chat-msg.self .chat-msg-actions .msg-action-btn:hover {
    color: #FF6B8B;
    background: rgba(255, 107, 139, 0.08);
}

/* 管理员标记 */
.chat-msg.msg-admin .chat-msg-name::after {
    content: '官';
    display: inline-block;
    font-size: 9px;
    line-height: 14px;
    background: linear-gradient(135deg, #ff6b6b, #ffa502);
    color: #fff;
    padding: 0 4px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
    font-weight: normal;
}

/* ===== 输入区域 ===== */
.chat-input-area {
    border-top: 1px solid rgba(255, 107, 139, 0.1);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 12px 16px;
    flex-shrink: 0;
}

/* 引用回复栏 */
.chat-reply-bar {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: rgba(255, 107, 139, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 107, 139, 0.1);
    animation: replySlideIn 0.2s ease;
}

@keyframes replySlideIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.reply-preview {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.reply-preview-line {
    width: 3px;
    border-radius: 2px;
    background: linear-gradient(180deg, #FF6B8B, #FF9EB5);
    flex-shrink: 0;
}

.reply-preview-content {
    flex: 1;
    min-width: 0;
}

.reply-preview-name {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #FF6B8B;
    margin-bottom: 2px;
}

.reply-preview-text {
    display: block;
    font-size: 12px;
    color: #888;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reply-close {
    width: 22px;
    height: 22px;
    border: none;
    background: rgba(255, 107, 139, 0.1);
    border-radius: 50%;
    color: #FF6B8B;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
}

.reply-close:hover {
    background: rgba(255, 107, 139, 0.2);
    transform: scale(1.1);
}

/* 输入栏 */
.chat-input-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 图片按钮 */
.chat-img-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 107, 139, 0.08);
    border-radius: 50%;
    color: #FF6B8B;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.chat-img-btn:hover {
    background: rgba(255, 107, 139, 0.15);
    transform: scale(1.1);
}

.chat-img-btn:active {
    transform: scale(0.95);
}

/* 表情按钮 */
.chat-emoji-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 107, 139, 0.08);
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.chat-emoji-btn:hover {
    background: rgba(255, 107, 139, 0.15);
    transform: scale(1.1);
}

.chat-emoji-btn.active {
    background: rgba(255, 107, 139, 0.2);
}

.chat-input {
    flex: 1;
    height: 40px;
    border: 1.5px solid rgba(255, 107, 139, 0.15);
    border-radius: 20px;
    padding: 0 18px;
    font-size: 14px;
    outline: none;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.chat-input:focus {
    border-color: #FF6B8B;
    box-shadow: 0 0 0 3px rgba(255, 107, 139, 0.1);
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B8B, #FF9EB5);
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(255, 107, 139, 0.3);
    padding: 0;
}

.chat-send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 14px rgba(255, 107, 139, 0.4);
}

.chat-send-btn:active {
    transform: scale(0.95);
}

.send-svg {
    margin-left: 2px;
}

/* ===== 表情面板 ===== */
.chat-emoji-panel {
    display: none;
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    border: 1px solid rgba(255, 107, 139, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    max-height: 160px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 107, 139, 0.2) transparent;
}

.chat-emoji-panel.show {
    display: block;
    animation: panelSlideUp 0.2s ease;
}

@keyframes panelSlideUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
}

.emoji-item {
    width: 100%;
    aspect-ratio: 1;
    border: none;
    background: none;
    font-size: 22px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    line-height: 1;
}

.emoji-item:hover {
    background: rgba(255, 107, 139, 0.1);
    transform: scale(1.2);
}

/* ===== 图片选择抽屉 ===== */
.chat-img-drawer {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 900;
}
.chat-img-drawer.show { display: block; }

.drawer-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    animation: overlayFadeIn 0.2s ease;
}
@keyframes overlayFadeIn { from { opacity: 0; } to { opacity: 1; } }

.drawer-content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-radius: 18px 18px 0 0;
    padding: 20px 16px;
    animation: drawerSlideUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes drawerSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.drawer-options {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.drawer-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 12px;
    transition: background 0.2s ease;
}
.drawer-option:hover { background: rgba(255, 107, 139, 0.06); }
.drawer-option:active { background: rgba(255, 107, 139, 0.12); }

.drawer-icon {
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 107, 139, 0.08);
    border-radius: 14px;
    font-size: 24px;
}
.drawer-option:hover .drawer-icon { background: rgba(255, 107, 139, 0.14); transform: scale(1.05); }

.drawer-label { font-size: 13px; color: #555; }

.drawer-cancel {
    width: 100%; padding: 14px; border: none;
    background: rgba(255, 107, 139, 0.06);
    color: #666; font-size: 15px; font-weight: 500;
    border-radius: 12px; cursor: pointer;
    transition: all 0.2s ease;
}
.drawer-cancel:hover { background: rgba(255, 107, 139, 0.12); }
.drawer-cancel:active { transform: scale(0.98); }

/* ===== 图片预览遮罩 ===== */
.chat-img-preview {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.92);
    align-items: center; justify-content: center;
}
.chat-img-preview.show { display: flex; animation: previewFadeIn 0.2s ease; }
@keyframes previewFadeIn { from { opacity: 0; } to { opacity: 1; } }

.preview-close {
    position: absolute; top: 16px; right: 16px;
    width: 36px; height: 36px; border: none;
    background: rgba(255, 255, 255, 0.15); border-radius: 50%;
    color: #fff; font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease; z-index: 1;
}
.preview-close:hover { background: rgba(255, 255, 255, 0.25); transform: scale(1.1); }

.preview-img {
    max-width: 90%; max-height: 90%; object-fit: contain; border-radius: 8px;
    animation: previewZoomIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes previewZoomIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* 撤回弹窗 */
.retract-confirm-overlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.55);z-index:9999;justify-content:center;align-items:center;backdrop-filter:blur(4px)}
.retract-confirm-overlay.show{display:flex}
.retract-confirm-card{background:#fff;border-radius:18px;padding:32px 28px;max-width:380px;width:88%;text-align:center;box-shadow:0 12px 48px rgba(0,0,0,0.25);animation:retractPopIn 0.3s cubic-bezier(.175,.885,.32,1.275)}
@keyframes retractPopIn{from{opacity:0;transform:scale(0.85)}to{opacity:1;transform:scale(1)}}
.retract-icon{font-size:44px;margin-bottom:12px}
.retract-title{font-size:18px;font-weight:700;color:#333;margin:0 0 14px}
.retract-msg-preview{background:#fff3f3;border:1px solid #ffccc7;border-radius:12px;padding:12px 16px;margin-bottom:12px}
.retract-preview-content{color:#cf1322;font-size:14px;line-height:1.6;word-break:break-all}
.retract-warning{color:#999;font-size:13px;margin:0 0 24px}
.retract-actions{display:flex;gap:12px;justify-content:center}
.retract-btn-cancel,.retract-btn-confirm{padding:10px 28px;border-radius:10px;font-size:15px;font-weight:600;cursor:pointer;border:none;transition:all 0.2s}
.retract-btn-cancel{background:#f5f5f5;color:#666}
.retract-btn-cancel:hover{background:#eee}
.retract-btn-confirm{background:linear-gradient(135deg,#ff6b6b,#ff4757);color:#fff}
.retract-btn-confirm:hover{transform:translateY(-1px);box-shadow:0 4px 16px rgba(255,71,87,0.35)}

.chat-retracted-msg{animation:fadeInUp 0.3s ease}
@keyframes fadeInUp{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}

.chat-closed-notice{position:absolute;top:0;left:0;right:0;background:rgba(255,71,87,0.95);color:#fff;text-align:center;padding:10px;font-size:14px;z-index:10;font-weight:600}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .chat-container { margin: 0 16px 20px; width: auto; border-radius: 16px; height: 600px; }
    .chat-header { padding: 12px 16px; }
    .chat-header-title { font-size: 15px; }
    .chat-messages { padding: 12px 14px; }
    .chat-msg-body { max-width: calc(100% - 50px); }
    .chat-input-area { padding: 10px 12px; }
    .chat-input { height: 38px; font-size: 13px; }
    .chat-send-btn { width: 38px; height: 38px; }
    .emoji-grid { grid-template-columns: repeat(7, 1fr); }
    .chat-bubble .bubble-img { max-width: 160px; max-height: 160px; }
}

@media (max-width: 480px) {
    .chat-container { margin: 0 10px 16px; border-radius: 14px; height: 560px; }
    .chat-header { padding: 10px 14px; }
    .chat-header-title { font-size: 14px; }
    .chat-messages { padding: 10px 10px; }
    .chat-avatar, .chat-avatar-img { width: 30px; height: 30px; }
    .chat-avatar-wrap { width: 30px; }
    .chat-avatar { font-size: 13px; }
    .chat-bubble { padding: 8px 12px; font-size: 13px; }
    .chat-msg-body { max-width: calc(100% - 44px); }
    .chat-input-area { padding: 8px 10px; }
    .chat-input { height: 36px; font-size: 12px; }
    .chat-img-btn { width: 32px; height: 32px; }
    .chat-emoji-btn { width: 32px; height: 32px; font-size: 16px; }
    .chat-send-btn { width: 36px; height: 36px; }
    .emoji-grid { grid-template-columns: repeat(6, 1fr); }
    .chat-bubble .bubble-img { max-width: 140px; max-height: 140px; }
    .bubble-client { max-width: 100px; }
}

@media (max-width: 360px) {
    .chat-container { margin: 0 8px 14px; height: 500px; }
    .chat-avatar, .chat-avatar-img { width: 28px; height: 28px; }
    .chat-avatar-wrap { width: 28px; }
    .chat-avatar { font-size: 12px; }
    .chat-bubble { padding: 6px 10px; font-size: 12px; }
    .chat-msg { gap: 6px; margin-bottom: 10px; }
    .chat-msg-body { max-width: calc(100% - 40px); }
    .chat-bubble .bubble-img { max-width: 120px; max-height: 120px; }
    .bubble-client { display: none; }
}

/* 发送前图片预览栏 */
.chat-img-preview-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    margin-bottom: 6px;
}
.chat-img-preview-bar img {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid rgba(255, 107, 139, 0.2);
}
.chat-img-remove-btn {
    width: 22px;
    height: 22px;
    border: none;
    background: rgba(255, 107, 139, 0.15);
    color: #FF6B8B;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.chat-img-remove-btn:hover {
    background: #FF6B8B;
    color: #fff;
    transform: scale(1.15);
}

/* ===== 全屏按钮 ===== */
.chat-fullscreen-btn {
    border:none; background:rgba(255,107,139,0.06);
    border-radius:8px; color:#FF6B8B; cursor:pointer;
    display:flex; align-items:center; gap:4px;
    padding:4px 10px; font-size:12px;
    transition:all .2s; flex-shrink:0; white-space:nowrap;
}
.chat-fullscreen-btn:hover { background:rgba(255,107,139,0.15); }

/* 全屏模式 */
.chat-container.fullscreen {
    position:fixed; top:0; left:0; right:0; bottom:0;
    width:100%; max-width:100%; height:100%; margin:0;
    border-radius:0; z-index:9999; border:none;
}
.chat-container.fullscreen .chat-messages { flex:1; }
.chat-container.fullscreen .chat-input-area { flex-shrink:0; }
