/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* 左侧边栏 */
.sidebar {
    width: 320px;
    background-color: #1e1e1e;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #2d2d2d;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
       border-bottom: 1px solid #2d2d2d;
       display: flex;
       flex-direction: column;  /* 改为竖向排列 */
       gap: 15px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.avatar {
    width: 50px;
    height: 50px;
    background-color: #2d2d2d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar i {
    font-size: 32px;
    color: #808080;
}

.user-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.status {
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.online {
    background-color: #28a745;
}

.status-dot.offline {
    background-color: #dc3545;
}

.status-text {
    font-size: 12px;
    color: #808080;
}

.copy-id-btn {
    background: #2d2d2d;
    border: none;
    color: #808080;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.copy-id-btn:hover {
    background: #3d3d3d;
    color: white;
}

/* 侧边栏区块 */
.sidebar-section {
    padding: 15px 20px;
    border-bottom: 1px solid #2d2d2d;
}

.sidebar-section h4 {
    font-size: 13px;
    color: #808080;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item {
    display: flex;
    margin-bottom: 8px;
    font-size: 13px;
}

.info-label {
    width: 45px;
    color: #808080;
}

.info-value {
    color: #ffffff;
    flex: 1;
}

/* 开关按钮 */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    cursor: pointer;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    width: 40px;
    height: 20px;
    background-color: #2d2d2d;
    border-radius: 20px;
    position: relative;
    transition: background-color 0.3s;
}

.toggle-slider:before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: #808080;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #0078d4;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
    background-color: #ffffff;
}

.toggle-label {
    font-size: 13px;
}

.translation-mode {
    font-size: 12px;
    color: #0078d4;
    font-style: italic;
    margin-top: 5px;
}

/* 好友列表区域 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-header h4 {
    margin: 0;
}

.friend-count, .online-count {
    background-color: #2d2d2d;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-left: 8px;
}

.add-friend-btn {
    background: transparent;
    border: none;
    color: #0078d4;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.add-friend-btn:hover {
    background-color: #2d2d2d;
}

.friend-list, .user-list {
    max-height: 200px;
    overflow-y: auto;
}

.friend-item, .user-item {
    display: flex;
       align-items: center;
       padding: 8px 10px;
       border-radius: 6px;
       cursor: pointer;
       transition: background-color 0.2s;
       margin-bottom: 2px;
       gap: 8px;
}

.friend-item:hover, .user-item:hover {
    background-color: #2d2d2d;
}

.friend-item.selected, .user-item.selected {
    background-color: #0078d4;
}

.friend-status, .user-status {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        margin-right: 10px;
        flex-shrink: 0;
}

.friend-status.online, .user-status.online {
    background-color: #28a745;
}

.friend-status.offline, .user-status.offline {
    background-color: #808080;
}

.friend-info {
    flex: 1;
}

.friend-name, .user-name {
     font-size: 13px;
        font-weight: 500;
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
}

.friend-nickname {
    font-size: 10px;
    color: #808080;
    margin-left: 5px;
}

.user-lang {
     font-size: 11px;
        color: #808080;
        flex-shrink: 0;
}

.status-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
}

.status-badge.online {
    color: #28a745;
}

.status-badge.offline {
    color: #808080;
}

.empty-tip {
    text-align: center;
    color: #555;
    font-size: 12px;
    padding: 15px;
}

/* 侧边栏底部 */
.sidebar-footer {
    padding: 15px 20px;
    margin-top: auto;
    display: flex;
    gap: 10px;
}

.settings-btn {
    flex: 1;
    padding: 8px;
    background-color: #2d2d2d;
    border: none;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: background-color 0.2s;
}

.settings-btn:hover {
    background-color: #3d3d3d;
}

.logout-btn {
    width: 36px;
    background-color: #2d2d2d;
    border: none;
    border-radius: 6px;
    color: #dc3545;
    cursor: pointer;
    transition: background-color 0.2s;
}

.logout-btn:hover {
    background-color: #3d3d3d;
}

/* 聊天区域 */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #1a1a1a;
}

.chat-header {
    padding: 15px 25px;
    background-color: #1e1e1e;
    border-bottom: 1px solid #2d2d2d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-partner-info h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.partner-language {
    font-size: 13px;
    color: #0078d4;
}

.new-message-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #dc3545;
    font-size: 12px;
}

.new-message-badge i {
    font-size: 8px;
}

/* 消息容器 */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.welcome-message {
    text-align: center;
    color: #808080;
    padding: 40px;
}

.welcome-message i {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.3;
}

/* 消息气泡 */
.message {
    display: flex;
    margin-bottom: 5px;
}

.message.my-message {
    justify-content: flex-end;
}

.message-content {
    max-width: 60%;
    padding: 10px 15px;
    border-radius: 18px;
    position: relative;
}

