@charset "UTF-8";

html {
  position: relative;
  width: 100%;
  width: 100vw;
  height: 100%;
  height: 100vh;
  font-family: system-ui, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans",
    "Helvetica Neue", sans-serif;
  font-family: "Iosevka Curly", HYYouYuan;
  font-weight: normal;
  font-style: normal;
  font-variant: normal;
  text-transform: none;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* 字体不会随着网页放大而变大, 自从chrome 27之后，就取消了对这个属性的支持。同时，该属性只对英文、数字生效，对中文不生效 */
  text-size-adjust: none;
  /* 自动平滑滚动 */
  scroll-behavior: smooth;
  -webkit-user-drag: none;
  touch-action: pan-y;
  /* 配合 rem.js */
  font-size: 16px;
}

body {
  position: relative;
  width: 100%;
  width: 100vw;
  height: 100%;
  height: 100vh;
  /* 局部滚动使用弹性滚动效果 */
  -webkit-overflow-scrolling: touch;
  -webkit-user-drag: none;
  touch-action: pan-y;
  /* 默认字体大小 */
  font-size: 16px;
  line-height: 1.4;
}

:root,
:host {
  /* *,*::before,*::after */
  html,
  body,
  div,
  span,
  applet,
  object,
  iframe,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  p,
  blockquote,
  pre,
  a,
  abbr,
  acronym,
  address,
  big,
  cite,
  code,
  del,
  dfn,
  em,
  font,
  img,
  ins,
  kbd,
  q,
  s,
  samp,
  small,
  strike,
  strong,
  sub,
  sup,
  tt,
  var,
  dl,
  dt,
  dd,
  ol,
  ul,
  li,
  fieldset,
  form,
  label,
  legend,
  table,
  caption,
  tbody,
  tfoot,
  thead,
  tr,
  th,
  td {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    vertical-align: baseline;
    /* 去掉点击时的蓝色外边框和灰色半透明背景 */
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    box-sizing: border-box;
  }

  a,
  a:link,
  a:visited,
  a:hover,
  a:active {
    /* 禁止长按链接与图片弹出菜单 */
    -webkit-touch-callout: none;
    text-decoration: none;
  }
  /* remember to define focus styles! */
  :focus,
  a:focus {
    outline: 0;
  }

  button,
  a,
  [role="button"] {
    /* 禁止双击缩放、双指缩放等手势操作 */
    /* 告诉浏览器该元素仅用于点击交互，无需等待300ms判断手势，直接派发click事件 */
    /* 仅对可点击元素生效 */
    touch-action: manipulation;
  }

  img,
  picture {
    display: block;
    max-width: 100%;
    border: 0 none;
    object-fit: cover;
    /* 禁止长按链接与图片弹出菜单 */
    -webkit-touch-callout: none;
    /*
    * Added 2009/02/04 to fix IE7's issue with interpolated
    * scaling not turned on by default.  Based on an idea from
    * http://acidmartin.wordpress.com/2009/01/05/better-image-scaling-and-resampling-in-internet-explorer/
    */
    -ms-interpolation-mode: bicubic;
  }

  pre {
    max-width: 100%;
    overflow: hidden;
  }

  table {
    border-collapse: collapse;
    border-spacing: 0;
  }
  caption,
  th,
  td {
    text-align: left;
    font-weight: normal;
  }

  ul,
  ol {
    list-style: none;
  }

  input::-ms-clear {
    display: none !important;
  }
  input,
  button,
  textarea,
  select {
    outline: none;
    font: inherit;
    margin: 0;
    padding: 0;
  }
  textarea {
    /* increase the height of the textarea automatically based on the amount of text the user enters */
    form-sizing: normal;
  }

  /* Balance text wrapping on headings */
  h1,
  h2,
  h3,
  h4 {
    text-wrap: balance;
  }

  blockquote:before,
  blockquote:after,
  q:before,
  q:after {
    content: "";
  }
  blockquote,
  q {
    quotes: "" "";
  }

  .none {
    display: none;
  }
  .hidden {
    visibility: hidden;
  }
  .opacity-0 {
    opacity: 0;
    filter: Alpha(opacity=0);
  }
  /* 阻止鼠标选择文本 */
  .no-user-select {
    user-select: none;
  }
  /* 禁止鼠标事件触发 */
  .no-pointer-events {
    pointer-events: none;
  }

  .blur {
    filter: blur(20px);
  }
  /* 毛玻璃质感 */
  .glass {
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
  }

  /*
  清除浮动
  浮动特性
  1. 只会影响后面的元素
  2. 文本不会被浮动元素覆盖
  3. 具备内联盒子特性：宽度由内容局定
  4. 具备块级盒子特性：支持所有样式
  5. 浮动放不下，会自动换行
  */
  .clearfix::after {
    content: "";
    display: block;
    clear: both;
  }

  .truncate,
  .ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-wrap: normal;
    word-break: break-all;
  }

  /* 基于高度截断 */
  /*
  .truncate-twoline {
    line-height: 20px;
    height: 40px;
    position: relative;
    overflow: hidden;
    word-wrap: normal;
    word-break: break-all;
  }
  .truncate-twoline::after {
    content: "...";
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 0 20px 0 10px;
    background: linear-gradient(to right, transparent, #fff 55%);
  }
  */

  /* 基于行数截断 */
  /*
  .text-ellipsis-twoline {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-wrap: normal;
    word-break: break-all;
  }
  */

  .text-hide {
    font: 0/0;
    color: transparent;
    text-indent: -9999px;
  }

  .font-10 {
    font-size: 12px;
    display: inline-block;
    /* 触发重排 */
    /* zoom: 0.83; */
    -webkit-transform: scale(0.83);
    -moz-transform: scale(0.83);
    -o-transform: scale(0.83);
    transform: scale(0.83);
  }

  /*
  .one-pixel-line {
    display: block;
    position: relative;
  }
  .one-pixel-line::before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transform-origin: 0 0;
    border-top: 1px solid #000000;
  }
  @media (min-resolution: 2dppx) {
    .one-pixel-line::before {
      width: 200%;
      transform: scale(0.5) translateZ(0);
    }
  }
  @media (min-resolution: 3dppx) {
    .one-pixel-line::before {
      width: 300%;
      transform: scale(0.333333) translateZ(0);
    }
  }
  */

  /* Anything that has been anchored to should have extra scroll margin */
  /* :target {
    scroll-margin-block: 5ex;
  } */
}
