body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

.bg-image {
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    position: relative;
}

.navbar {
    width: 200px;  /* 减小宽度 */
    /* 修改背景颜色透明度为 70% */
    background-color: rgba(51, 51, 51, 0.7);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    text-align: center;  /* 添加文本居中 */
}

.nav-brand {
    color: white;
    padding: 20px;
    font-size: 1.5em;
    text-align: center;
    background-color: #222;
}

.nav-item {
    color: white;
    text-decoration: none;
    padding: 12px 15px;
    display: block;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.nav-item:hover {
    background-color: #444;
    border-left: 4px solid #898989;
    transform: translateX(5px);
}



.nav-item:hover::after {
    transform: translateX(0);
}

.sub-nav {
    display: none;
    background-color: #444;
    transition: all 0.3s ease;
    opacity: 0; /* 初始透明度为 0 */
    transform: translateX(-10px);
}

.nav-item-container:hover .sub-nav {
    display: block;
    opacity: 0.5; /* 保持下拉导航栏透明度为 50% */
    transform: translateX(0);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sub-nav-item {
    color: #ddd;
    text-decoration: none;
    padding: 8px 20px;
    display: block;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.sub-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #555;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: -1;
}

.sub-nav-item:hover::before {
    transform: scaleX(1);
}
a:hover {
    text-decoration: none;
    color: rgb(242, 249, 248);
}

.sub-nav-item:hover {
    background-color: #555;
    color: #fff;
}

/* 调整背景图片样式 */
.bg-image {
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding-left: 220px;  /* 为导航栏留出空间 */
}

#bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持视频的宽高比，同时覆盖整个容器 */
    z-index: -1; /* 确保视频在其他元素下方 */
}
/* 添加返回主页按钮的样式 */
.back-to-home {
    position: fixed;
    right: 20px;
    bottom: 20px;
    padding: 10px 20px;
    background-color: #747475;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.back-to-home:hover {
    background-color: #3e3e3f;
}