.message.my-message .message-content {
    background-color: #0078d4;
    color: white;
    border-bottom-right-radius: 4px;
}

.message.their-message .message-content {
    background-color: #2d2d2d;
    color: white;
    border-bottom-left-radius: 4px;
}

.message.system-message {
    justify-content: center;
}

.message.system-message .message-content {
    background-color: transparent;
    color: #808080;
    font-size: 12px;
    padding: 5px 10px;
}

.message-sender {
    font-size: 15px;
    color: #808080;
    margin-bottom: 2px;
}

.message-time {
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    margin-top: 2px;
    text-align: right;
}

/* 输入区域 */
.message-input-container {
    padding: 2px 2px 40px 2px;
    background-color: #1e1e1e;
    border-top: 1px solid #2d2d2d;
}

.input-wrapper {
    display: flex;
    background-color: #2d2d2d;
    border-radius: 24px;
    padding: 3px 5px;  /* 原来是 5px，改小 */
    margin-bottom: 5px;  /* 原来是 8px，改小 */
}

.input-wrapper textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 8px 15px;
    font-size: 14px;
    resize: none;
    outline: none;
    font-family: inherit;
}

.input-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    padding-right: 5px;
}

.send-btn {
    background-color: #0078d4;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s;
}

.send-btn:hover {
    background-color: #006cbd;
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.action-btn {
    background: transparent;
    border: none;
    color: #808080;
    font-size: 12px;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.action-btn:hover {
    background-color: #2d2d2d;
    color: white;
}

.hint {
    font-size: 11px;
    color: #555555;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: #1e1e1e;
    border-radius: 12px;
    width: 400px;
    max-width: 90%;
    max-height: 85vh;           /* 限制最大高度为屏幕的85% */
    display: flex;
    flex-direction: column;
    overflow: hidden;           /* 防止内容溢出 */
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #2d2d2d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 16px;
}

.close-btn {
    background: transparent;
    border: none;
    color: #808080;
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;           /* 内容过多时滚动 */
    flex: 1;
}

.modal-section {
    margin-bottom: 20px;
}

.modal-section h4 {
    color: #808080;
    font-size: 13px;
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 12px;
    color: #808080;
    margin-bottom: 5px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    background-color: #2d2d2d;
    border: 1px solid #3d3d3d;
    border-radius: 6px;
    color: white;
    font-size: 13px;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #0078d4;
}

.save-btn, .add-btn {
    width: 100%;
    padding: 10px;
    background-color: #0078d4;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.save-btn:hover, .add-btn:hover {
    background-color: #006cbd;
}

/* 身份码卡片 */
.id-card {
    text-align: center;
    padding: 20px;
}

.id-avatar {
    font-size: 60px;
    color: #0078d4;
    margin-bottom: 15px;
}

.id-username {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.id-code {
    background-color: #2d2d2d;
    padding: 10px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 12px;
    margin: 15px 0;
    word-break: break-all;
}

.text-center {
    text-align: center;
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #1e1e1e;
}

::-webkit-scrollbar-thumb {
    background: #3d3d3d;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4d4d4d;
}

/* 可折叠区块样式 */
.collapsible-section {
    border-bottom: 1px solid #2d2d2d;
}

.collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 0;
}

.collapsible-header:hover {
    background-color: #2a2a2a;
}

.collapsible-header h4 {
    margin: 0;
    flex: 1;
}

.toggle-icon {
    color: #808080;
    font-size: 12px;
    transition: transform 0.2s;
}

.collapsible-section.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.section-content {
    padding: 0 20px 12px 20px;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.collapsible-section.collapsed .section-content {
    display: none;
}

/* 小号添加好友按钮 */
.add-friend-btn-small {
    background: transparent;
    border: none;
    color: #0078d4;
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
    margin-right: 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.add-friend-btn-small:hover {
    background-color: #2d2d2d;
}

/* 好友列表样式优化 */
.friend-list {
    max-height: 200px;
    overflow-y: auto;
}

.user-list {
    max-height: 300px;
    overflow-y: auto;
}

/* ========== 移动端响应式样式 ========== */

/* 平板设备 (768px - 1024px) */
@media (max-width: 1024px) {
    .sidebar {
        width: 280px;
    }
    
    .message-content {
        max-width: 70%;
    }
}

/* 手机设备 (小于 768px) */
/* ========== 手机设备 (小于 768px) 优化 ========== */
@media (max-width: 768px) {
    /* 整体布局 */
    .app-container {
        height: 100vh;
        overflow: hidden;
    }
    
    .chat-area {
        display: flex;
        flex-direction: column;
        height: 100vh;
        overflow: hidden;
    }
    
    /* 侧边栏 */
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        width: 280px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.3);
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    .menu-toggle {
        position: fixed;
        top: 12px;
        left: 12px;
        width: 36px;
        height: 36px;
        background-color: #0078d4;
        border: none;
        border-radius: 50%;
        color: white;
        font-size: 18px;
        cursor: pointer;
        z-index: 100;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }
    
    /* 聊天头部 */
    .chat-header {
        padding: 10px 12px;
        flex-wrap: wrap;
        gap: 8px;
        flex-shrink: 0;
    }
    
    .chat-mode-switch {
        order: 1;
        width: 100%;
        justify-content: center;
    }
    
    .mode-btn {
        padding: 5px 12px;
        font-size: 12px;
    }
    
    .chat-partner-info {
        order: 2;
        flex: 1;
    }
    
    .chat-partner-info h2 {
        font-size: 14px;
        margin: 0;
    }
    
    .partner-language {
        font-size: 10px;
    }
    
    .room-status-bar {
        padding: 6px 12px;
        font-size: 11px;
        flex-shrink: 0;
    }
    
    /* 消息容器 - 可滚动 */
    .messages-container {
        flex: 1;
        overflow-y: auto;
        padding: 10px 8px;
        gap: 6px;
        min-height: 0;
    }
    
    .message {
        margin-bottom: 8px;
    }
    
    .message-content {
        max-width: 85%;
        padding: 8px 12px;
        font-size: 13px;
        line-height: 1.4;
    }
    
    .message-sender {
        font-size: 11px;
        margin-bottom: 2px;
        align-items: center;
    }
    
    .message-avatar {
        width: 22px;
        height: 22px;
        margin-right: 6px;
    }
    
    .message-time {
        font-size: 9px;
        margin-top: 4px;
    }
    
    .translate-msg-btn {
        font-size: 10px;
        padding: 2px 5px;
        margin-left: 6px;
    }
    
    .message-reactions {
        gap: 8px;
        margin-top: 6px;
        padding-top: 4px;
    }
    
    .reaction-btn {
        font-size: 10px;
        padding: 2px 4px;
    }
    
    /* 输入区域 - 固定在底部 */
    .message-input-container {
        flex-shrink: 0;
        padding: 8px 8px env(safe-area-inset-bottom) 8px;
        background-color: #1e1e1e;
        border-top: 1px solid #2d2d2d;
		margin-bottom: 40px;
    }
    
    .input-wrapper {
        padding: 2px 4px;
        border-radius: 20px;
        display: flex;
        align-items: center;
    }
    
    .input-wrapper textarea {
        padding: 6px 10px;
        font-size: 14px;
        max-height: 80px;
        flex: 1;
    }
    
    .input-actions {
        gap: 4px;
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }
    
    .send-btn {
        padding: 6px 14px;
        border-radius: 20px;
        white-space: nowrap;
    }
    
    .send-btn span {
        display: inline;
        font-size: 12px;
    }
    
    .image-btn {
        padding: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .image-btn i {
        font-size: 16px;
    }
    
    .input-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 8px;
        padding: 0 4px;
    }
    
    .action-btn {
        font-size: 11px;
        padding: 5px 10px;
        white-space: nowrap;
    }
    
    .hint {
        font-size: 10px;
        color: #555;
        white-space: nowrap;
    }
    
    /* 模态框 */
    .modal-content {
        width: 92%;
        max-height: 85vh;
        border-radius: 16px;
    }
    
    .modal-body {
        padding: 14px;
        max-height: calc(85vh - 100px);
        overflow-y: auto;
    }
    
    .avatar-option img {
        width: 50px;
        height: 50px;
    }
    
    .save-btn, .add-btn, .vip-btn {
        padding: 10px;
        font-size: 14px;
    }
    
    .vip-plans {
        flex-direction: column;
        gap: 12px;
    }
    
    .user-avatar {
        width: 28px;
        height: 28px;
    }
    
    .user-item {
        padding: 6px 8px;
    }
    
    .user-name {
        font-size: 12px;
    }
    
    .user-lang {
        font-size: 10px;
    }
    
    .vip-badge {
        font-size: 9px;
        padding: 1px 4px;
    }
}

/* ========== 小屏手机 (小于 480px) ========== */
@media (max-width: 480px) {
    .send-btn span {
        display: none;
    }
    
    .send-btn i {
        margin: 0;
        font-size: 16px;
    }
    
    .action-btn span {
        display: none;
    }
    
    .action-btn i {
        margin: 0;
        font-size: 14px;
    }
    
    .menu-toggle {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}

/* 小屏手机 (小于 480px) */
@media (max-width: 480px) {
    .chat-header {
        padding: 10px 12px;
    }
    
    .chat-header h2 {
        font-size: 14px;
    }
    
    .message-content {
        max-width: 90%;
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .send-btn {
        padding: 6px 12px;
    }
    
    .send-btn span {
        display: none;
    }
    
    .send-btn i {
        margin: 0;
    }
    
    .menu-toggle {
        width: 35px;
        height: 35px;
        font-size: 16px;
        top: 10px;
        left: 10px;
    }
    
    .sidebar {
        width: 260px;
    }
    
    .sidebar-header {
        padding: 20px;
            border-bottom: 1px solid #2d2d2d;
            display: flex;
            flex-direction: column;  /* 改为竖向排列 */
            gap: 15px;
    }
    
    .avatar {
        width: 40px;
        height: 40px;
    }
    
    .avatar i {
        font-size: 24px;
    }
    
    .user-info h3 {
        font-size: 14px;
    }
    
    .copy-id-btn {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .collapsible-header {
        padding: 10px 15px;
    }
    
    .section-content {
        padding: 0 15px 10px 15px;
    }
    
    .toggle-label {
        font-size: 12px;
    }
}

/* 翻译消息样式 - 跟随发送者消息 */
.message.my-message.translated-message {
    margin-top: 2px;
    margin-bottom: 8px;
}

.message.my-message.translated-message .translated-content {
    background-color: #0d5c9e;
    font-size: 12px;
    font-style: italic;
    padding: 5px 12px;
    border-bottom-right-radius: 4px;
    border-top-right-radius: 18px;
}

/* 对方消息中的翻译样式（可选） */
.message.their-message .translated-content {
    background-color: #1e4a3a;
    font-size: 12px;
    font-style: italic;
    padding: 5px 12px;
    border-bottom-left-radius: 4px;
    border-top-left-radius: 18px;
}

/* 可点击的发送者名称 */
.clickable-sender {
    cursor: pointer;
    transition: color 0.2s;
    font-weight: 500;
}

.clickable-sender:hover {
    color: #0078d4;
    text-decoration: underline;
}

/* 确保系统消息中的可点击样式一致 */
.message.system-message .clickable-sender {
    color: #0078d4;
    text-decoration: underline;
}

.message.system-message .clickable-sender:hover {
    color: #006cbd;
}

/* 账号相关样式 */
.account-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #2d2d2d;
}

.tab-btn {
    background: transparent;
    border: none;
    color: #808080;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
}

.tab-btn.active {
    color: #0078d4;
    border-bottom: 2px solid #0078d4;
}

.account-form {
    margin-top: 10px;
}

.account-hint {
    margin-top: 15px;
    font-size: 12px;
    color: #808080;
    text-align: center;
}

/* 验证码样式 */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-image {
    cursor: pointer;
    background: #2d2d2d;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.captcha-image svg {
    height: 36px;
    width: 100px;
    border-radius: 4px;
}

.refresh-captcha {
    background: #2d2d2d;
    border: none;
    color: #808080;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.refresh-captcha:hover {
    background: #3d3d3d;
    color: white;
}

/* 好友请求列表样式 */
.requests-list {
    max-height: 150px;
    overflow-y: auto;
}

.request-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-bottom: 1px solid #2d2d2d;
}

.request-info {
    flex: 1;
}

.request-name {
    font-size: 13px;
    font-weight: 500;
}

.request-time {
    font-size: 10px;
    color: #808080;
}

.request-actions {
    display: flex;
    gap: 8px;
}

.request-actions button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.accept-btn {
    background-color: #28a745;
    color: white;
}

.accept-btn:hover {
    background-color: #218838;
}

.decline-btn {
    background-color: #dc3545;
    color: white;
}

.decline-btn:hover {
    background-color: #c82333;
}

/* 已登录面板样式 */
.user-profile-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #2d2d2d;
    border-radius: 12px;
    margin-bottom: 20px;
}

.profile-avatar {
    font-size: 60px;
    color: #0078d4;
}

.profile-info {
    flex: 1;
}

.profile-username {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.profile-id {
    font-size: 11px;
    color: #808080;
    word-break: break-all;
}

.profile-section {
    margin-bottom: 20px;
    padding-top: 10px;
    border-top: 1px solid #2d2d2d;
}

.profile-section h4 {
    font-size: 14px;
    color: #808080;
    margin-bottom: 12px;
}

.logout-btn-full {
    width: 100%;
    padding: 10px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.logout-btn-full:hover {
    background-color: #c82333;
}

/* 侧边栏头部按钮区域 */
.header-actions {
    display: flex;
       gap: 8px;
       align-items: center;
       justify-content: space-between;  /* 让按钮均匀分布 */
}

.settings-icon-btn,
.logout-icon-btn {
    background: #2d2d2d;
       border: none;
       color: #808080;
       width: 40px;  /* 稍微加宽 */
       height: 40px;
       border-radius: 6px;
       cursor: pointer;
       transition: all 0.2s;
       display: flex;
       align-items: center;
       justify-content: center;
       flex: 1;  /* 让按钮等宽 */
}

.settings-icon-btn:hover {
    background: #3d3d3d;
    color: white;
}

.logout-icon-btn:hover {
    background: #3d3d3d;
    color: #dc3545;
}

.copy-id-btn {
     background: #2d2d2d;
        border: none;
        color: #808080;
        padding: 8px 12px;
        border-radius: 6px;
        cursor: pointer;
        font-size: 12px;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        gap: 5px;
        flex: 1;  /* 让按钮等宽 */
}

.copy-id-btn:hover {
    background: #3d3d3d;
    color: white;
}

/* 搜索框样式 */
.search-box {
    display: flex;
    align-items: center;
    background-color: #2d2d2d;
    border-radius: 20px;
    padding: 6px 12px;
    margin-bottom: 10px;
    gap: 8px;
}

.search-box i {
    color: #808080;
    font-size: 12px;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 13px;
    outline: none;
}

.search-input::placeholder {
    color: #555;
}

.user-name mark {
    background-color: #ffd700;
    color: #1a1a1a;
    border-radius: 2px;
    padding: 0 2px;
}

/* 图片消息样式 */
.image-message {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.image-message img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.image-message img:hover {
    transform: scale(1.02);
}

.image-name {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    word-break: break-all;
}

/* VIP 样式 */
.vip-info {
    padding: 5px 0;
}

.vip-status {
    background: #2d2d2d;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 13px;
}

.vip-status-badge {
    color: #ffd700;
    font-weight: bold;
}

.vip-benefits {
    margin: 12px 0;
}

.vip-benefits ul {
    margin-left: 20px;
    font-size: 12px;
    color: #a0a0a0;
}

.vip-benefits li {
    margin: 5px 0;
}

.vip-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    border: none;
    border-radius: 8px;
    color: #333;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: transform 0.2s;
}

.vip-btn:hover {
    transform: scale(1.02);
}

/* VIP 套餐选择 */
.vip-plans {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.vip-plan {
    flex: 1;
    background: #2d2d2d;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.vip-plan:hover {
    background: #3d3d3d;
    transform: translateY(-2px);
}

.vip-plan.selected {
    border: 2px solid #ffd700;
    background: #3d3d3d;
}

.vip-plan h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.vip-plan .price {
    font-size: 24px;
    font-weight: bold;
    color: #ffd700;
}

.vip-plan .price span {
    font-size: 12px;
    color: #808080;
}

.vip-plan ul {
    text-align: left;
    margin-top: 10px;
    font-size: 11px;
    list-style: none;
}

.vip-plan ul li {
    margin: 5px 0;
}

.recommend {
    position: absolute;
    top: -10px;
    right: 10px;
    background: #ffd700;
    color: #333;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
}

.paypal-btn {
    width: 100%;
    padding: 12px;
    background-color: #0070ba;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.paypal-btn:hover {
    background-color: #005ea6;
}

.vip-note {
    text-align: center;
    margin-top: 12px;
    font-size: 11px;
    color: #808080;
}

/* VIP 用户高亮样式 */
.user-item.vip-user {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 170, 0, 0.1));
    border-left: 3px solid #ffd700;
}

.user-item.vip-user:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 170, 0, 0.2));
}

.user-item.vip-user.selected {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 170, 0, 0.25));
    border-left-color: #ffaa00;
}

