/* * {
  margin: 0;
  padding: 0;
} */

/* body {
  background: url(Think.jpeg);
  background-size: cover;
  height: 100vh;
  width: 100%;
} */

header {
  display: flex;
  align-items: center;
  justify-content: space-around;

  background-color: #00000000;
  backdrop-filter: blur(5px);

  height: 68px;

  position: sticky;
  top: 0px;

  border-bottom: 2px solid #00000053;
}

.logo {
  /* background-color: w; */
  color: black;
  font-family: "server-handwrite";
}

h1.logo a {
  /* display: block; */
  font-family: inherit;
  color: inherit; /* 继承父级白色 */
  text-decoration: none; /* 去掉下划线 */
  font-size: inherit; /* 继承父级字号（h1默认大小） */
  /* 若需要整块区域可点击，可加：display: block; */
}

.nav a {
  color: #000000;
  text-decoration: none;

  font-size: 18px;
  font-weight: 600;

  padding: 8px 16px;

  transition: 300ms;
  border-radius: 99px;
}

.nav a:hover {
  color: white;
  background-color: #00000053;
}

.user-form-group a {
  text-decoration: none;
  color: #000000;

  font-size: 18px;
  font-weight: 600;
}

/* transition属性应该写在原类上, 
如果写在hover上会导致只有进入的时候有动画, 离开的时候没有*/
.signup {
  color: white;
  background-color: #00000046;

  border-color: #ffffff7f;
  border-style: solid;
  border-width: 2px;

  padding: 8px 16px;
  margin-left: 16px;

  border-radius: 99px;

  transition: 300ms;
}
.signup:hover {
  color: #ffffff;
  background: #000000;
}

.nav .logo {
  display: none;
}

#check {
  display: none;
}

.user-form-group label {
  display: none;
}

/* display: none; */
@media (max-width: 768px) {
  .nav {
    position: absolute;
    /* left: 0; */
    left: -100%;
    top: 0;
    display: flex;
    flex-direction: column;

    background-color: #faf9f5ee;
    height: 100vh;
    width: 50%;

    padding: 0 20px;
    /* margin: 10px; */
    row-gap: 0;

    box-shadow: 10px 0px 10px #00000066;
    transition: 500ms;
  }

  .nav a {
    text-align: center; /* 新增：文字居中 */
    /* 如果想保留原本的左右内边距，无需额外改动 */
  }

  .nav .logo {
    text-align: center;

    margin-top: 12.75px;

    display: block;
  }

  .nav .logo a {
    padding: 0;
  }

  .divider {
    background-color: #00000040;
    width: 100%;
    height: 2px;

    margin: 12.75px 0 16px 0;
  }

  .nav a + a {
    margin-top: 16px;
  }

  .user-form-group {
    display: flex;
    align-items: center;
  }

  .signup {
    margin-right: 16px;
  }

  .menu {
    color: #00000099;
    font-size: 40px;
    cursor: pointer;
  }

  #check:checked ~ .user-form-group .menu {
    display: none;
  }

  .close-menu {
    font-size: 40px;
    color: #00000099;
    cursor: pointer;
  }

  .user-form-group .close-menu {
    display: none;
  }

  #check:checked ~ .user-form-group .close-menu {
    display: block;
  }

  #check:checked ~ .nav {
    left: 0;
  }

  /* remenber!!! */
  .user-form-group label {
    display: flex; /* 或 display: block; */
    align-items: center; /* 保持垂直居中 */
  }
}
