/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background: #f0f2f5;
}

/* 主容器 */
.chat-container {
    display: flex;
    height: 100vh;
    background: #fff;
}

/* 左侧面板 */
.left-panel {
    width: 400px;
    display: flex;
    border-right: 1px solid #e8e8e8;
}

/* 平台列表容器 */
.platform-list-container {
    width: 68px;
    background: #f7f7f7;
    border-right: 1px solid #e8e8e8;
    padding: 10px 0;
}

/* 平台列表项 */
.platform {
    position: relative;
    padding: 15px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.platform i {
    font-size: 24px;
    margin-bottom: 5px;
}

.platform span {
    font-size: 12px;
}

.platform .badge {
    position: absolute;
    top: 5px;
    right: 10px;
    background: #ff4d4f;
    color: #fff;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 12px;
}

.platform:hover {
    background: #e6f7ff;
}

.platform.active {
    background: #e6f7ff;
    color: #1890ff;
}

/* 联系人区域 */
.contacts-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 搜索框 */
.search-box {
    padding: 15px;
    position: relative;
    border-bottom: 1px solid #e8e8e8;
}

.search-box input {
    width: 100%;
    padding: 8px 30px;
    border: 1px solid #e8e8e8;
    border-radius: 20px;
    outline: none;
}

.search-box i {
    position: absolute;
    left: 25px;
    top: 23px;
    color: #999;
}

/* 联系人列表 */
.contact-list {
    flex: 1;
    overflow-y: auto;
}

.contact {
    padding: 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
}

.contact:hover {
    background: #f5f5f5;
}

.contact.active {
    background: #e6f7ff;
}

.contact-avatar {
    width: 40px;
    height: 40px;
    background: #1890ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-right: 10px;
}

.contact-info {
    flex: 1;
}

.contact-name {
    font-weight: 500;
    display: flex;
    justify-content: space-between;
}

.time {
    font-size: 12px;
    color: #999;
}

.last-message {
    color: #666;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unread {
    background: #ff4d4f;
    color: #fff;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 12px;
}

/* 右侧聊天区域 */
.chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 聊天标题 */
.chat-header {
    padding: 15px;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title .name {
    font-size: 16px;
    font-weight: 500;
}

.chat-title .status {
    font-size: 12px;
    color: #999;
    margin-left: 10px;
}

.chat-actions {
    display: flex;
    align-items: center;
}

.chat-actions i {
    margin-left: 15px;
    cursor: pointer;
    color: #666;
}

/* AI 开关样式 */
.ai-switch {
    display: flex;
    align-items: center;
    margin-right: 15px;
    padding: 5px 10px;
    border-radius: 4px;
    background: #f5f5f5;
    cursor: pointer;
    transition: all 0.3s;
}

.ai-toggle {
    display: none;
}

.ai-label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 14px;
    cursor: pointer;
}

.ai-label i {
    font-size: 16px;
}

/* 选中状态样式 */
.ai-toggle:checked + .ai-label {
    color: #1890ff;
}

.ai-toggle:checked + .ai-label i {
    color: #1890ff;
}

/* 聊天记录 */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f5f5f5;
}

.message {
    margin-bottom: 20px;
    display: flex;
}

.message.received {
    justify-content: flex-start;
}

.message.sent {
    justify-content: flex-end;
}

.message-avatar {
    width: 36px;
    height: 36px;
    background: #1890ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-right: 10px;
}

.message-content {
    max-width: 60%;
}

.message-text {
    padding: 10px 15px;
    border-radius: 16px;
    background: #fff;
    margin-bottom: 5px;
}

.message.sent .message-text {
    background: #1890ff;
    color: #fff;
}

.message-time {
    font-size: 12px;
    color: #999;
    text-align: right;
}

/* 输入区域 */
.chat-input {
    padding: 15px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    align-items: flex-end;
}

.input-actions {
    padding: 10px;
}

.input-actions i {
    margin-right: 15px;
    cursor: pointer;
    color: #666;
}

.input-box {
    flex: 1;
}

.input-box textarea {
    width: 100%;
    height: 60px;
    padding: 10px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    resize: none;
    outline: none;
}

.send-btn {
    margin-left: 15px;
    padding: 10px 20px;
    background: #1890ff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.send-btn:hover {
    background: #40a9ff;
}