/* VIP 徽章 */
.vip-badge {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #333;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
    font-weight: bold;
    display: inline-block;
}

/* 添加到 css/style.css 中 */

/* ========================================
   价值主张卡片样式 - 外贸B2B专用
   ======================================== */

.value-prop-card {
    position: relative;
    max-width: 700px;
    margin: 40px auto;
    padding: 40px 32px;
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border-radius: 32px;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.1);
    text-align: center;
    animation: fadeInUp 0.5s ease-out;
}

/* 关闭按钮 */
.card-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

/* 主图标 */
.card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px -5px rgba(102, 126, 234, 0.3);
}

.card-icon i {
    font-size: 40px;
    color: white;
}

/* 标题 */
.card-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
    line-height: 1.3;
}

.title-sub {
    font-size: 20px;
    font-weight: 500;
    color: #667eea;
}

/* 描述文字 */
.card-description {
    font-size: 18px;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 28px;
}

.card-description strong {
    color: #667eea;
    font-weight: 600;
}

/* 语言徽章区域 */
.lang-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 32px;
}

.lang-badge {
    padding: 6px 14px;
    background: #f0f2f5;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    color: #2d3748;
    transition: all 0.2s;
}

.lang-badge:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.lang-badge-more {
    padding: 6px 14px;
    background: linear-gradient(135deg, #667eea10, #764ba210);
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    color: #667eea;
    border: 1px solid #667eea30;
}

/* 按钮区域 */
.card-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}

