
  /* 字体和全局重置样式 */
  * {
   margin: 0;
   padding: 0;
   box-sizing: border-box;
   list-style: none;
   text-decoration: none;
  }

  body {
   margin: 0;
   padding-top: 80px;
   padding-bottom: 50px;
   overflow-x: hidden;
   max-width: 100%;
   min-width: 100%;
   -webkit-user-drag: none;
   -webkit-user-select: none;
   -moz-user-select: none;
   -ms-user-select: none;
   user-select: none;
   -webkit-touch-callout: none;
  }

  /* 导航栏样式 */
  .nav {
   width: 400px;
   height: 50px;
   position: fixed;
   top: 0;
   box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
   border-radius: 10px;
   background-color: #fff;
   left: 50%;
   transform: translateX(-50%);
   z-index: 1000;
  }

  .nav ul {
   width: 100%;
   height: 100%;
   display: flex;
   align-items: center;
   justify-content: center;
   position: relative;
  }

  .nav ul::before {
   content: ''; /* 确保 content 属性设置为空 */
   position: absolute;
   left: 50%;
   top: 10px;
   bottom: 10px;
   width: 1px;
   background-color: #000;
   transform: translateX(-50%);
  }

  .nav ul .nav-box {
   position: absolute;
   bottom: 5px;
   left: 0;
   width: calc(100% / 2);
   height: 5px;
   border-radius: 2px;
   transition: .5s;
  }

  .nav ul li {
   width: 190px !important; /* 强制设置宽度 */
   height: 20px !important; /* 强制设置高度 */
   text-align: center;
   margin: 0 5px;
   cursor: pointer;
  }

  .nav ul li a {
   color: rgb(70, 100, 180);
   font: 100 18px '优设标题黑';
   display: block;
   width: 100%;
   height: 40px;
   line-height: 40px;
   letter-spacing: 0;
   padding: 0 8px;
   transition: all 0.3s;
  }

  .nav ul li.active .nav-box {
   display: none;
  }

  .nav ul li:nth-child(1):hover ~ .nav-box,
  .nav ul li.active:nth-child(1) ~ .nav-box {
   left: calc(100% / 2 * 0);
   background-color: #8da1f8;
  }

  .nav ul li:nth-child(2):hover ~ .nav-box,
  .nav ul li.active:nth-child(2) ~ .nav-box {
   left: calc(100% / 2 * 1);
   background-color: #7df88e;
  }

  .nav ul li.active {
   font-weight: bold;
  }