/* 消息页面样式 */
.messages-container {
    display: flex;
    height: calc(100vh - 220px);
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.contacts-panel {
    width: 350px;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.contacts-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.contacts-header h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
}

.contacts-search input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}

.contacts-search input:focus {
    border-color: #ff5000;
}

.contacts-list {
    flex: 1;
    overflow-y: auto;
}

.contact-item {
    display: flex;
    padding: 15px 20px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact-item:hover {
    background-color: #fafafa;
}

.contact-item.active {
    background-color: #fff5f0;
}

.contact-avatar {
    margin-right: 15px;
}

.avatar-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-name {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
    font-weight: 500;
}

.contact-message {
    font-size: 14px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.contact-time {
    font-size: 12px;
    color: #999;
    align-self: flex-start;
    padding-top: 5px;
}

.chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

.chat-partner {
    display: flex;
    align-items: center;
}

.partner-avatar {
    margin-right: 15px;
}

.partner-avatar .avatar-placeholder {
    width: 40px;
    height: 40px;
    font-size: 18px;
}

.partner-name {
    font-size: 18px;
    color: #333;
    font-weight: 500;
}

.partner-status {
    font-size: 14px;
    color: #19be6b;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #fafafa;
}

.message {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    max-width: 70%;
}

.message.received {
    align-items: flex-start;
}

.message.sent {
    align-items: flex-end;
    margin-left: auto;
}

.message-content {
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.5;
}

.message.received .message-content {
    background-color: #fff;
    border: 1px solid #eee;
    border-top-left-radius: 0;
}

.message.sent .message-content {
    background-color: #ff5000;
    color: white;
    border-top-right-radius: 0;
}

.message-image {
    margin-bottom: 20px;
}

.message-image.received {
    align-items: flex-start;
}

.image-placeholder {
    width: 200px;
    height: 200px;
    background-color: #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.message-time {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.message.received .message-time {
    align-self: flex-start;
}

.message.sent .message-time {
    align-self: flex-end;
}

.chat-input {
    display: flex;
    padding: 15px;
    border-top: 1px solid #eee;
    background-color: #fff;
}

.input-tools {
    margin-right: 10px;
}

.tool-btn {
    width: 40px;
    height: 40px;
    border: none;
    background-color: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-area {
    flex: 1;
}

.input-area input {
    width: 100%;
    height: 40px;
    padding: 0 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 15px;
}

.input-area input:focus {
    border-color: #ff5000;
}

.send-actions {
    margin-left: 10px;
}

@media (max-width: 768px) {
    .messages-container {
        height: calc(100vh - 180px);
    }
    
    .contacts-panel {
        width: 100px;
    }
    
    .contact-info {
        display: none;
    }
    
    .contact-time {
        display: none;
    }
}