body {
  margin: 0;
  overflow-x: hidden;
  visibility: hidden;
}

.nav-test {
  margin-top: 5px;
  font-size: 15px;
  color: black;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.nav-link img {
  margin-bottom: 5px;
  width: 30px;
  height: 30px;
}

/* 左侧导航栏 */
#left-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 3%;
  height: 100%;
  background-color: #6d94c5;
  border-top-left-radius: 15px;
  border-bottom-left-radius: 15px;
  transition: transform 0.3s ease;
  z-index: 1050;
}

/* 主iframe */
#mainFrame {
  position: relative;
  top: 40px;
  left: 0px;
  width: 100%;
  /* height: 960px; */
  border: none;
}

#mainContent {
  display: none;
  /* 初始隐藏 */
  width: 100%;
  min-height: 100vh;
  /* 至少占满整个视口 */
  box-sizing: border-box;
  overflow: visible;
  /* 禁止内部独立滚动条 */
}

/* 底部栏 */
#footer {
  width: 100%;
  background-color: #6e6d6d;
  color: #fff;
  padding: 20px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  letter-spacing: 0.3px;
  margin-top: 32px;
}

.footer-content {
  width: 90%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.footer-left p {
  margin: 0;
  font-size: 14px;
  color: #ddd;
}

.footer-left .brand {
  color: #fed16a;
  font-weight: 600;
}

.footer-right a {
  color: #fed16a;
  text-decoration: none;
  margin-left: 18px;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-right a:hover {
  color: #fff;
}

/* 汉堡菜单按钮 */
#menuToggle {
  background: none;
  border: none;
  color: black;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}

#menuToggle:focus {
  outline: none;
}

/* 顶部栏固定 */
.navbar-row {
  transition: top 0.4s ease, opacity 0.4s ease;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1100;
  background-color: #fffcfb;
  height: 40px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  background: #fff;
}

.navbar-row.hide {
  top: -60px;
  opacity: 0;
}

.navbar-row.show {
  top: 0;
  opacity: 1;
}

.username {
  margin-right: 10px;
  font-size: 15px;
  font-weight: bold;
  color: #000000;
}

.avatarPreview {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  margin-right: 2px;
  border: 3px solid white;
}

/* 顶部导航整体容器 */
#computer {
  display: flex;
  /* justify-content: center; */
  align-items: center;
  gap: 40px;
  /* 每个菜单间距 */
}

/* 顶部菜单项 */
.top-nav {
  color: #000000;
  font-size: 17px;
  text-decoration: none;
  position: relative;
  padding: 5px 0;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
}

/* 悬停变色 */
.top-nav:hover {
  color: #4d2d8c;
}

/* 当前选中项高亮底线 */
.top-nav::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background-color: #4d2d8c;
  transition: width 0.3s ease;
}

/* 鼠标悬停显示底线动画 */
.top-nav:hover::after {
  width: 100%;
}
.top-nav.active {
  color: #4d2d8c;
  font-weight: bold;
}

#phone {
  display: none;
}

#computer .nav-icon {
  width: 22px;
  height: 22px;
  vertical-align: middle;
  margin-right: 6px;
  filter: brightness(1) invert(0);
  /* 让白色图标在深色背景中清晰 */
  transition: filter 0.3s ease;
}
#phoneOnly {
  display: flex;
}
#computerOnly {
  display: none;
}

/* 头图的导航栏透明度处理 */
.navbar-row.navbar-transparent {
    background: rgba(255, 255, 255, 0);
    backdrop-filter: blur(7px);
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar-row.navbar-solid {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: none;
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
}


@media (min-width: 768px) {
  #phoneOnly {
    display: none !important;
  }
  #computerOnly {
    display: flex !important;
  }

  /* 外层容器 */
  .avatar-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  /* 头像样式 */
  .avatar-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
  }

  .avatar-img:hover {
    transform: scale(1.05);
  }

  /* 悬浮菜单 */
  .avatar-menu {
    position: absolute;
    top: 40px;
    right: -10px;

    width: 160px;
    background: #ffffff;
    padding: 10px 0;
    border-radius: 12px;

    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);

    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.25s ease;
    z-index: 999;
  }

  /* Hover 控制显示 */
  .avatar-wrap:hover .avatar-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  /* 菜单项 */
  .menu-item {
    padding: 10px 15px;
    font-size: 15px;
    color: #333;
    display: block;
    text-decoration: none;
    cursor: pointer;
  }

  .menu-item:hover {
    background: #f2f2f2;
  }

  /* 用户名 */
  .menu-username {
    padding: 5px 15px 10px 15px;
    font-weight: 700;
    font-size: 16px;
  }

  /* 分割线 */
  .menu-divider {
    height: 1px;
    background: #eee;
    margin: 5px 0;
  }

  /* 登出颜色 */
  .logout {
    color: #e74c3c;
  }

  .logout:hover {
    background: rgba(231, 76, 60, 0.15);
  }
  /* 登入颜色 */
  .logout {
    color: #1ea297;
  }

  .logout:hover {
    background: rgba(11, 110, 143, 0.15);
  }
}

/* 默认在移动端隐藏 */
@media (max-width: 768px) {
  #computerOnly {
    display: none !important;
  }

  #left-nav {
    display: block;
    /* 必须启用，否则根本看不到 */
    transform: translateX(-100%);
    width: 60px;
    /* 合理的宽度，原来的3%太窄 */
    background-color: #ededed;
    transition: transform 0.3s ease;
    border-bottom: 2px solid #d3d3d3;
  }

  #left-nav.active {
    transform: translateX(0);
  }

  #left-nav.active {
    transform: translateX(0);
  }

  #overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1040;
    display: none;
  }

  #overlay.show {
    display: block;
  }

  /* 顶部头像与用户名调整 */
  .col-md-3 {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .username {
    white-space: nowrap;
    margin-left: -45px !important;
    font-size: 15px;
  }

  .avatarPreview {
    width: 40px;
    height: 40px;
    margin: 0 8px;
    border: 2px solid white;
  }

  .col-md-4 p {
    font-size: 24px;
    margin-left: 20px;
  }

  #mainFrame {
    left: 0px;
    width: 100%;
    border: none;
  }

  #footer {
    margin-top: 35px;
    margin-left: 0px;
    /* position: relative; */
    left: 0;
    width: 100%;
    height: 45px;
    background-color: #6e6d6d;
    color: #222020;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #phone {
    display: block;
  }

  #computer {
    display: none;
  }
}
