/* 基本设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置字体和背景颜色 */
body {
  min-width: 920px;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  display: flex;
}

/* 边栏 */
.sidebar {
  position: fixed;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  color: rgb(0, 0, 0);
  left: 0;
  top: 0;
  height: 100vh;
  width: 200px;
  padding: 60px 20px 20px 20px;
  gap: 20px;
  transition: transform 0.3s ease-in-out;
  z-index: 1000;
}

/* logo部分 */
.logo a{
  display: flex;
  justify-content: center;
}

/* logo图片样式 */
.logo img {
  width: 40%;
  height: auto;
}

/* 导航栏背景和内边距 */
nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 横向排列菜单项 */
.nav a {
      color: rgb(0, 0, 0);
      text-decoration: none;
      font-size: 1.2em;
      font-weight: 500;
      transition: transform 0.3s ease;
      display: inline-block;
      text-align: center;
}

.hamburger {
      display: none;
      position: fixed;
      top: 20px;
      left: 20px;
      color:#1a1a1a;
      border: none;
      background: none;
      font-size: 30px;
      z-index: 1100;
      cursor: pointer;
    }

    .overlay {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background: rgba(0, 0, 0, 0.4);
      z-index: 900;
    }

    .content {
      margin-left: 200px;
      padding: 40px;
      flex-grow: 1;
    }

    .header {
      display: flex;
      align-items: center;
      padding: 20px;
      white-space: nowrap;
    }

    /* 鼠标悬停效果（仅支持悬停的设备） */
@media (hover: hover) and (pointer: fine) {
  nav a:hover {
    transform: scale(1.2);
    transform-origin: center;
  }
}

@media (max-width: 768px) {
  
  .sidebar {
        transform: translateX(-100%);
      }
      .sidebar.active {
        transform: translateX(0);
      }
      .hamburger {
        display: block;
      }
      .overlay.active {
        display: block;
      }
      .content {
        margin-left: 0;
        padding: 60px 20px 20px;
      }
    }
