* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

header {
    background-color: white;
    color: black;
    border-bottom: 1px solid #e0e0e0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem; /* 调整左右内边距 */
    max-width: 100%; /* 调整导航栏的最大宽度 */
    margin: auto;
}

.logo img {
    height: 30px; /* 调整LOGO图片的高度 */
}

.nav-links {
    list-style: none;
    display: flex;
    flex-grow: 1;
    justify-content: flex-end;
}

.nav-links li {
    margin-left: 2rem; /* 调整间距 */
}

.nav-links a {
    color: black;
    text-decoration: none;
    font-size: 1.2rem; /* 调整字体大小 */
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a:hover,
.nav-links a:focus,
.nav-links a.active {
    color: #2f426c; /* 调整颜色 */
}

.nav-links a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #2f426c; /* 调整颜色 */
    transition: width 0.3s;
    position: absolute;
    bottom: -2px;
    left: 0;
}

.nav-links a:hover::after,
.nav-links a:focus::after,
.nav-links a.active::after {
    width: 100%;
}

.menu-icon {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        text-align: center;
        margin: 1rem 0;
    }

    .menu-icon {
        display: block;
    }
}
