@import url(./normal.css);
@import url(./header.css);
@import url(./footer.css);
@import url(./categories.css);

@font-face {
    font-family: 'Fredoka';
    src: url("../font/Fredoka-VariableFont_wdth\,wght.ttf");
}

[v-cloak] {
    display: none;
}

#app {
    background: linear-gradient(180deg, #4df4ff, #6981fd);
}

:root {
    --radius: 10px;
    --color: #002b50;
    --gray: #f0f5fc;
    --btn-bg: #4df4ff;
}

/* 主体 */
main {
    margin: 0 auto;
}

.list {
    display: grid;
    width: 100%;
    --gap: 16px;
    --size: 95px;
    --gridTemplateColumns: 17;
    grid-template-columns: repeat(var(--gridTemplateColumns), var(--size));
    grid-auto-rows: var(--size);
    grid-auto-columns: var(--size);
    grid-gap: var(--gap);
    margin: 0 auto;
}

.container {
    width: 100%;
    min-height: 100vh;
    padding-top: 20px;
}

.list::before {
    content: '';
    display: block;
    grid-area: 1/1/1 span/1 span;
}

.game {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    box-sizing: border-box;
    transition: transform .6s cubic-bezier(.25, .1, .25, 1);
    border-radius: var(--radius);
    box-shadow: 0px 0px 5px #999999;
}

.game::after {
    content: "";
    opacity: 0;
    position: absolute;
    left: 0px;
    bottom: 0px;
    width: 100%;
    height: 100%;
    background: linear-gradient(transparent 25%, rgba(0, 0, 0, .3) 100%);
    z-index: 4;
    transition: box-shadow .6s cubic-bezier(.25, .1, .25, 1), opacity .3s cubic-bezier(.25, .1, .25, 1);
    box-shadow: rgba(0, 0, 0, .24) 0 6px 12px;
    border-radius: var(--radius);
    contain: strict
}

.game .game-img {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.game .game-img .img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius);
}

.game .game-name {
    position: absolute;
    bottom: 0;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    z-index: 5;
    transition: transform .3s cubic-bezier(.25, .1, .25, 1) .1s, opacity .3s cubic-bezier(.25, .1, .25, 1) .1s;
    transform: translateY(8px);
    opacity: 0;
    line-height: 16px;
    transform: translateY(0);
    width: 100%;
    padding: 6px 0;
}

@media screen and (min-width: 768px) {
    .game:hover {
        transform: scale(1.04255) translateY(-4px);
        transition-duration: .3s;
    }

    .game:hover::after {
        opacity: 1;
        box-shadow: rgba(0, 0, 0, .2) 0 12px 12px;
        background: linear-gradient(transparent 50%, rgba(0, 0, 0, .3) 100%);
    }

    .game:hover .game-name {
        opacity: 1;
        transform: translateY(0);
    }
}


@media screen and (min-width: 1900px) {

    .list,
    .about {
        width: 1872px;
    }
}


@media screen and (min-width: 1700px) and (max-width: 1899px) {

    /* 游戏列表 */
    .list,
    .about {
        width: 1680px;
        --gridTemplateColumns: 15;
        --size: 97px;
    }

    .new-game {
        --columns: 12;
    }
}

@media screen and (min-width: 1520px) and (max-width: 1699px) {

    /* 游戏列表 */
    .list,
    .about {
        width: 1500px;
        --gridTemplateColumns: 13;
        --size: 100px;
        justify-content: center;
    }

    .new-game {
        --columns: 10;
    }
}

@media screen and (min-width: 1330px) and (max-width: 1519px) {

    /* 游戏列表 */
    .list,
    .about {
        width: 1280px;
        --gridTemplateColumns: 11;
        --size: 102px;
        justify-content: center;
    }

    .new-game {
        --columns: 8;
    }
}

@media screen and (min-width: 1280px) and (max-width: 1329px) {

    /* 游戏列表 */
    .list,
    .about {
        width: 1200px;
        --gridTemplateColumns: 10;
        --size: 105px;
        justify-content: center;
    }

    .new-game {
        --columns: 7;
    }
}

@media screen and (min-width: 960px) and (max-width: 1279px) {

    /* 游戏列表 */
    .list,
    .about {
        width: 860px;
        --gridTemplateColumns: 7;
        --size: 109px;
        justify-content: center;
    }

    .new-game {
        --columns: 4;
    }

    .top-game {
        --columns: 2;
    }
}

@media screen and (min-width: 768px) and (max-width: 959px) {

    /* 游戏列表 */
    .list,
    .about {
        width: 668px;
        --gridTemplateColumns: 6;
        --size: 98px;
        justify-content: center;
    }

    .new-game {
        --columns: 3;
    }

    .top-game {
        --columns: 1;
    }
}

.about {
    margin: 0 auto;
    font-family: 'Fredoka';
    margin-top: 50px;
}

.about h2 {
    position: relative;
    color: #fff;
    z-index: 1;
}

.about h2::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgb(241, 187, 255);
    background: linear-gradient(90deg, rgba(241, 187, 255, 1) 52%, rgba(0, 0, 0, 0) 100%);
    z-index: -1;
}

.about h2::after {
    content: '';
    position: absolute;
    top: 0px;
    left: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgb(241, 187, 255);
    background: linear-gradient(90deg, rgba(241, 187, 255, 1) 52%, rgba(0, 0, 0, 0) 100%);
    opacity: .5;
    z-index: -2;
}

.about .article {
    background-color: #fff;
    padding: 30px;
    box-sizing: border-box;
    box-shadow: 0px 0px 10px #c9c9c9;
    border-radius: 10px;
}

.about .article p {
    margin-bottom: 30px;
}

.about .article p:last-child {
    margin: 0;
}


@media screen and (min-width: 640px) and (max-width: 767px) {

    .list,
    .about {
        width: 540px;
        --gridTemplateColumns: 5;
        --size: 96px;
        justify-content: center;
    }

    .new-game {
        --columns: 2;
    }

    .top-game {
        --columns: 1;
        grid-area: 4/var(--columns)/span 3/span 5;
    }
}

@media screen and (max-width: 639px) {
    .container {
        padding-top: 75px;
    }

    .list,
    .about {
        width: 300px;
        --gridTemplateColumns: 3;
        --size: 93px;
        --gap: 10px;
        justify-content: center;
    }

    .list::before {
        grid-area: 1/1/1 span/1 span;
    }

    .game .game-name {
        display: none;
    }

    .new-game,
    .top-game {
        display: none;
    }
}