/* 这个文件里面放4个页面公共的一些样式，比如背景、导航栏等 */

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

html, body {
    /* 和父元素的一样高，body 的父亲是 html，html 的父亲是浏览器窗口 */
    height: 100%;
    /* 页面背景 */
    background-image: url(../image/background.jpg);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
} 

/* 导航栏 */
.nav {
    width: 100%;
    height: 50px;
    background-color: rgba(50, 50, 50, 0.2);
    color: #fff;
    display: flex;
    justify-content: start;
    align-items: center;
}

/* 导航栏中的 log */
.nav img {
    width: 40px;
    height: 40px;
    margin-left: 30px;
    margin-right: 10px;
}

/* 导航栏中的标题 */
.nav .title {
    width: 120px;
}

/* 导航栏中的占位符 */
.nav .spacer {
    height: 40px;
    width: calc(100% - 370px);
}

/* 导航栏中的链接 */
.nav a {
    width: 60px;
    margin: 20px;
    text-decoration: none;
    color: white;
}

/* 版心的样式 */
.container {
    height: calc(100% - 50px);
    width: 1000px;
    margin: 0 auto;
    /* 为了让版心里面的子元素能够以左右布局的方式显示，使用 flex 布局 */
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 左侧区域样式 */
.container .container-left {
    height: 100%;
    width: 200px;
}

/* 右侧区域样式 */
.container .container-right {
    height: 100%;
    width: 795px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 20px;
}

/* 用户信息卡片，也会在多个页面中用到 */
.card {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 30px;
}

/* 用户头像 */
.card img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
}

/* 用户名 */
.card h3 {
    text-align: center;
    padding: 10px 0;
}

/* 其它信息 */
.card a {
    /* a 标签是行内元素，设置尺寸、边距都可能失效，要转成块级元素 */
    display: block;
    text-decoration: none;
    text-align: center;
    color: grey;
    padding: 3px;
}

.card .counter {
    display: flex;
    justify-content: space-around;
    font-size: 15px;
    padding-top: 5px;
}