body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

header {
    background-color: #333;
    color: white;
    padding: 20px;
    text-align: center;
}

nav {
    border-width: 1px;
    border-color: rgb(0, 0, 0);
    border-style: solid;
    background-color: #2a2a2a;
    width: 100%;
}

.uls {
    list-style-type: none;
    margin: 0;
    padding: 0;
    text-align: left;
}

.uls li {
    display: inline-block;
    border-radius: 10px;
}

.uls li a {
    padding: 16px 16px;
    text-decoration: none;
    display: block;
    color: white;
}

.uls li:hover {
    background-color: #555;
}

/* ✅ 新增：下拉菜单样式 */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #2a2a2a;
    /* 和你的 nav 保持一致 */
    min-width: 180px;
    border-radius: 8px;
    z-index: 99;
}

.dropdown-content li {
    display: block;
    border-radius: 0;
    /* 下拉菜单不要圆角冲突 */
}

.dropdown-content li a {
    padding: 12px 16px;
    color: white;
}

/* .dropdown-content li:hover {
    background-color: #555;
} */

/* .dropdown:hover .dropdown-content {
    display: block;
} */

.dropdown-content {
    display: block;
    max-height: 0; /* 用高度动画展开 */
    opacity: 0;
    transform: translateY(5px);
    /* ✅ 删除 overflow: hidden，避免裁掉右侧子菜单 */
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #2a2a2a;
    min-width: 180px;
    border-radius: 8px;
    z-index: 99;
    transition: max-height 0.25s ease-out, opacity 0.25s ease, transform 0.25s ease;
}


.dropdown:hover .dropdown-content {
    max-height: 500px;
    /* 足够大保证能完全展开 */
    opacity: 1;
    transform: translateY(0);
}
section {
    margin: 20px;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
}

footer {
    text-align: center;
    padding: 10px;
    background-color: #333;
    color: white;
}

a {
    color: #1a73e8;
}

a:hover {
    text-decoration: underline;
}

.sub-dropdown {
  position: relative; /* 让子菜单相对 Project 定位 */
}

.sub-dropdown-content {
  position: absolute;
  top: 0;
  left: 100%;
  background-color: #2a2a2a;
  min-width: 180px;
  border-radius: 6px;
  box-shadow: 0px 6px 12px rgba(0,0,0,0.3);

  /* 关键：去掉动画，直接显隐 */
  display: none;
  z-index: 999;
}

.sub-dropdown:hover > .sub-dropdown-content {
  display: block;
}

