.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #4b2c20;
    padding: 10px 20px;
    margin: 0;
    position: fixed;
    top: 0;
    width: 1670px; /* 设置固定宽度 */
    z-index: 9999;
    box-sizing: border-box;
    left: 0; /* 将导航栏固定在页面最左边 */
    right: 0; /* 将导航栏固定在页面最右边 */
    margin-left: auto;
    margin-right: auto; /* 使用自动边距来实现居中 */
}

.navbar .logo {
    flex: 0 1 auto;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.navbar .logo img {
    height: 40px;
    width: auto;
}

.nav-links {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-end;
    flex: 1;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    padding: 10px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background-color: #f4a261;
    border-radius: 5px;
}

body {
    margin-top: 70px;
    font-family: Arial, sans-serif;
    overflow-x: hidden; /* 防止页面水平滚动 */
}

/* 禁用响应式布局，确保导航栏在任何屏幕尺寸下都不会改变布局 */
@media (max-width: 768px) {
    .navbar {
        width: 1670px; /* 保持固定宽度 */
        left: 0; /* 设置左边界为0 */
        right: 0; /* 设置右边界为0 */
        margin-left: auto;
        margin-right: auto; /* 通过自动边距居中 */
    }

    .nav-links {
        flex-direction: row;
        width: auto;
    }

    .nav-links li {
        margin: 0 15px;
    }
}
