* {
    box-sizing: border-box;
}

html{
    width:100%;
    overflow-x:hidden;
}


body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}


header {
    background-color: #007BFF; /* 使用rgba格式的渐变色 */
    color: white;
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    align-items: center; /* 水平居中 */
    justify-content: center; /* 垂直居中 */
    height: auto; /* 自动调整高度 */
    position: relative; /* 设置相对定位 */
    width: 100%; /* 确保header宽度为100% */
    margin-bottom: 10px;
    z-index: 0; /* 确保header在waves之上 */
}

header .logo {
    opacity: 1;
    margin-top: 15px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 10px; /* 添加底部边距 */
}


header .logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.container {
    display: flex;
    flex: 1;
}

#sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(30px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* 添加阴影 */
    border-radius: 10px; /* 添加圆角 */
    transition: width 0.3s ease;
    z-index: 1000;
    position: sticky;
    top: 0;
    bottom: 0;
    height: 100vh;
    padding: 10px; /* 添加内边距 */
    margin: 10px; /* 统一添加外边距 */
    margin-top: 15px;
}


#sidebar.collapsed {
    width: 70px;
}


#toggle-sidebar {
    background-color: transparent; /* 背景改为透明 */
    border: none;
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center; /* 将图标居中 */
    cursor: pointer;
    padding: 0; /* 移除内边距 */
}

#toggle-sidebar .toggle-icon {
    width: 20px; /* 设置图片宽度 */
    height: 20px; /* 设置图片高度 */
}

.main-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-menu li {
    margin-bottom: 5px;
}

.main-menu li a {
    text-decoration: none;
    color: #333;
    font-weight: normal;
    display: flex;
    align-items: center;
    padding: 10px 15px;
    white-space: nowrap;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    position: relative;
    margin: 5px;
    transform-origin: left; /* 设置放大时的原点为左侧 */
}

.main-menu li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0; /* 控制渐变色块的位置 */
    height: 100%;
    width: 0;
    background-color: #007BFF;
    transition: width 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.main-menu li a:hover {
    color: black;
    font-weight: bold;
    transform: scale(1.1);
}

.main-menu li a:hover::before {
    width: 5px;
}

.main-menu li a.active {
    color: black;
    font-weight: bold;
    transform: scale(1.2);
}

.main-menu li a.active::before {
    width: 6px;
    left: -1px; /* 确保选中状态时左侧条始终可见 */
}

.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.main-menu li:hover .submenu,
.main-menu li.expanded .submenu {
    max-height: 1000px;
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 1;
}

.main-menu li a .number {
    display: inline-block;
    width: 30px;
    text-align: center;
}

.main-menu li a .text {
    margin-left: 10px;
    transition: opacity 0.3s ease;
}

/* 子菜单动画效果 */
.submenu-item {
    opacity: 0;
    transform: translateY(10px) scale(0.9);
    transition: opacity 0.5s ease, transform 0.5s ease;
    transition-delay: 0s; /* 初始延迟为0 */
    padding-left: 20px; /* 添加左侧缩进 */
}

.main-menu li:hover .submenu .submenu-item,
.main-menu li.expanded .submenu .submenu-item {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* 逐行延迟显示，使用非线性变化 */
.submenu-item:nth-child(1) {
    transition-delay: 0.1s;
}

.submenu-item:nth-child(2) {
    transition-delay: 0.2s;
}

.submenu-item:nth-child(3) {
    transition-delay: 0.3s;
}

.submenu-item:nth-child(4) {
    transition-delay: 0.4s;
}

.submenu-item:nth-child(5) {
    transition-delay: 0.5s;
}

#sidebar.collapsed .submenu {
    display: none;
}

#sidebar.collapsed .main-menu li a .text {
    display: none;
}

.main-menu li a {
    text-decoration: none;
    color: #333;
    font-weight: normal;
    display: flex;
    align-items: center;
    padding: 10px 15px;
    white-space: nowrap;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    position: relative;
    margin: 5px;
    transform-origin: left; /* 设置放大时的原点为左侧 */
    opacity: 0;
    transform: translateY(20px);
}

.main-menu li a.visible {
    opacity: 1;
    transform: translateY(0);
}

main {
    flex: 1;
    padding: 10px;
    transition: margin-left 0.3s ease;
    margin-left: 0; /* 删除初始左侧边距设置 */
}

section {
    margin-bottom: 20px;
    opacity: 0;
    transition: opacity 1s ease-in;
}

section.fade-in {
    opacity: 1;
}

footer {
    background-color: #007BFF;
    color: white;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    margin-top: auto;
}

h1 {
    color: white;
    font-weight: 600;
    font-size: 45px;
    text-align: center;
}

h2, h3 {
    color: #333;
}

strong {
    font-weight: bold;
    color: #007BFF;
}

.bold-text {
    font-weight: bold;
    color: #007BFF;
}


.card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(30px);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 0px;
    margin-top:5px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.card.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.card:hover {
    transform: translateY(-5px); /* 鼠标悬停时上浮5px */
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15); /* 可选：增加阴影以增强浮起效果 */
}


.waves {
    position: relative;
    width: 100vw; /* 设置为视口宽度 */
    height: 100px; /* 设置波浪的高度 */
    bottom: -10px;
    left: 0;
    overflow: hidden; /* 防止内容溢出 */
    min-height: 100px;
    max-height: 150px;
    margin: 0; /* 确保没有外部边距影响宽度 */
}

.parallax > use {
    animation: move-forever 25s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
}

.parallax > use:nth-child(1) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.parallax > use:nth-child(2) {
    animation-delay: -3s;
    animation-duration: 10s;
}

.parallax > use:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 13s;
}

.parallax > use:nth-child(4) {
    animation-delay: -5s;
    animation-duration: 20s;
}

@keyframes move-forever {
    0% {
        transform: translate3d(-90px, 0, 0);
    }
    100% {
        transform: translate3d(85px, 0, 0);
    }
}


/* 响应式设计 */

@media (max-width: 768px) {
    #sidebar {
        width: 50px;
    }

    main {
        margin-left: 50px;
    }

    #sidebar.collapsed .main-menu li a .text {
        display: none;
    }
    .content-wrapper {
        padding: 5px;
    }

    .card {
        margin: 5px;
    }
    .waves {
        height: 40px;
        min-height: 40px;
    }
}

