@font-face {
    font-family: 'MiSans VF';
    src: url('../font/MiSans_VF.ttf') format('truetype');
    font-display: swap;
    /* 优化字体加载时的显示 */
}

@font-face {
    font-family: 'Google Sans';
    src: url('../font/GoogleSans-Regular.ttf') format('truetype');
    font-display: swap;
    /* 优化字体加载时的显示 */
}

* {
    font-family: 'MiSans VF', sans-serif;
    margin: 0;
    padding: 0;
    transition: 0.5s linear;
    -moz-transition: 0.5s linear;
    /* for compatible with apple webview */
    -webkit-transition: 0.5s linear;
    -o-transition: 0.5s linear;
    scroll-behavior: smooth;
}

/* 2: 选择器命名规范  */
/* 背景 */
#bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    animation: suofang2 cubic-bezier(0.215, 0.610, 0.355, 1) 0.4s;
}

#bg:before,
#bg:after {
    content: '';
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

/* 给壁纸加一层浅黑色遮罩 */
#bg:before {
    background-image: linear-gradient(to top, rgba(19, 21, 25, 0.2), rgba(19, 21, 25, 0.2));
    background-repeat: no-repeat;
    z-index: 2;
}

#bg:after {
    /* 1:资源文件路径设置正确 */
    background: url("../images/mc.jpg") no-repeat;
    background-size: cover;
    z-index: 1;
    background-position: top;
    /* 壁纸缩放
    transform: scale(1.02); */
}

/* end of 背景 */

/* 导航栏 */
.menu {
    display: flex;
    background: rgba(255, 255, 255, 0.33);
    padding: 10px;
    justify-content: center;
    text-align: center;
    align-items: center;
    backdrop-filter: saturate(130%) blur(0.333rem);
    /* for compatible with apple webview */
    -webkit-backdrop-filter: saturate(130%) blur(0.333rem);
    position: relative;
    /* 11:通过盒子阴影增加页面美观度 */
    box-shadow: 0px 1px 20px rgba(0, 0, 0, 0.1);
    animation: suofang2 cubic-bezier(0.215, 0.610, 0.355, 1) 0.4s;
}

.menu-item {
    margin: 1px 10px;
    padding: 10px;
    border-radius: 5px;
    /* 13:为导航条增加过渡效果 */
    transition: background-color 0.5s ease;
}

.menu-item:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

.menu li {
    list-style-type: none;
}

.menu a {
    text-decoration: none;
    color: #ffffff;
    transition: color 0.5s;
}

.menu-item a:hover {
    color: aqua;
}

.menu-item a:active {
    color: beige;
}

/* 6:绝对定位 */
.header {
    position: absolute;
    right: 1.5em;
    display: flex;
    height: 40px;
    width: 40px;
    background-repeat: no-repeat;
}

.header img {
    height: 100%;
    width: 100%;
    border-radius: 50%;
    transition: all 0.5s;
}

#header_img:hover {
    transform: scale(1.1);
}

.icons {
    position: absolute;
    left: 1.5em;
    display: flex;
    background-repeat: no-repeat;
    color: white;
    transition: all 0.5s;
    cursor: pointer;
}

.icons:hover {
    transform: rotate(0.25turn);
    color: aqua;
}

#now {
    color: rgb(255, 203, 107);
}

/* end of 导航栏 */
.welcome {
    text-align: center;
    margin-top: 40px;
    width: 100%;
}

.welcome h1 {
    font-family: 'Google Sans', sans-serif;
    color: rgb(95, 209, 247);
    overflow: hidden;
    animation: suofang 0.5s;
}

.container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    height: auto;
    width: auto;
    /* 自适应间隔 */
    justify-content: center;
    /* 居中对齐 */
    /* 3:样式有适当的注释 */
}

.info {
    position: fixed;
    bottom: 0%;
    width: 100%;
    text-align: center;
}

.info p {
    margin: 0 0 2rem 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    letter-spacing: 0.05rem;
    animation: fadeInUp 0.5s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes suofang {
    from {
        font-size: 1.8rem;
    }

    50% {
        font-size: 2.1em;
    }

    to {
        font-size: 2em;
    }
}

@keyframes suofang2 {
    from {
        scale: 0.9;
    }

    to {
        scale: 1.0;
    }
}

@media screen and (max-width: 475px) {
    .welcome h1 {
        font-size: 1.8rem;
        animation: none;
    }

    .menu-item a {
        font-size: 0.95rem;
    }

    .header {
        height: 30px;
        width: 30px;
    }
}

@media screen and (max-width:320px) {
    .welcome h1 {
        font-size: 1.8rem;
        animation: none;
    }

    .menu-item a {
        font-size: 0.8rem;
        display: none;
    }

    .menu-item {
        margin: 5px 10px;
    }

}