@import url(./normal.css);
@import url(./header.css);
@import url(./footer.css);
@import url(./categories.css);

[v-cloak] {
    display: none;
}

#app {
    background: linear-gradient(220.55deg, #FFC328 0%, #E20000 100%);
}

:root {
    --radius: 10px;
    --color: #002b50;
    --gray: #f0f5fc;
    --btn-bg: #7678ED;
}

/* 主体 */
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/2 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: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    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 {
        width: 1872px;
    }
}


@media screen and (min-width: 1700px) and (max-width: 1899px) {
    /* 游戏列表 */
    .list {
        width: 1680px;
        --gridTemplateColumns: 15;
        --size: 97px;
    }
}

@media screen and (min-width: 1520px) and (max-width: 1699px) {
    /* 游戏列表 */
    .list {
        width: 1500px;
        --gridTemplateColumns: 13;
        --size: 100px;
        justify-content: center;
    }
}

@media screen and (min-width: 1330px) and (max-width: 1519px) {
    /* 游戏列表 */
    .list {
        width: 1280px;
        --gridTemplateColumns: 11;
        --size: 102px;
        justify-content: center;
    }
}

@media screen and (min-width: 1280px) and (max-width: 1329px) {
    /* 游戏列表 */
    .list {
        width: 1200px;
        --gridTemplateColumns: 10;
        --size: 105px;
        justify-content: center;
    }
}

@media screen and (min-width: 960px) and (max-width: 1279px) {
    /* 游戏列表 */
    .list {
        width: 860px;
        --gridTemplateColumns: 7;
        --size: 109px;
        justify-content: center;
    }
}

@media screen and (min-width: 768px) and (max-width: 959px) {
    /* 游戏列表 */
    .list {
        width: 668px;
        --gridTemplateColumns: 6;
        --size: 98px;
        justify-content: center;
    }
}


@media screen and (min-width: 640px) and (max-width: 767px) {
    .list {
        width: 540px;
        --gridTemplateColumns: 5;
        --size: 96px;
        justify-content: center;
    }
}

@media screen and (max-width: 639px) {
    .container {
        padding-top: 75px;
    }
    
    .list {
        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;
    }
}