/* 聊天消息区域 */
#messages {
  border: 1px solid #e9ecef;
  padding: 15px;
  margin-bottom: 10px;
  height: 450px;
  overflow-y: auto;
  background-color: #fafafa;
  border-radius: 8px;
}

/* 选中好友样式 */
.selected {
  background-color: #e9ecef !important;
  font-weight: 500;
}

/* 未读消息徽章 */
.unread-badge {
  background-color: #dc3545;
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  min-width: 20px;
  text-align: center;
  display: inline-block;
}

/* 头像样式 */
.avatar {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 用户信息显示区域 */
.user-info-display {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.user-info-display .user-id {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  opacity: 0.9;
  background: rgba(255,255,255,0.2);
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 5px;
}

/* 输入框样式改进 */
#messageInput {
  border: 2px solid #e9ecef;
  border-radius: 20px;
  padding: 12px 18px;
  font-size: 14px;
  resize: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#messageInput:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

#messageInput:disabled {
  background-color: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}

/* 发送按钮样式 */
#sendBtn {
  border-radius: 20px;
  padding: 12px 24px;
  font-weight: 500;
  transition: all 0.3s;
}

#sendBtn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

#sendBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 好友列表项改进 */
#friendList li {
  transition: all 0.2s ease;
  user-select: none;
}

#friendList li:hover {
  transform: translateX(3px);
}

/* 加载动画 */
.loading-icon {
  text-align: center;
  padding: 40px 20px;
}

.loading-icon i {
  color: #007bff;
}

/* 在线状态指示器 */
.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

.online-dot.online {
  background-color: #28a745;
  box-shadow: 0 0 0 3px rgba(40,167,69,0.2);
}

.online-dot.offline {
  background-color: #6c757d;
}

/* 聊天区域整体布局 */
.chat-container {
  height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}

.chat-messages-wrapper {
  flex: 1;
  overflow-y: auto;
}


