* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    padding: 20px;
}

.container {
    display: flex;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* 编辑面板 */
.edit-panel {
    flex: 0 0 350px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.edit-panel h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
}

.edit-form {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.edit-form:last-child {
    border-bottom: none;
}

.edit-form label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
}

.edit-form input[type="text"],
.edit-form textarea,
.edit-form select {
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.edit-form textarea {
    min-height: 80px;
    resize: vertical;
}

.edit-form button {
    width: 100%;
    padding: 10px;
    background: #4A90E2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.edit-form button:hover {
    background: #357ABD;
}

.edit-form small {
    display: block;
    color: #999;
    font-size: 12px;
    margin: 8px 0 4px 0;
}

.file-input {
    margin-bottom: 8px;
}

.avatar-preview {
    width: 60px;
    height: 60px;
    margin: 8px 0;
    border: 2px solid #ddd;
    border-radius: 50%;
    overflow: hidden;
    background: #f5f5f5;
}

.preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 聊天容器 */
.chat-container {
    flex: 1;
    background: #2C3E50;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.chat-header {
    background: #34495E;
    padding: 15px 20px;
    border-bottom: 1px solid #2C3E50;
}

.chat-header h1 {
    color: white;
    font-size: 16px;
    font-weight: normal;
}

.chat-messages {
    padding: 20px;
    min-height: 600px;
    max-height: 800px;
    overflow-y: auto;
}

/* 消息样式 */
.message-wrapper {
    display: flex;
    margin-bottom: 20px;
    gap: 12px;
}

.message-wrapper.left {
    justify-content: flex-start;
}

.message-wrapper.right {
    justify-content: flex-end;
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    flex-shrink: 0;
}

.message-content {
    max-width: 60%;
    display: flex;
    flex-direction: column;
}

.message-wrapper.left .message-content {
    align-items: flex-start;
}

.message-wrapper.right .message-content {
    align-items: flex-end;
}

.message-time {
    font-size: 11px;
    color: #95A5A6;
    margin-bottom: 5px;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 8px;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 14px;
}

.message-wrapper.left .message-bubble {
    background: #3A4F63;
    color: white;
    border-top-left-radius: 2px;
}

.message-wrapper.right .message-bubble {
    background: #5A9FD4;
    color: white;
    border-top-right-radius: 2px;
}

.read-status {
    font-size: 12px;
    color: #7FBF7F;
    margin-top: 4px;
}

/* 消息操作按钮 */
.message-actions {
    margin-top: 8px;
    display: none;
    gap: 5px;
}

.message-wrapper:hover .message-actions {
    display: flex;
}

.btn-small {
    padding: 4px 8px;
    font-size: 11px;
    background: #5A9FD4;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.btn-small:hover {
    background: #4A8FC4;
}

.btn-delete {
    background: #E74C3C;
}

.btn-delete:hover {
    background: #C0392B;
}

/* 滚动条样式 */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #2C3E50;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #4A5F7F;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #5A7F9F;
}

/* 响应式 */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }

    .edit-panel {
        flex: 1;
    }
}