:root {
  --wechat-white: #fff;
  --wechat-grey: #e0dee3;
  --wechat-background: #f3f3f3;
  --wechat-active: #dedede;

  --text-color: #161616;
  --text-light-color: #a8a8a8;

  --wechat-border-color: #e2e2e2;
  --wechat-icon-color: #6a686d;
  --wechat-icon-active-color: #53bf6a;
  --wechat-message-bg: #8be36a;
  --wechat-notice-color: #e85b52;
}

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

body, html {
  width: 100%;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background-color: #d0d0d0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  width: 1112px;
  height: 784px;
  background-color: var(--wechat-white);
  display: flex;
}

/* 左侧 sidebar */
.sidebar {
  position: relative;
  width: 60px;
  height: 784px;
  background-color: var(--wechat-grey);
  display:flex;
  flex-direction:column;
  align-items:center; 
}

/* 顶部圆点 */
.mac-icon {
  display:flex;
  gap:4px;
  margin-top:8px ;
}

/* 圆点尺寸 */
.circle{
  width:12px;
  height:12px;
  border-radius:50%;
}

/* 各自颜色 */
.circle.red    { background:#ff605c; }
.circle.yellow { background:#ffbd44; }
.circle.green  { background:#00ca4e; }

/* 中部: 头像 + 功能图标 */
.nav-section { 
  display:flex;
  margin-top: 48px;
  flex-direction:column;
  align-items:center;
  gap:26px;
}

/* 底部 3 个图标 */
.foot-section {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:26px;
  margin-top: 100px;
}

/* 头像盒子放大 */
#avatar{
  width:36px;
  height:36px;
}

/* 头像图片充满盒子 */
#avatar img{
  width:100%;
  height:100%;
  border-radius:4px;
  object-fit:cover;
}

.nav-item img {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display:flex;
  justify-content:center;
  align-items:center;
}

/* 朋友圈未读消息 */
.pengyouquan {
  position: relative;
}
.notice {
  position: absolute;
  font-size: 12px;
  width: 16px;
  height: 16px;
  right: -4px;
  top: -4px;
  background-color: var(--wechat-notice-color);
  color: var(--wechat-white);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 中间 chat list */
.chat-list {
  width: 260px;
  display: flex;
  flex-direction: column;
  background-color: var(--wechat-white);
  border-right: 1px solid var(--wechat-border-color);
}

/* 搜索区域 */
.search {
  position: relative;
  height: 60px;
  width: 100%;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  width: 14px;
  left: 24px;
}
.search-box {
  width: 196px;
  height: 28px;
  margin-left: 16px;
  border: none;
  border-radius: 4px;
  background-color: var(--wechat-grey);
  font-size: 12px;
  padding-left: 23px;
}
.create-group-chat {
  width: 28px;
  height: 28px;
  margin-left: 8px;
  border: none;
  border-radius: 4px;
  background-color: var(--wechat-grey);
  font-size: 24px;
}

/* 聊天列表 */
.chat-part {
  height: 68px;
  width: 100%;
  display: flex;
  background-color: var(--wechat-active);
}

/* 聊天对象头像 */
.chat-part-avator {
  width: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-left: 10px;
}
.chat-part-avator img {
  border-radius: 4px;
  object-fit: cover;
}

/* 接收信息 */
.chat-part-info {
  margin-top: 12px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  padding-right: 13px;
  padding-left: 12px;
}

.chat-part-name {
  font-size: 15px;
  font-weight: 500;
  color: tar(--text-color);
}
.chat-access-time {
  font-size: 12px;
  color: tar(--text-color);
}
.last-message {
  font-size: 12px;
  color: tar(--text-color);
}

/* 右侧 chat window */
.chat-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--wechat-background);
}

/* 顶部聊天名称 */
.chat-name {
  height: 60px;
  display: flex;
  align-items: center;
  border: var(--wechat-border-color) solid 1px;
}
.chat-name p {
  font-size: 18px;
  color: var(--text-color);
  font-weight: 500;
  margin-left: 25px;
}

/* 聊天主页面 */
.chat-box {
  height: 400px;
  width: 100%;
  border: var(--wechat-border-color) solid 1px;
  display: flex;
  flex-direction: column;
}

/* 聊天时间 */
.chat-time {
  display: flex;
  height: 80px;
  width: 100%;
  justify-content: center;
  padding-top: 45px;
}
.chat-time time {
  font-size: 13px;
  letter-spacing: 0.04rem;
  color: var(--text-light-color);
}

/* 聊天头像 */
.chat-avator {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  display: flex;
  margin-top: 1px;
  margin-right: 16px;
}


/* 聊天内容 */
.chat-message {
  width: 100%;
  height: 42px;
  display: flex;
  justify-content: flex-end;
}

/* 聊天气泡 */
.chat-bubble {
  position: relative;
  display: flex;
  margin-right: 10px;
  height: 38px;
  width: auto;
  max-width: 200px;
  background-color: var(--wechat-message-bg);
  border-radius: 4px;
  justify-content: center;
  align-items: center;
  padding: 10px 8px 10px 8px;
}

.chat-bubble p {
  font-size: 14px;
  color: var(--text-color);
  font-weight: 500;
}

/* 气泡三角形 */
.triangle-right {
  position: absolute;
  width: 0px;
  height: 0px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 6px solid var(--wechat-message-bg);
  right: -4px;
  top: 8px;
}

/* 信息发送框 */
.send-message {
  flex: 1;
  display: flex;
  flex-direction: column;
  border: var(--wechat-border-color) solid 1px;
}
/* 聊天工具栏 */
.tool {
  height: 50px;
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding-left: 16px;
  gap: 20px;
}

.tool img {
  height: 22px;
  width: 22px;
}
/* 输入框 */
.send-message {
  flex: 1;
  padding-left: 10px;
  background-color: transparent;
  border: none;
}

.send-message:focus {
  outline: none;
}