body {
  margin: 0;
  padding: 0;
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: var(--text1);
  scroll-behavior: smooth;
}

:root {
  --text1: Source Han Serif CN VF;
  --text2: Maple Mono CN ExtraBold;
  --background-color: #eceff3;
  --text-color: #737373;
  --title-color: #535353;
  --header-color: #ffffff;
  --theme-transition-duration: 0.3s;
  --theme-transition-timing-function: ease;
  --shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
}

[data-theme="dark"] {
  --background-color: #18191e;
  --text-color: #636363;
  --header-color: #1f2025;
  --title-color: #858585;
  --shadow: rgba(255, 255, 255, 0.05) 0px 6px 24px 0px, rgba(255, 255, 255, 0.08) 0px 0px 0px .5px;
}

* {
  transition: background-color var(--theme-transition-duration) var(--theme-transition-timing-function),
    color var(--theme-transition-duration) var(--theme-transition-timing-function),
    border-color var(--theme-transition-duration) var(--theme-transition-timing-function),
    fill var(--theme-transition-duration) var(--theme-transition-timing-function),
    stroke var(--theme-transition-duration) var(--theme-transition-timing-function);
}

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

/* 整个滚动条 */
::-webkit-scrollbar {
  width: 4px;
}

/* 滚动条的轨道（背景） */
::-webkit-scrollbar-track {
  background: transparent;
}

/* 滚动条的滑块（可拖动的部分） */
::-webkit-scrollbar-thumb {
  background: var(--text-color);
  border-radius: 2px;
}

/* 当鼠标悬停在滑块上时 */
::-webkit-scrollbar-thumb:hover {
  background: #555;
}

::-webkit-scrollbar-corner {
  display: none;
}


.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: transparent;
  padding: 20px clamp(25px, 18vw, 62px);
  box-sizing: border-box;
  transition: all .3s ease;
  color: var(--title-color);
}

.header.scrolled {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 0 clamp(15px, 18vw, 62px);
  background-color: var(--header-color);
  border-bottom: 2px solid var(--background-color);
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  font-family: var(--text2);
}

.header img {
  width: 50px;
  height: 50px;
}

.header-middle {
  display: block;
  text-align: center;
  margin-right: 140px;
}

#date {
  letter-spacing: 1px;
  font-family: var(--text2);
  margin-bottom: 10px;
}

.yy {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--text2);
  color: var(--text-color);
}

.header-right {
  position: relative;
  display: flex;
  justify-content: right;
  z-index: 100;
}

.fh {
  --f: 1.4;
  transform: scale(var(--f));
  transition: 0.5s ease;
  display: inline-block;
  cursor: pointer;
}

.fh:hover {
  scale: 1.1;
}

.menu {
  visibility: hidden;
  position: absolute;
  text-align: center;
  background-color: var(--header-color);
  width: 60px;
  border-radius: 2px;
  letter-spacing: 1px;
  top: 35px;
  font-size: clamp(8px, 3vw, 10px);
  border: 1px solid var(--text-color);
  cursor: pointer;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.5s ease;
}


.menu div {
  margin: 5px;
  border-bottom: .1px solid var(--text-color);
}

.menu div:hover {
  opacity: 0.5;
}

.header-right:hover .menu {
  visibility: visible;
  transform: scale(1.4);
  opacity: 1;
}

.rsbody {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  width: 95vw;
  margin: 0 auto;
}

.box {
  background-color: var(--header-color);
  width: max(18vw, 300px);
  height: clamp(260px, 60vh, 400px);
  max-width: 90vw;
  border-radius: 20px;
  margin-bottom: clamp(20px, 5vh, 30px);
  box-sizing: border-box;
  padding: 20px;
}

.box-top {
  display: flex;
  width: 100%;
  font-size: clamp(8px, 3vw, 18px);
  margin-bottom: 1vh;
  letter-spacing: 1px;
  font-family: var(--text2);
  color: var(--title-color);
  justify-content: space-between;
}

.update-time {
  font-size: .7rem;
}

.box-body {
  height: 92%;
  text-align: left;
  font-size: .98rem;
  box-sizing: border-box;
  overflow-y: auto;
}

.box-body::-webkit-scrollbar {
  display: none;
}

.box-body:hover::-webkit-scrollbar {
  display: block;
}

.box-body::-webkit-scrollbar-color {
  background: var(--title-color);
}

.box-body li {
  margin-bottom: 0.5em;
}

.box-body a {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  max-width: 85%;
  vertical-align: bottom;
  color: var(--title-color);
  background: linear-gradient(to right, #1f589f, #1f589f) no-repeat;
  background-size: 0 2px;
  background-position: left bottom;
  transition: background-size 1s ease;
}

.box-body a:hover {
  background-size: 100% 2px;
  color: inherit;
}

.bottom {
  display: none;
  position: fixed;
  width: 100vw;
  height: 8vh;
  overflow-x: auto;
  padding: 0;
  gap: 0;
  justify-content: flex-start;
  align-items: center;
  bottom: 0;
  background-color: var(--background-color);
  -webkit-overflow-scrolling: touch;
}

.bottom svg {
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  max-width: 30px;
  max-height: 30px;
  position: relative;
  display: inline-block;
}

.bottom svg::before {
  content: "";
  position: absolute;
  width: 19vw;
  height: 100%;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: -1;
}

.active {
  background-color: rgba(150, 150, 150, 0.3);
  border-radius: 50%;
  padding: 5px;
  transition: all 0.3s ease;
}

.box:hover {
  transition: .5s;
  box-shadow: var(--shadow);
}

@keyframes boxup {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.box.animate-slide-up {
  animation-name: boxup;
  animation-duration: 0.6s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
  opacity: 0;
}

@media (max-width: 768px) {
  .header {
    width: 100vw;
    height: 7vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
  }

  .header img {
    width: 30px;
    height: 30px;
  }

  .header-left {
    width: auto;
    padding-left: 10px;
    font-size: 10px;
  }

  .header-right {
    width: auto;
    padding-right: 10px;
  }

  .header-middle {
    display: none;
  }

  .header-right:hover .menu {
    transform: scale(1.2);
  }

  .rsbody {
    width: 100vw;
    background-color: var(--header-color)
  }

  .box {
    width: 100vw;
    height: 85vh;
    border-radius: 0;
    margin: 0;
    padding: 20px 0;
  }

  .box:hover {
    box-shadow: 0 0 0 0;
  }

  .box-top {
    font-size: 1.2em;
    text-align: center;
  }


  .bottom {
    display: flex;
    position: fixed;
    bottom: 0;
    z-index: 999;
    background-color: var(--box-color);
    height: 7vh;
    width: 100vw;
    overflow-x: auto;
    align-items: center;
    justify-content: flex-start;
  }

  .bottom::-webkit-scrollbar {
    height: 4px
  }


  .icon {
    width: 19vw;
    height: 100%;
    min-width: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
  }

  .box-body {
    border-radius: 0;
  }

  .box-body a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 91%;
  }

  .box-body ul,
  .box-body ol {
    margin-bottom: 5px;
  }

  .bottom svg {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    max-width: 30px;
    max-height: 30px;
    margin: 0 calc((19vw - 30px) / 2);
  }
}


.box-body ul,
.box-body ol,
.box-body li {
  list-style: none;
  padding-left: 0;
  margin-top: 0;
  margin-bottom: 0;
  white-space: nowrap;
}

.index-1 {
  color: #cc3939;
  font-size: 0.9rem;
}

.index-2 {
  color: #de6b30;
  font-size: 0.9rem;
}

.index-3 {
  color: #cc984f;
  font-size: 0.9rem;
}