.btn-primary {
    padding: 14px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-outline {
    padding: 14px 28px;
    background: transparent;
    border: 2px solid #e2e8f0;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-outline:hover {
    border-color: #667eea;
    color: #667eea;
    background: #f8faff;
}

/* 信任标识 */
.trust-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
    padding-top: 16px;
    border-top: 1px solid #edf2f7;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #718096;
}

.trust-item i {
    font-size: 14px;
    color: #48bb78;
}

/* 底部提示 */
.card-note {
    font-size: 12px;
    color: #a0aec0;
    margin-bottom: 0;
}

.card-note #displayUserId {
    font-family: monospace;
    background: #f0f2f5;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    color: #667eea;
}

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .value-prop-card {
        margin: 20px 16px;
        padding: 28px 20px;
    }
    
    .card-title {
        font-size: 24px;
    }
    
    .title-sub {
        font-size: 16px;
    }
    
    .card-description {
        font-size: 15px;
    }
    
    .btn-primary, .btn-outline {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .lang-badge, .lang-badge-more {
        font-size: 11px;
        padding: 4px 12px;
    }
    
    .trust-badges {
        gap: 16px;
    }
    
    .trust-item {
        font-size: 11px;
    }
}

/* VIP 模态框样式优化 */
.vip-plans {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.vip-plan {
    flex: 1;
    min-width: 200px;
    padding: 24px 20px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 215, 0, 0.3);
    position: relative;
}

