/* 通用样式 */
.navbar {
    display: flex;
    justify-content: space-between; /* 左右对齐 */
    align-items: center; /* 垂直居中 */
    padding: 10px 20px;
    background-color: #f8f9fa; /* 淡灰色背景 */
    border-bottom: 1px solid #ddd; /* 底部边框 */
    flex-wrap: wrap; /* 在窄屏下自动换行 */
}

.navbar-left {
    display: flex;
    align-items: center;
    flex: 1; /* 左侧占据剩余空间 */
}

.navbar-right {
    display: flex;
    gap: 10px; /* 按钮间距 */
}

.navbar-user {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.navbar-btn {
    padding: 5px 15px;
    font-size: 14px;
    color: #fff;
    background-color: #7e7e7e;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.navbar-btn:hover {
    background-color: #959595;
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column; /* 在窄屏设备上垂直排列 */
        align-items: flex-start;
    }

    .navbar-right {
        justify-content: flex-end;
        width: 100%; /* 占据整个宽度 */
    }

    .navbar-btn {
        width: 100%; /* 按钮占满行 */
        text-align: center;
    }
}
