    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }
    body, html {
      height: 100%;
      width: 100%;
      font-family: Arial, sans-serif;
    }
    body {
      margin: 0;
      padding: 0;
      background-color: #ccc; 
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh; 
    }
    .background {
      width: 1200px;      
      height: 90vh;        
      background-color: white;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); 
      border-radius: 8px;  
      overflow: hidden;   
      display: flex;
      flex-direction: row;
    }
    .left {
      width: 60px;
      height: 90vh;
      background-color: #e1dde3;
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    .avatar {
      position: relative;
      top: 20px;
      width: 34px;
      height: 34px;
      margin: 20px 0;
      border-radius: 8px;
    }
    .icons_top{
      position: relative;
      top:60px;
    }
    .icons_top, .icons_bottom {
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    .icons_bottom {
      margin-top: auto;
    }
    .icons_top img,
    .icons_bottom img {
      width: 26px;
      height: 26px;
      margin: 10px 0;
    }

    .icon-wrapper {
      position: relative;
      display: inline-block
    }

    .circle-icon-img {
      width: 100%;
      height: 100%;
    }

    .red-dot {
      position: absolute;
      top: 6px;
      right: -4px;
      width: 14px;
      height: 14px;
      background-color: red;
      color: white;
      font-size: 10px;
      font-weight: bold;
      border-radius: 50%;
      border: 1px solid white;
      display: flex;
      align-items: center;
      justify-content: center;
      line-height: 1;
    }

    .mid {
      width: 260px;
      background-color: #f7f7f7;
      display: flex;
      flex-direction: column;
      border-right: 1px solid #ddd;
    }
    .search-bar {
      position: relative;
      display: flex;
      align-items: center;
      background-color: #f0f0f0;
      border-radius: 6px;
      padding-left: 28px;
      padding-right: 28px;
      margin: 10px;
      height: 30px;
    }

    .search-bar input {
      width: 180px;
      padding: 6px 10px;
      border: none;
      outline: none;
      background: transparent;
      font-size: 14px;
      color: #333;
    }

    .search-icon {
      position: absolute;
      left: 8px;
      width: 14px;
      height: 14px;
      opacity: 0.5;
    }
    .add-btn {
      width: 20px;
      height: 20px;
      margin-left: 10px;
    }
    .chat-item {
      display: flex;
      justify-self: center;
      padding: 10px;
      cursor: pointer;
      transition: background-color 0.2s;
    }
    .chat-item a {
      display: flex;
      align-items: center;   /* 垂直居中对齐头像和文字 */
      text-decoration: none;
      color: inherit;
    }
    .chat-item:hover {
      background-color: #eaeaea;
    }
    .chat-avatar {
      width: 36px;
      height: 36px;
      margin-right: 10px;
    }
    .chat-info {
      flex: 1;
    }
    .chat-title {
      font-weight: bold;
      font-size: 14px;
      margin-bottom: 2px;
    }
    .chat-preview {
      font-size: 12px;
      color: gray;
    }

    .right {
      flex: 1;
      display: flex;
      flex-direction: column;
      background-color: #f3f3f3;
    }
    .chat-header {
      height: 60px;
      display: flex;
      align-items: center;
      padding-left: 20px;
      border-bottom: 1px solid #ddd;
      font-weight: bold;
    }
    .chat-body {
      height: 500px;
      padding: 20px;
      overflow-y: auto;
    }
    .message-row {
      position: relative;
      display: flex;
      justify-content: flex-end;
      align-items: flex-end;
      margin-top: 10px;
    }

    .message-bubble {
      background-color: #95ec69;
      padding: 10px 14px;
      border-radius: 10px;
      max-width: 60%;
      font-size: 14px;
      
    }
    .message-bubble-white {
      background-color: #ffffff;
      padding: 10px 14px;
      border-radius: 10px;
      max-width: 60%;
      font-size: 14px;
      
    }

    .message-row .triangle-right {
      position: absolute;
      right: -10px;
      top: 10px;
      width: 0;
      height: 0;
      border-top: 6px solid transparent;
      border-bottom: 6px solid transparent;
      border-left: 10px solid #95ec69; 
      margin-right: 6px;
    }
    .chat-body .chat-avatar {
      width: 32px;
      height: 32px;
      border-radius: 5px;
    }
    .chat-time {
      text-align: center;
      color: #999;
      font-size: 12px;
      margin: 10px 0;
    }
    .chat-footer {
      display: flex;
      flex-direction: row;
      height: 260px;
      display: flex;
      padding: 0 10px;
      border-top: 1px solid #ddd;
      background-color: #f3f3f3;
    }
    .footer-icon {
      display: flex;
      flex-direction: row;
      position: relative;
      top: 10px;
      left: 10px;
      width: 24px;
      height: 24px;
      margin-right: 10px;
    }

    .footer-input {
      margin-top: 8px;
      width: 800px;
      height: 100%;
      border: none;
      outline: none;
      background-color: #f4f4f4; 
      font-size: 14px;
      color: #333;
      padding: 6px 0;
      line-height: normal;
      vertical-align: top;
    }
    
    #link-chat.active img,
    #link-users.active img {
      outline: 2px solid #757875;
      border-radius: 6px;
      filter: brightness(1.1);
    }


   
    /* 头像样式 */
    .user-avatar {
      width: 36px;
      height: 36px;
      background-color: #4caf50; /* 绿色背景，可以换其他颜色 */
      border-radius: 4px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-weight: bold;
      margin-right: 10px;
      font-size: 16px;
    }

    /* 联系人名字 */
    .user-item span {
      font-size: 14px;
      color: #333;
    }

    .chat-list-item.active {
      background-color: #d7d9da;
    }

    .chat-list-item {
      display: flex;
      align-items: center;
      padding: 8px 12px;
      cursor: pointer;
      transition: background-color 0.2s;
    }
    .chat-list-item:hover {
      background-color: #eaeaea;
    }

    .message {
      display: flex;
      align-items: flex-end;
      margin: 8px 0;
    }

    /* 气泡通用样式 */
    .bubble {
      max-width: 60%;
      padding: 8px 12px;
      border-radius: 8px;
      line-height: 1.4;
      font-size: 14px;
      word-break: break-word;
    }

    /* 头像样式 */
    .avatar {
      width: 36px;
      height: 36px;
      border-radius: 4px;
      margin: 0 6px;
    }
    
    .msg-o{
      display: flex;
      flex-direction: row;
      margin: 10px;
    }

    .triangle-left{
      position: relative;
      left:10px;
      top: 10px;
      width: 0;
      height: 0;
      border-top: 6px solid transparent;
      border-bottom: 6px solid transparent;
      border-right: 10px solid #ffffff; 
      margin-right: 6px;
    }

    .triangle-right{
      position: relative;
      right:10px;
      top: 10px;
      width: 0;
      height: 0;
      border-top: 6px solid transparent;
      border-bottom: 6px solid transparent;
      border-left: 10px solid #95ec69; 
      margin-left: 6px;
    }

    .msg-i {
      display: flex;
      justify-content: flex-end;
      margin-bottom: 10px;
    }

    .msg-i .message-bubble {
      background-color: #95ec69; /* 自己的消息颜色 */
      border-radius: 10px;
      padding: 10px;
      max-width: 60%;
    }