.vip-plan:hover {
    transform: translateY(-5px);
    border-color: #ffd700;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.vip-plan.selected {
    border-color: #ffd700;
    background: linear-gradient(135deg, #1a1a2e, #2a1a3e);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.vip-plan h4 {
    font-size: 22px;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 16px;
}

.vip-plan .price {
    font-size: 28px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 20px;
}

.vip-plan .price span:first-child {
    font-size: 32px;
    color: #ffd700;
}

.vip-plan .price span:last-child {
    font-size: 16px;
    color: #888;
}

.vip-plan ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.vip-plan ul li {
    padding: 8px 0;
    color: #ccc;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.vip-plan ul li:last-child {
    border-bottom: none;
}

.recommend {
    position: absolute;
    top: -12px;
    right: 20px;
    background: #ffd700;
    color: #1a1a2e;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.paypal-btn {
    display: block;
    width: 100%;
    max-width: 250px;
    margin: 0 auto 16px;
    padding: 14px 24px;
    background: #0070ba;
    color: white;
    border: none;
    border-radius: 40px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.paypal-btn:hover {
    background: #003087;
    transform: scale(1.02);
}

.vip-note {
    text-align: center;
    color: #888;
    font-size: 12px;
}

/* 导出聊天记录按钮 */
.export-chat-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #667eea;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.export-chat-btn:hover {
    background: rgba(102, 126, 234, 0.15);
    color: #5a67d8;
    transform: scale(1.05);
}

/* 侧边栏底部政策链接 */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 16px;
    text-align: center;
    font-size: 11px;
}

