* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /*font-family: "Microsoft YaHei", sans-serif;*/
}
body {
    /* 关键1：系统字体栈 - 自动匹配iOS/Android系统默认字体 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 
                 "Helvetica Neue", Arial, "Noto Sans", sans-serif,
                 "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    /* 关键2：禁用iOS Safari自动调整字体，确保严格跟随系统设置 */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* 关键3：使用clamp实现自适应字体大小（跟随系统字体缩放） */
    /* clamp(最小值, 首选值, 最大值)，4vw=屏幕宽度的4%，自动适配 */
    /*font-size: clamp(14px, 4vw, 20px);*/
    /*line-height: 1.6;*/
    background-color: #F2F5F5;
    color: #333;
}
/* 设备信息区 */
.device-section {
    background-color: #ffffff00;
    /*background-color: green;*/
    /*margin: 12px;*/
    margin-top: 16px;
    margin-left: 24px;
    margin-right: 24px;
    margin-bottom: 16px;
    /*border-radius: 14px;*/
    /*padding: 12px;*/
    display: flex;
    align-items: center;
    /*gap: 16px;*/
}
.device-img {
    width: 164px;
    height: 164px;
    background-color: #ffffff00;
    /*background-color: red;*/
    /*border-radius: 8px;*/
}
.device-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.device-name {
    flex: 1;
    font-size: 22px;
    /*font-weight: 500;*/
    margin-bottom: 4px;
    color: #000000CC
}
.device-status {
    flex: 1;
    font-size: 14px;
    color: #0000007F
}
.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%; /* 圆形指示器 */
    display: inline-block;
    margin-right: 6px;
  }
        /* 暗色图标（离线/关闭状态） */
  .status-indicator.offline {
    background-color: #999; /* 灰色 */
  }

  /* 亮色图标（在线/活跃状态） */
  .status-indicator.online {
    background-color: #4cd964; /* 绿色 */
  }
/* 数据卡片区 */
.data-cards {
    padding: 0 16px 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.data-card {
    background-color: #fff;
    border-radius: 14px;
    padding: 12px;
    text-align: center;
}
.data-label {
    font-weight: bold;
    text-align: left;
    /*background-color: red;*/
    font-size: 15px;
    color: #000000CC;
    margin-bottom: 8px;
    /*font-family: "PingFang"*/
}
.data-value {
    font-size: 26px;
    font-weight: 500;
    margin-bottom: 4px;
    /*font-family: "PingFang"*/
}
.data-unit {
    font-size: 13px;
    color: #0000007F;
    /*font-family: "PingFang"*/
}

/* 历史记录区 */
.history-section {
    display: flex;
    flex-direction: row;
    /*margin: 0 12px 12px;*/
    /*border-radius: 10px;*/
    /*padding: 16px;*/
}
.history-title {
    /*width: calc((100% - 48px) / 2);*/
    width: calc(100% - 32px);
    background-color: #fff;
    font-size: 15px;
    /*font-weight: bold;*/
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 16px;
    margin-bottom: 10px;
    border-radius: 14px;
    /*padding: 12px;*/
    padding-left: 12px;
    padding-right: 12px;
    padding-top: 20px;
    padding-bottom: 20px;
    /*font-family: "PingFang";*/
    color: #000000CC;
}
.arrow-right-sex {
    width: 30px;
    height: 30px;
    /*background-color: #eee;*/
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}
.arrow-right {
    width: 12px;
    height: 12px;
    object-fit: contain;
    /*background-color: #eee;*/
    /*border-radius: 50%;*/
    display: flex;
    align-items: center;
    justify-content: center;
    /*font-size: 13px;*/
}

/* 说明文字区 */
.description {
    margin: 0 16px 16px;
    padding: 12px;
    background-color: #fff;
    border-radius: 14px;
    font-size: 13px;
    color: #0000007F;
    line-height: 1.6;
    /*font-family: "PingFang"*/
}
/* 遮罩层样式 */
.gender-mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* 弹窗容器 */
.gender-modal {
  background: #fff;
  width: 90%;
  max-width: 300px;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* 标题样式 */
.gender-title {
  margin: 0 0 20px;
  font-size: 18px;
  color: #333;
  text-align: center;
  font-weight: 600;
}

/* 选项列表 */
.gender-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

/* 选项按钮 */
.gender-option {
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #f9f9f9;
  font-size: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.gender-option:hover {
  background: #f0f0f0;
  border-color: #ccc;
}

.gender-option:active {
  background: #e8e8e8;
}

/* 关闭按钮 */
.gender-close {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: #f2f2f2;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  transition: background 0.2s;
}

.gender-close:hover {
  background: #e5e5e5;
}
/* 核心：限制2行文本，超出隐藏 */
.limit-2lines {
    font-weight: bold;
    /* 关键属性 - 缺一不可 */
    display: -webkit-box; /* 弹性盒模型（webkit内核专用） */
    -webkit-line-clamp: 2; /* 限制显示的行数为2 */
    -webkit-box-orient: vertical; /* 文本垂直排列 */
    overflow: hidden; /* 超出容器的内容隐藏 */
    
    /* 可选：超出部分显示省略号（如果不需要省略号，仅隐藏，可删除这行） */
    /*text-overflow: ellipsis; */
    
    /* 可选：禁止文本换行（-webkit-line-clamp已处理，此行为兜底） */
    word-break: break-all; /* 中文换行友好 */
    white-space: normal;
}