/* 移动端通用样式优化 */

/* 基础样式优化 */
html.mobile-device {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

html.mobile-device body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  color: #333;
}

/* 链接点击区域优化 */
html.mobile-device a {
  display: inline-block;
  min-height: 0.8rem;
  padding: 0.13333333rem 0;
  color: inherit;
}

/* 按钮优化 */
html.mobile-device button,
html.mobile-device input[type="button"],
html.mobile-device input[type="submit"] {
  min-height: 1.17333333rem;
  padding: 0.26666667rem 0.4rem;
  border-radius: 0.13333333rem;
  font-size: 0.37333333rem;
  touch-action: manipulation;
}

/* 输入框优化 */
html.mobile-device input[type="text"],
html.mobile-device input[type="password"],
html.mobile-device input[type="email"],
html.mobile-device input[type="number"],
html.mobile-device input[type="search"],
html.mobile-device input[type="tel"],
html.mobile-device textarea {
  font-size: 0.4rem; /* 确保字体大小合适，避免iOS自动缩放 */
  padding: 0.26666667rem;
  border-radius: 0.13333333rem;
  border: 1px solid #ccc;
  width: 100%;
  box-sizing: border-box;
}

/* 表格优化 */
html.mobile-device table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.32rem;
  overflow-x: auto;
  display: block;
  white-space: nowrap;
}

html.mobile-device td, 
html.mobile-device th {
  padding: 0.21333333rem;
  text-align: left;
}

/* 图片优化 */
html.mobile-device img {
  max-width: 100%;
  height: auto;
}

/* 长文本自动换行 */
html.mobile-device p, 
html.mobile-device li, 
html.mobile-device h1, 
html.mobile-device h2, 
html.mobile-device h3, 
html.mobile-device h4, 
html.mobile-device h5, 
html.mobile-device h6 {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* 表单元素间距 */
html.mobile-device form > * {
  margin-bottom: 0.53333333rem;
}

/* 优化阅读体验 */
html.mobile-device .content-container {
  padding: 0.4rem;
  max-width: 100%;
  box-sizing: border-box;
}

/* 自定义滚动条 */
html.mobile-device ::-webkit-scrollbar {
  width: 0.16rem;
  height: 0.16rem;
}

html.mobile-device ::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 0.08rem;
}

/* 媒体查询优化小屏幕设备 */
@media screen and (max-width: 375px) {
  html.mobile-device body {
    font-size: 0.373333333rem;
  }
} 