.sidebar-footer a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    margin: 0 4px;
}

.sidebar-footer a:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
}

.sidebar-footer .copyright {
    color: rgba(255, 255, 255, 0.3);
    margin-top: 8px;
    font-size: 10px;
}

/* VIP 弹窗移动端适配 */
@media (max-width: 768px) {
    .modal .modal-content {
        width: 90%;
        max-width: 350px;
        margin: 20px auto;
        padding: 20px;
    }
    
    .vip-plans {
        flex-direction: column;
        gap: 16px;
    }
    
    .vip-plan {
        padding: 16px;
        min-width: auto;
    }
    
    .vip-plan h4 {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .vip-plan .price {
        font-size: 24px;
        margin: 12px 0;
    }
    
    .vip-plan .price span:first-child {
        font-size: 28px;
    }
    
    .vip-plan .price span:last-child {
        font-size: 14px;
    }
    
    .vip-plan ul li {
        font-size: 12px;
        padding: 6px 0;
    }
    
    .paypal-btn {
        max-width: 100%;
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .vip-note {
        font-size: 10px;
    }
    
    .modal-header {
        padding: 15px 20px;
        border-bottom: 1px solid #2d2d2d;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-shrink: 0;             /* 防止头部被压缩 */
    }
	
	.modal-footer {
	    padding: 15px 20px;
	    border-top: 1px solid #2d2d2d;
	    flex-shrink: 0;
	}
}

/* 语言选择网格 */
.language-grid {
    max-height: 400px;
    overflow-y: auto;
}

.language-option {
    transition: background-color 0.2s;
}

.language-option:hover {
    background-color: #3d3d3d !important;
}

.language-option input[type="radio"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.language-option input[type="radio"]:checked {
    accent-color: #0078d4;
}

/* ========== 聊天室样式 ========== */

/* 模式切换按钮 */
.chat-mode-switch {
    display: flex;
    gap: 8px;
    background: #2d2d2d;
    padding: 4px;
    border-radius: 30px;
}

.mode-btn {
    background: transparent;
    border: none;
    color: #808080;
    padding: 6px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mode-btn i {
    font-size: 14px;
}

.mode-btn.active {
    background: #0078d4;
    color: white;
}

.mode-btn:hover:not(.active) {
    background: #3d3d3d;
    color: white;
}

/* 房间状态栏 */
.room-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
    background: #1e1e1e;
    border-bottom: 1px solid #2d2d2d;
    font-size: 13px;
}

.room-status-bar #roomName {
    color: #0078d4;
    font-weight: 500;
}

.room-status-bar #roomUserCount {
    color: #28a745;
    font-size: 12px;
}

/* 聊天室消息的翻译按钮 */
.translate-msg-btn {
    background: transparent;
    border: none;
    color: #808080;
    font-size: 11px;
    cursor: pointer;
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.translate-msg-btn:hover {
    background: #2d2d2d;
    color: #0078d4;
}

.translate-msg-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 翻译内容样式 */
.translated-content {
    font-size: 13px;
    font-style: italic;
    color: #a0a0a0;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px dashed #3d3d3d;
}

.translated-content i {
    margin-right: 6px;
    color: #0078d4;
}

/* 加载中动画 */
.loading-messages {
    text-align: center;
    padding: 40px;
    color: #808080;
}

.loading-messages i {
    margin-right: 8px;
}

/* ========== 表情反应样式 ========== */
.message-reactions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.reaction-btn {
    background: transparent;
    border: none;
    color: #808080;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 20px;
    transition: all 0.2s;
}

.reaction-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.reaction-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.like-btn:hover {
    color: #ffd700;
}

.dislike-btn:hover {
    color: #ff6b6b;
}

.like-count, .dislike-count {
    font-size: 11px;
    min-width: 20px;
    text-align: center;
}

/* 自己的消息不显示表情按钮 */
.my-message .message-reactions {
    display: none;
}

/* 用户列表头像 */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    flex-shrink: 0;
}

/* 好友列表头像（可选，保持一致） */
.friend-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    flex-shrink: 0;
}
/* ========== 头像选择样式 ========== */
.avatar-grid {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: #2d2d2d;
    border-radius: 12px;
}

