body { font-family: "Microsoft YaHei", sans-serif; background: #f0f2f5; margin: 0; display: flex; justify-content: center; align-items: center; height: 100vh; overflow: hidden; }
.card { background: #fff; padding: 25px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); width: 350px; }
.hidden { display: none !important; }

/* 主包装容器 */
#chat-wrapper { display: flex; width: 95vw; height: 92vh; background: white; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); overflow: hidden; }

/* 左侧边栏样式 */
#side-bar { width: 260px; background: #2c3e50; color: white; display: flex; flex-direction: column; border-right: 1px solid #ddd; }
.side-header { padding: 20px; font-weight: bold; background: #1a252f; text-align: center; font-size: 16px; letter-spacing: 1px; }
#contact-list { flex: 1; overflow-y: auto; padding: 10px 0; }
.contact-item { padding: 15px 20px; border-bottom: 1px solid #34495e; cursor: pointer; transition: background 0.2s; font-size: 13px; word-break: break-all; }
.contact-item:hover { background: #3e5871; }
.side-footer { padding: 15px; border-top: 1px solid #34495e; }
#btn-back-global { width: 100%; padding: 12px; background: #3498db; color: white; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; }

/* 右侧主聊天区 */
#main-chat { flex: 1; display: flex; flex-direction: column; padding: 20px; background: #fff; }
#chat-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; padding-bottom: 15px; }
#user-display { font-weight: bold; color: #333; }
.header-btns button { padding: 5px 10px; font-size: 11px; margin-left: 5px; cursor: pointer; border: none; border-radius: 4px; color: white; }
#btn-clear { background: #95a5a6; }
#btn-delete-account { background: #333; }
#btn-logout { background: #e74c3c; }

#dm-input-bar { display: flex; gap: 8px; margin: 15px 0; padding: 10px; background: #f8f9fa; border-radius: 8px; }
#dm-input-bar input { flex: 1; padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; outline: none; }
#dm-input-bar button { padding: 8px 15px; background: #9b59b6; color: white; border: none; border-radius: 4px; cursor: pointer; font-weight: bold; }

#status-line { font-size: 12px; color: #7f8c8d; margin-bottom: 10px; padding-left: 5px; }
#messages { flex: 1; overflow-y: auto; background: #fdfdfd; border: 1px solid #f0f0f0; padding: 15px; border-radius: 8px; margin-bottom: 15px; }
.message-item { margin-bottom: 12px; line-height: 1.5; }
.message-user { font-weight: bold; color: #2980b9; margin-right: 8px; }

/* 底部发送区 */
.input-area { display: flex; gap: 10px; }
.input-area input { flex: 1; padding: 12px; border: 1px solid #ddd; border-radius: 6px; outline: none; }
#btn-send { width: 100px; background: #2ecc71; color: white; border: none; border-radius: 6px; font-weight: bold; cursor: pointer; }

/* 登录框内部样式 */
.input-group input { display: block; width: 100%; padding: 12px; margin-bottom: 12px; border: 1px solid #ddd; border-radius: 6px; box-sizing: border-box; }
.button-group button { width: 100%; padding: 12px; cursor: pointer; border: none; border-radius: 6px; font-weight: bold; margin-bottom: 8px; }
#btn-login { background: #0084ff; color: white; }
.secondary { background: #42b72a; color: white; }