/* 移动端响应式修复 */
@media (max-width: 768px) {
  /* 防止页面水平滚动 */
  body, html {
      overflow-x: hidden !important;
      width: 100% !important;
      max-width: 100% !important;
  }
  
  /* 修复页面容器 */
  .page-body {
      width: 100% !important;
      overflow-x: hidden !important;
  }
  
  /* 确保所有容器不超过屏幕宽度 */
  .container, .container-fluid, .row {
      width: 100% !important;
      max-width: 100% !important;
      margin-left: 0 !important;
      margin-right: 0 !important;
      padding-left: 0 !important;
      padding-right: 0 !important;
      overflow-x: hidden !important;
  }
  
  /* 修复Bootstrap列 */
  [class*="col-"] {
      width: 100% !important;
      max-width: 100% !important;
      padding-left: 15px !important;
      padding-right: 15px !important;
      box-sizing: border-box !important;
  }
  
  /* 修复面板类 */
  .panel, .panel-body, .draggable-portlets {
      width: 100% !important;
      max-width: 100% !important;
      overflow-x: hidden !important;
      word-wrap: break-word !important;
  }
  
  /* 修复按钮和表单元素 */
  .btn, input, select, textarea {
      max-width: 100% !important;
      box-sizing: border-box !important;
  }
  
  /* 修复表格 */
  .table-responsive {
      width: 100% !important;
      max-width: 100% !important;
      overflow-x: auto !important;
      -webkit-overflow-scrolling: touch !important;
  }
  
  /* 修复图片 */
  img {
      max-width: 100% !important;
      height: auto !important;
  }
  
  /* 修复内联样式可能导致的问题 */
  [style*="width"] {
      max-width: 100% !important;
  }
  
  /* 移除可能导致滚动的样式 */
  [style*="min-width"] {
      min-width: auto !important;
  }
  
  /* 修复居中对齐 */
  [align="center"] {
      text-align: center !important;
      width: 100% !important;
  }
}

/* 针对iOS Safari的特殊处理 */
@media screen and (max-width: 768px) and (-webkit-min-device-pixel-ratio: 0) {
  body {
      -webkit-overflow-scrolling: touch !important;
      overflow-scrolling: touch !important;
  }
}

/* 针对三星浏览器的特殊处理 */
@media screen and (max-width: 768px) and (-webkit-min-device-pixel-ratio: 1.5) {
  body {
      overflow-x: hidden !important;
  }
}