.avatar-option {
    padding: 5px;
    border-radius: 12px;
    transition: all 0.2s;
    cursor: pointer;
}

.avatar-option:hover {
    background: #3d3d3d;
    transform: scale(1.05);
}

.avatar-option.avatar-selected {
    background: #0078d4;
    box-shadow: 0 0 0 2px #0078d4;
}

.avatar-option img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

/* 侧边栏头像 */
.avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}
/* 消息发送者头像 */
.message-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    vertical-align: middle;
}

/* 消息发送者区域布局 */
.message-sender {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 500;
}

.sender-name {
    flex: 1;
}

/* ========== 移动端模态框修复 ========== */

/* 确保模态框容器填满屏幕 */
.modal {
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-content {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-body {
    overflow-y: auto;
    flex: 1;
}

/* 手机端特殊处理 */
/* ========== 手机设备 (小于 768px) 优化 ========== */
@media (max-width: 768px) {
    /* 侧边栏 */
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        width: 280px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.3);
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    /* 菜单按钮 */
    .menu-toggle {
        position: fixed;
        top: 12px;
        left: 12px;
        width: 36px;
        height: 36px;
        background-color: #0078d4;
        border: none;
        border-radius: 50%;
        color: white;
        font-size: 18px;
        cursor: pointer;
        z-index: 100;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }
    
    /* 聊天区域 */
    .chat-area {
        width: 100%;
        padding-top: 0;
    }
    
    /* 聊天头部 */
    .chat-header {
        padding: 10px 12px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .chat-mode-switch {
        order: 1;
        width: 100%;
        justify-content: center;
    }
    
    .mode-btn {
        padding: 5px 12px;
        font-size: 12px;
    }
    
    .chat-partner-info {
        order: 2;
        flex: 1;
    }
    
    .chat-partner-info h2 {
        font-size: 14px;
        margin: 0;
    }
    
    .partner-language {
        font-size: 10px;
    }
    
    /* 房间状态栏 */
    .room-status-bar {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    /* ========== 消息区域优化 ========== */
    .messages-container {
        padding: 10px 8px;
        gap: 6px;
    }
    
    /* 消息气泡 */
    .message {
        margin-bottom: 8px;
    }
    
    .message-content {
        max-width: 85%;
        padding: 8px 12px;
        font-size: 13px;
        line-height: 1.4;
    }
    
    /* 消息发送者区域 */
    .message-sender {
        font-size: 11px;
        margin-bottom: 2px;
        align-items: center;
    }
    
    /* 消息头像 */
    .message-avatar {
        width: 22px;
        height: 22px;
        margin-right: 6px;
    }
    
    /* 时间戳 */
    .message-time {
        font-size: 9px;
        margin-top: 4px;
    }
    
    /* ========== 翻译按钮 ========== */
    .translate-msg-btn {
        font-size: 10px;
        padding: 2px 5px;
        margin-left: 6px;
    }
    
    /* ========== 表情按钮 ========== */
    .message-reactions {
        gap: 8px;
        margin-top: 6px;
        padding-top: 4px;
    }
    
    .reaction-btn {
        font-size: 10px;
        padding: 2px 4px;
    }
    
    /* ========== 输入区域优化 ========== */
    .message-input-container {
        padding: 8px 8px 12px 8px;
        background-color: #1e1e1e;
        border-top: 1px solid #2d2d2d;
    }
    
    .input-wrapper {
        padding: 2px 4px;
        border-radius: 20px;
    }
    
    .input-wrapper textarea {
        padding: 6px 10px;
        font-size: 14px;
        max-height: 80px;
    }
    
    .input-actions {
        gap: 4px;
    }
    
    .send-btn {
        padding: 6px 14px;
        border-radius: 20px;
    }
    
    .send-btn span {
        display: inline;
        font-size: 12px;
    }
    
    .image-btn {
        padding: 6px;
    }
    
    .image-btn i {
        font-size: 16px;
    }
    
    .input-footer {
        margin-top: 6px;
        padding: 0 4px;
    }
    
    .action-btn {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .hint {
        font-size: 10px;
    }
    
    /* ========== 模态框优化 ========== */
    .modal-content {
        width: 92%;
        max-height: 85vh;
        border-radius: 16px;
    }
    
    .modal-body {
        padding: 14px;
        max-height: calc(85vh - 100px);
        overflow-y: auto;
    }
    
    /* 头像网格在手机上缩小 */
    .avatar-grid {
        max-height: 200px;
    }
    
    .avatar-option img {
        width: 50px;
        height: 50px;
    }
    
    /* 按钮大小 */
    .save-btn, .add-btn, .vip-btn {
        padding: 10px;
        font-size: 14px;
    }
    
    /* VIP 套餐 */
    .vip-plans {
        flex-direction: column;
        gap: 12px;
    }
    
    .vip-plan {
        padding: 12px;
    }
    
    /* 价值主张卡片 */
    .value-prop-card {
        margin: 16px 12px;
        padding: 20px 16px;
    }
    
    .card-title {
        font-size: 20px;
    }
    
    .title-sub {
        font-size: 14px;
    }
    
    .card-description {
        font-size: 13px;
    }
    
    .btn-primary, .btn-outline {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .lang-badge, .lang-badge-more {
        font-size: 10px;
        padding: 3px 10px;
    }
    
    .trust-badges {
        gap: 12px;
    }
    
    .trust-item {
        font-size: 10px;
    }
    
    /* ========== 隐藏导出按钮文字（手机上只显示图标） ========== */
    .export-chat-btn {
        width: 32px;
        height: 32px;
    }
    
    /* ========== 用户列表头像 ========== */
    .user-avatar {
        width: 28px;
        height: 28px;
    }
    
    .user-item {
        padding: 6px 8px;
    }
    
    .user-name {
        font-size: 12px;
    }
    
    .user-lang {
        font-size: 10px;
    }
    
    /* VIP 徽章 */
    .vip-badge {
        font-size: 9px;
        padding: 1px 4px;
    }
}

/* ========== 小屏手机 (小于 480px) ========== */
@media (max-width: 480px) {
    .chat-header {
        padding: 8px 10px;
    }
    
    .mode-btn {
        padding: 4px 10px;
        font-size: 11px;
    }
    
    .mode-btn i {
        font-size: 12px;
    }
    
    .chat-partner-info h2 {
        font-size: 12px;
    }
    
    .message-content {
        max-width: 90%;
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .message-sender {
        font-size: 10px;
    }
    
    .message-avatar {
        width: 20px;
        height: 20px;
    }
    
    .translate-msg-btn {
        font-size: 9px;
        padding: 1px 4px;
    }
    
    .reaction-btn {
        font-size: 9px;
        padding: 1px 3px;
    }
    
    .send-btn {
        padding: 5px 12px;
    }
    
    .send-btn span {
        display: none;
    }
    
    .send-btn i {
        margin: 0;
        font-size: 16px;
    }
    
    .image-btn i {
        font-size: 14px;
    }
    
    .input-wrapper textarea {
        font-size: 13px;
        padding: 5px 8px;
    }
    
    .menu-toggle {
        width: 32px;
        height: 32px;
        font-size: 16px;
        top: 10px;
        left: 10px;
    }
}