/*  {
    scroll-behavior: smooth;
} */

/* 修改header样式，使其悬浮在顶部，带圆角和白色背景 */
header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    height: 60px;
    width: 60%;
    /* max-width: calc(100vw - 40px); */
    padding: 10px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 6;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* navbar元素样式 */
header .logo {
    color: #474747;
    font-weight: 700;
    text-decoration: none;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 20px;
    white-space: nowrap;
}

p{
    text-decoration: none;
    padding: 6px 17px;
    color: #474747;
}

#navMenu {
    margin: 5px;
    justify-content: flex-end;
}

.delimiter{
    text-decoration: none;
    color: #474747;
}

header ul {
    display: flex;
    justify-content: center;
    align-items: center;
}

header ul li {
    list-style: none;
}

header ul li a {
    text-decoration: none;
    color: #474747;
    padding: 8px 5px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

/* 悬浮显示非选中模糊 */
header ul:hover li {
    opacity: 0.5;
    filter: blur(2px);
}

header ul li:hover {
    opacity: 1;
    filter: blur(0px);
    text-decoration: underline;
}

header.scrolled .logo,
header.scrolled ul li a,
header:hover .logo,
header:hover ul li a {
    color: var(--font-color);
}

/* 添加按钮样式 */
header .toggle-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--background-color);
    font-size: 1em;
}

/*
 屏幕自适应
*/
@media (max-width: 1000px) {
    header {
        width: 80%;
        /* backdrop-filter: blur(10px); */
    }

    header .logo {
        margin-left: 50px;
        font-size: 0.5em;
    }
    #navMenu {
        margin: 0px;
        margin-top: 5px;
    }

    .show-menu {
        max-height: 500px;
        opacity: 1;
        visibility: visible;
        z-index: 6;
    }

    header .toggle-btn {
        display: block;
        color: var(--font-color);
    }

    /* .navMenu-bg{
        background-image: var(--background-filter); 
        background-color: var(--background-color); 
        background-size: 100px;
        background-color: var(--background-color);
        opacity: 0.2;
        backdrop-filter: blur(10px);
        z-index: 100;
    } */

    header ul {
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        max-height: 0;
        border-radius: 30px;
        opacity: 0;
        overflow: hidden;
        visibility: hidden;
        background-color: rgba(255, 255, 255, 0.8);
        text-shadow: 1px 1px 10px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(5px);
        transition: all 0.4s ease;
    }

    header ul li {
        margin-left: 0;
        /* 垂直居中 */
        display: flex;
        height: 45px;
    }

    .delimiter {
        display: none;
    }

}