@font-face {
  font-family: "LXGWNeoXiHeiCN";
  src: url("/assets/fonts/LXGWNeoXiHeiScreenCN-subset.woff2");
  font-display: swap;
}
@font-face {
  font-family: "LXGWNeoXiHeiPunct";
  src: url("/assets/fonts/LXGWNeoXiHeiScreenPunct-subset.woff2");
  font-display: swap;
}
@font-face {
  font-family: "LXGWNeoXiHeiJP";
  src: url("/assets/fonts/LXGWNeoXiHeiScreenJP-subset.woff2");
  font-display: swap;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "LXGWNeoXiHeiCN", "LXGWNeoXiHeiPunct", "LXGWNeoXiHeiJP",
    "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Meiryo", "Segoe UI", Arial, sans-serif;
}

header {
  position: fixed;
  top: 0;
  height: 100px;
  width: 100%;
  /* background-color: rgba(233, 233, 233, 0.8); */
  background: #bfbfbf;
  background: linear-gradient(
    180deg,
    rgba(191, 191, 191, 1) 0%,
    rgba(255, 255, 255, 0.12) 100%
  );
  transition: all 0.3s ease-in-out;
  transform: translateY(0);
  opacity: 1;
}

.hidden {
  transform: translateY(-100%);
}

body {
  background: url("/assets/images/desktop.webp") no-repeat 0 0 / cover fixed;
}

#pageTitle {
  text-decoration: none;
  color: rgba(250, 46, 46, 0.545);
}

#pageTitle img {
  width: 341px;
  position: absolute;
  top: 17px;
  left: 7.4%;
}
#pageTitle img {
  transition: filter 0.3s ease;
}

#pageTitle img:hover {
  filter: sepia(30%) saturate(70%) brightness(1.1);
}

nav {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  position: absolute;
  bottom: 0;
  width: 100%;
}
nav a {
  flex: 1;
  max-width: 143px;
  padding: 18px 0;
  text-align: center;
  text-decoration: none;
  font-size: 16px;
  color: #330f0faa;
}
nav a:nth-child(1) {
  background-color: rgba(180, 178, 255, 0.5);
}
nav a:hover:nth-child(1) {
  background-color: rgba(158, 154, 218, 0.5);
}
nav a:nth-child(2) {
  background-color: rgba(224, 158, 255, 0.5);
}
nav a:hover:nth-child(2) {
  background-color: rgba(196, 154, 219, 0.5);
}

nav a:nth-child(3) {
  background-color: rgba(228, 255, 178, 0.5);
}
nav a:hover:nth-child(3) {
  background-color: rgba(204, 228, 160, 0.5);
}

.hamburger {
  width: 23px;
  height: 24px;
  position: absolute;
  top: 18px;
  right: 18px;
  cursor: pointer;
  z-index: 1000;
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: #ea90b7;
  transition: transform 0.3s ease, top 0.3s ease;
}

.hamburger::before {
  top: 3px;
}
.hamburger::after {
  top: 15px;
}

#navToggle:checked + .hamburger::before {
  top: 11px;
  transform: rotate(45deg);
}
#navToggle:checked + .hamburger::after {
  top: 11px;
  transform: rotate(-45deg);
}

.back-to-top {
  position: fixed;
  bottom: -100%;
  right: 20px;
  width: 150px;
  cursor: pointer;
  transition: bottom 0.3s ease, opacity 0.3s ease;
  z-index: 999;
  opacity: 0.8;
}
.back-to-top:hover {
  opacity: 1;
  bottom: 20px;
}

.back-to-top.show {
  bottom: 0px;
}

@media (min-width: 501px) {
  .hamburger {
    display: none;
  }
}

@media screen and (max-width: 500px) {
  body {
    background: url("/assets/images/phone.webp") no-repeat 0 0 / cover fixed;
  }

  #pageTitle img {
    left: 50%;
    transform: translateX(-50%);
  }

  nav {
    position: fixed;
    top: 0;
    right: -250px; /* 初始化时隐藏在右侧 */
    width: 250px;
    height: 100vh;
    background: rgba(253, 175, 192, 0.8);
    flex-direction: column;
    transition: right 0.3s ease;
    padding-top: 80px;
    z-index: 999;
    text-align: center;
    justify-content: flex-start;
  }
  nav a {
    max-width: 100%;
    flex: 0 0;
  }

  #navToggle:checked ~ nav {
    right: 0;
  }

  .hamburger {
    z-index: 1000;
  }

  body {
    transition: transform 0.3s ease;
  }
  .back-to-top {
    width: 100px;
    bottom: -100%;
  }
}
