/* Basic styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    margin: 0;
    background-color: #ededed;
    color: #000;
    font-size: 14px;
}

.wechat-container {
    display: flex;
    height: 100vh;
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid #d1d1d1;
    background-color: #f5f5f5;
}

/* Chat List */
.chat-list-container {
    width: 250px;
    border-right: 1px solid #d1d1d1;
    display: flex;
    flex-direction: column;
}

.chat-list-container .header {
    padding: 18px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #d1d1d1;
}

.chat-list-container .title {
    margin: 0;
    font-size: 20px;
}

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

.chat-item {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    cursor: pointer;
    border-bottom: 1px solid #e7e7e7;
}

.chat-item:hover, .chat-item.active {
    background-color: #e0e0e0;
}

.chat-item .avatar {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    margin-right: 12px;
}

.chat-item .chat-info .chat-name {
    font-weight: 500;
    margin: 0;
}

.chat-item .chat-info .last-message {
    color: #999;
    margin: 4px 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

/* Chat Window */
.chat-window-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.chat-window-container .header {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-window-container .header .chat-name {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    flex-grow: 1;
    text-align: center;
}

.back-icon, .ellipsis-icon {
    font-size: 22px;
    color: #000;
    cursor: pointer;
    font-weight: bold;
    padding: 0 8px;
}

.ellipsis-icon {
    font-weight: bold;
    letter-spacing: 1px;
}

.messages-container {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f5f5f5;
}

.message {
    display: flex;
    margin-bottom: 12px;
}

.message .avatar {
    width: 36px;
    height: 36px;
    border-radius: 5px;
}

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

.message.sent {
    flex-direction: row-reverse;
}

.message.sent .message-content {
    background-color: #95EC69;
    margin-right: 15px;
}

.message.sent .message-content::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 10px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 8px solid #95EC69;
}

.message.received .message-content {
    background-color: #fff;
    margin-left: 15px;
}

.message.received .message-content::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 10px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid #fff;
}

.input-container {
    display: flex;
    padding: 10px;
    border-top: 1px solid #d1d1d1;
    background-color: #f5f5f5;
}

.input-box {
    flex-grow: 1;
    border: none;
    padding: 10px;
    border-radius: 5px;
    margin-right: 10px;
    font-size: 14px;
}

.send-button {
    background-color: #07c160;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.send-button:hover {
    background-color: #06ad56;
}