@import url("https://fonts.googleapis.com/css2?family=Bitter:wght@400;500;600&display=swap");

html {
  color: #333333;
  background: #ffffff;
  scroll-behavior: smooth;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* 将 'Bitter' 放在最前面，并调整 fallback */
  font-family: 'Bitter', /* 新增的主字体 */
               /* 保留一些西文衬线 fallback，以防 Bitter 加载失败 */
               Georgia, /* 常用的衬线 fallback */
               Times, 'Times New Roman', /* 更多衬线 fallback */
               /* 然后是原来的中日韩字体 */
               'Microsoft YaHei',
               'PingFang SC',
               'Hiragino Sans GB',
               /* 最后通用衬线字体 */
               serif;
  overflow-y: overlay;
}

html[transition] {
  transition: all 500ms ease;
}

body {
  max-width: 680px;
  padding: 0 14px;
  margin: 0 auto;
  /* 可以在这里为 body 设置一个默认的 font-weight (如果需要，例如 400) */
  /* font-weight: 400; */
}

* {
  -webkit-tap-highlight-color: transparent;
}

ol,
ul {
  list-style: none;
}

p,
h1,
h2,
h3,
h4,
h5,
ul,
ol,
li,
blockquote {
  padding: 0;
  margin: 0;
}

/* 可以为标题设置不同的字重 */
h1, h2, h3 {
  font-weight: 600; /* 使用 Bitter 的 600 字重 */
}
h4, h5 {
  font-weight: 500; /* 使用 Bitter 的 500 字重 */
}

a {
  color: inherit;
  text-decoration: none;
}

input,
select,
textarea {
  font-family: inherit; /* 输入框通常继承 body/html 字体 */
  outline: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: none;
}

pre,
code {
  /* 为代码块和行内代码设置等宽字体，不使用 Bitter */
  font-family: 'Cascadia Code', Consolas, 'Courier New', Courier, monospace;
}

input:-webkit-autofill {
  /* 自动填充的文本颜色 */
  -webkit-text-fill-color: #333333 !important;
  /* -webkit-text-fill-color: var(--text-color) !important; */

  /* 方式1：使用内阴影覆盖自动填充的背景色 */
  /* box-shadow: 0 0 0 1000px #ffffff inset !important; */

  /* 方式2：通过延迟一个月，取消自动填充的背景色 */
  -webkit-transition: background-color 2592000s ease-in-out 0s;
  transition: background-color 2592000s ease-in-out 0s;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
  background-color: transparent;
}

::-webkit-scrollbar-thumb {
  border-radius: 2px;
  background-color: #999999;
}

::selection {
  background-color: #4a4a4a;
  color: #f9f9f9;
}

.hide {
  display: none !important;
}

.hover-underline {
  position: relative;
}

.hover-underline:after {
  content: '';
  position: absolute;
  width: 100%;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: #333333;
  visibility: hidden;
  transform: scaleX(0);
  transition: transform 200ms ease-in-out;
}

.hover-underline:hover:after {
  visibility: visible;
  transform: scaleX(1);
}

.header {
  padding: 40px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header .logo {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  margin-right: 10px;
  -webkit-user-drag: none;
  box-shadow: 0 0 6px 1px rgba(0, 0, 0, 0.18);
  background-image: url(../img/logo.jpg);
  background-size: cover;
}

.header .menu {
  margin-right: -9px;
  text-align: right;
  user-select: none;
}

.header .menu a {
  display: inline-block;
  font-size: 18px;
  margin: 4px 9px;
  white-space: nowrap;
  user-select: auto;
}

.footer {
  padding: 15px 0;
  font-size: 14px;
}

.footer a {
  text-decoration: underline;
  color: #000000;
  padding: 0 4px;
  white-space: nowrap;
}

.footer-btn {
  position: fixed;
  z-index: 99;
  width: 32px;
  height: 32px;
  cursor: pointer;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
}

.footer-btn i {
  font-size: 22px;
  background-color: #ffffff;
}

.footer-btn.theme-toggler {
  right: 16px;
  bottom: 64px;
}

.footer-btn.to-top {
  right: 16px;
  bottom: -50px;
  transition: bottom 200ms ease-in-out;
}

.footer-btn.to-top.show {
  bottom: 16px;
}

.svg-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  mask-size: 100% 100%;
  -webkit-mask-size: 100% 100%;
  background-color: #000000;
}

.icon-loading {
  mask-image: url('../img/icon-loading.svg');
  -webkit-mask-image: url('../img/icon-loading.svg');
}

.icon-theme-dark {
  mask-image: url('../img/icon-theme-dark.svg');
  -webkit-mask-image: url('../img/icon-theme-dark.svg');
}

.icon-theme-light {
  mask-image: url('../img/icon-theme-light.svg');
  -webkit-mask-image: url('../img/icon-theme-light.svg');
}

.icon-arrow-top {
  mask-image: url('../img/icon-arrow-top.svg');
  -webkit-mask-image: url('../img/icon-arrow-top.svg');
}

@media screen and (max-width: 560px) {
  .header {
    padding: 35px 0 20px 0;
    justify-content: flex-start;
  }
  .header .menu {
    margin-right: -2px;
    text-align: left;
  }
  .header .menu a {
    margin: 2px 5px;
    font-size: 15px;
  }
}