body,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
p,
blockquote,
dl,
dt,
dd,
ul,
ol,
li,
pre,
form,
fieldset,
legend,
button,
input,
textarea,
th,
td {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  cursor: pointer;
}
body {
  /* 系统字体栈 - 自动跟随操作系统字体 */
  font-family:
   /* macOS 中文 */ 'PingFang SC',
    /* 系统默认字体 (现代浏览器优先) */ system-ui, -apple-system,
    BlinkMacSystemFont, /* Windows */ 'Segoe UI',
    /* Windows 中文 */ 'Microsoft YaHei', /* Linux */ 'Noto Sans SC',
    'Source Han Sans SC', /* 通用回退 */ 'Helvetica Neue', Helvetica, Arial,
    sans-serif, /* Emoji 支持 */ 'Apple Color Emoji', 'Segoe UI Emoji',
    'Noto Color Emoji';
  /* 防止移动端水平溢出导致出现滚动条 */
  overflow-x: hidden;
  /* 移动端优化：禁止双击缩放、优化字体渲染 */
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
#app {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  /* 确保内容不会超出视口宽度 */
  max-width: 100vw;
}
/* 设置鼠标小手样式 */
.hand-style {
  cursor: pointer;
}

.article-title-style {
  cursor: pointer;
  font-weight: bold; /* 字体加粗 */
  /* font-size: 20px; 字体大小 */
}

.article-content-style {
  cursor: pointer;
}

a {
  text-decoration: none;
}
.el-tabs__nav-scroll {
  overflow-x: scroll !important;

  &::-webkit-scrollbar {
    display: none !important;
  }
}

/* @font-face {
     font-family: 'font';
     src: url('./assets/font/2.woff2');
 } */

.el-upload--picture-card {
  background-color: var(--background-color) !important;
}

.el-dropdown-menu {
  background-color: var(--background-color) !important;
  color: var(--text-color) !important;
  border: 0 !important;

  .popper__arrow::after {
    border-bottom-color: var(--background-color) !important;
  }

  .el-dropdown-menu__item {
    transition: transform 0.35s !important;
  }

  .el-dropdown-menu__item:hover {
    background-color: rgb(0, 0, 0, 0) !important;
    transform: translateX(6px);
  }
}

/* 修改滚动条宽度 */
::-webkit-scrollbar {
  width: 6px;
  /* height: 6px; */
}

/* 修改滚动条颜色 */
::-webkit-scrollbar-thumb {
  background-color: #79caab;
  /* background-color: #00000000; */
  background-image: -webkit-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.4) 100%,
    transparent 100%,
    transparent 50%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0.4) 75%,
    transparent 75%,
    transparent
  );
  -webkit-border-radius: 2em;
  -moz-border-radius: 2em;
  border-radius: 2em;
}

/* 修改滚动条轨道颜色 */
::-webkit-scrollbar-track {
  /* background-color: #f5f5f5; */
  border-radius: 5px;
}

::selection {
  color: #fff;
  background-color: #d17598;
}

.el-card__body {
  padding: 0 !important;
}

.el-card {
  border: 0 !important;
  border-radius: 5px;
}

.el-dialog {
  background-color: var(--background-color) !important;
  color: var(--article-color) !important;
  border-radius: 10px;

  .el-dialog__title {
    color: var(--article-color) !important;
  }
}

.el-input__inner {
  background-color: var(--background-color) !important;
  border-color: var(--border-line) !important;

  &:focus {
    border-color: var(--theme-color) !important;
  }
}

.box-shadow-top {
  transition: box-shadow 0.35s, transform 0.35s !important;

  &:hover {
    box-shadow: 1px 1px 5px 5px rgba(49, 211, 162, 0.322) !important;
    transform: translateY(-2px) !important;
  }
}

.box-shadow {
  transition: box-shadow 0.35s;

  &:hover {
    box-shadow: 1px 1px 5px 5px rgba(49, 211, 162, 0.322) !important;
  }
}

.container {
  display: flex;
  justify-content: center;
}

.tag-item {
  display: inline-block;
  border-radius: 5px;
  padding: 5px;
  margin-right: 5px;
  margin-bottom: 5px;
  color: #fff;
  transition: all 0.3s;

  &:hover {
    border-radius: 0;
    background-color: #000 !important;
  }
}

@media screen and (max-width: 1118px) {
  .el-dialog {
    width: 90% !important;
  }
}

.no-select {
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.common-popper {
  padding: 0 !important;
  box-sizing: border-box;
  border: none !important;
  box-shadow: 0 2px 12px 0 #00000014;
}

/* ===== 移动端浏览器（微信/QQ/手机浏览器）全局优化 ===== */
@media screen and (max-width: 767px) {
  /* 优化触摸滚动性能 */
  html, body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }
  
  /* el-dropdown 在移动端的位置适配 */
  .el-dropdown-menu {
    position: fixed !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    max-width: calc(100vw - 32px) !important;
  }

  .el-dropdown-menu .el-dropdown-menu__item:hover {
    transform: none !important;
  }

  /* el-message / el-notification 适配移动端居中 */
  .el-message {
    min-width: auto !important;
    max-width: calc(100vw - 40px) !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
  }

  .el-notification {
    width: calc(100vw - 32px) !important;
    right: 16px !important;
  }

  /* el-loading 文字大小 */
  .el-loading-text {
    font-size: 14px !important;
  }

  /* 移动端 tooltip 隐藏 (触摸设备无 hover) */
  .el-tooltip__popper {
    display: none !important;
  }
}
