@font-face {
    font-family: 'Merienda-Regular';
    src: url(./font/Merienda-Regular.ttf);
}

:root {
    --nav-bg-color: #222;
    --nav-text-color: #fff;
    --nav-menu-letter-spacing: 1px;
    --nav-text-hover-color: rgb(8, 198, 251);
}

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

html {
    /* 这是设置了字体大小，既 1rem = 16px */
    font-size: 16px;
}

body {
    height: 100vh;
}

/* 页面滚动条不显示 */
::-webkit-scrollbar {
    width: 0;
}

/* 导航栏(正经导航栏部分 + 下拉菜单部分) */
.container .nav {
    width: 100%;
    height: 3.75rem;
    background-color: var(--nav-bg-color);
    position: fixed;
    top: 0;
}

/* 导航栏内容 */
.container .nav .container {
    height: 100%;
    padding: 0 2.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 导航栏左侧 */
.nav .nav-left .title {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--nav-text-color);
    user-select: none;
    letter-spacing: var(--nav-menu-letter-spacing);
}

/* 导航栏右侧菜单 */
.nav .nav-right {
    display: none;
}

.nav-right .first li {
    transition: all .2s ease-in-out;
}

.nav-right .first li:hover {
    color: var(--nav-text-hover-color);
}

/*
    导航栏右侧
     默认不显示、当浏览器最小宽度达到768px时显示
*/
@media(min-width: 768px) {
    .nav .nav-right {
        display: block;
    }

    .nav .nav-right .first {
        display: flex;
        justify-content: center;
        align-items: center;
        list-style: none;
    }
    
    .nav-right .first li {
        color: var(--nav-text-color);
        font-size: 1rem;
        margin: 0 1rem;
        user-select: none;
        cursor: pointer;
        letter-spacing: var(--nav-menu-letter-spacing);
    }
}

/*
    面包按钮
    默认显示，当浏览器最小宽度达到768px时隐藏
*/
.nav .bread-btn {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

.nav .bread-btn .icon-menu2 {
    color: #fff;
    font-size: 1.375rem;
    transition: all .2s ease-in-out;
}

.nav .bread-btn:hover .icon-menu2 {
    color: var(--nav-text-hover-color);
}

@media(min-width: 768px) {
    .nav .bread-btn {
        display: none;
    }
}

/* 下拉菜单 */
.drop {
    visibility: hidden;
    opacity: 0;
    transition: all .3s ease-in-out;
}

.drop .drop-menu {
    list-style: none;
    border-top: 1px solid rgba(255, 255, 255, .02);
}

.drop .drop-menu li {
    color: var(--nav-text-color);
    background-color: var(--nav-bg-color);
    padding: 0.75rem 2.25rem;
    user-select: none;
    cursor: pointer;
    letter-spacing: var(--nav-menu-letter-spacing);
    transition: all .2s ease-in-out;
}

.drop .drop-menu li:hover {
    background-color: var(--nav-text-hover-color);
    color: #fff;
}

/* 用于控制下拉菜单是否显示 */
.drop-show {
    visibility: visible;
    opacity: 1;
}

/* 页面设置统一高度 */
.page {
    height: 100vh;
}

/*                             首页                               */
.home-page {
    background: url('./image/bg-1.jpg');
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 0 4.375rem;
}

.home-page span {
    color: #fff;
}

.home-page .info {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Merienda-Regular';
    letter-spacing: 0.25rem;
    user-select: none;
}

.home-page .sub-info {
    font-size: 1rem;
    font-family: 'Merienda-Regular';
    letter-spacing: 0.125rem;
    line-height: 2;
    margin-top: 1.5rem;
    user-select: none;
}

/*
     当浏览器视口宽度大于520px小于768px，字体变大一丢丢
*/
@media(min-width: 520px) {
    .home-page .info {
        font-size: 2rem;
    }

    .home-page .sub-info {
        font-size: 1.125rem;
    }
}

/*
     当浏览器视口宽度大于768px，字体变大
*/
@media(min-width: 768px) {
    .home-page .info {
        font-size: 2.625rem;
    }

    .home-page .sub-info {
        font-size: 1.25rem;
    }
}

/*                            名言警句页面                             */
.first-page {
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.first-page .title {
    font-size: 1.25rem;
    font-weight: 900;
    height: 3rem;
    line-height: 1.5;
    user-select: none;
    text-align: center;
}

.first-page .title .icon-geren1 {
    font-size: 1rem;
    margin-right: 0.25rem;
}

/*
    视口宽度小于768px时，标题字体调小
    大于768px时，标题字体调大一丢丢
 */
 @media(min-width: 768px) {
    .first-page .title {
        font-size: 1.5rem;
    }

    .first-page .title .icon-geren1 {
        font-size: 1.125rem;
    }
}

.first-page .sentence-list {
    width: 100%;
    padding: 0 1.875rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

/*
    视口宽度小于768px时，竖着排，
    大于768px时，横着排
 */
@media(min-width: 768px) {
    .first-page .sentence-list {
        flex-direction: row;
        margin-top: 3.75rem;
    }
}

.first-page .sentence-list .item {
    display: flex;
    flex-direction: column;
    margin: 2.5rem 1.875rem;
}

/*
    视口宽度小于768px时，不设置item的宽度高度，
    大于768px时，设置固定宽高
 */
@media(min-width: 768px) {
    .first-page .sentence-list .item {
        width: 20rem;
        height: 18.75rem;
        margin: 0 2.25rem;
    }
}

.sentence-list .item .author {
    text-align: center;
    font-size: 1rem;
    font-weight: 900;
}

.sentence-list .item .words {
    font-size: 0.875rem;
    margin-top: 1rem;
    line-height: 1.5;
    color: #8e8a8a;
    text-align: center;
}

/*                             yao叔追星页面                           */
.second-page {
    background-color: #f7f7f7;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    padding: 0 1.25rem;
    overflow: auto;
    height: max-content;
    min-height: 100vh;
}

.second-page .box {
    width: 20rem;
    height: 28.75rem;
    border-radius: 0.375rem;
    overflow: hidden;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    margin: 2.25rem 0;
}

.box .img {
    height: 23.75rem;
}

/*
    视口宽度大于728px小于960时，一行排列两张图片，
 */
 @media(min-width: 728px) {
    .second-page {
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .second-page .box {
        width: 20rem;
        height: 28.75rem;
    }
    
    .box .img {
        height: 23.75rem;
    }
}

/*
    视口宽度大于960px时，四张图片呈一排排列，
    小于768px时，设置固定宽高
 */
@media(min-width: 960px) {
    .second-page {
        align-items: center;
    }
    
    .second-page .box {
        width: 13.75rem;
        height: 22.5rem;
    }
    
    .box .img {
        height: 17.5rem;
    }
}

.box .img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.box .comment {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.box .comment .name {
    font-size: 1rem;
    font-family: 'Merienda-Regular';
    color: #000;
}

.box .comment .job {
    font-size: 0.875rem;
    font-family: 'Merienda-Regular';
    color: #968f8f;
    margin-top: 0.5rem;
}

