main {
    width: var(--all-width);
    margin: 0 auto 50px;
    display: flex;
    flex-direction: column;
}

main .big-box {
    display: flex;
    flex-wrap: wrap;
}

.list {
    margin-bottom: 20px;
    padding: 6px;
    background-color: #fff;
    border-radius: 6px;
    flex: 1;
}

main h2 {
    font-size: 17px;
    font-weight: normal;
    position: relative;
    border-radius: 6px;
    padding: 10px 0 10px 40px;
    text-shadow: 1px 1px #005890;
    margin-bottom: 10px;
}

main h2::before {
    content: '';
    width: 40px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    border-radius: 6px;
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: center;
}

#hot h2 {
    color: #fff;
    background-color: #009cff;
    margin-bottom: 0;
}

#hot h2::before {
    background-image: url(../images/hot-game.png);
}

.hot-games {
    width: 100%;
    overflow-x: hidden;
    padding: 10px;
}

.hot-box {
    display: flex;
    animation: hotLoop 10s infinite ease;
}

.hot-games::-webkit-scrollbar {
    display: none;
}

.hot-game:first-child {
    margin-left: 0;
}

.hot-game:last-child {
    margin-right: 0;
}

.hot-game {
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 10px;
    color: #000;
    flex: 0 0 auto;
    margin: 0 10px;
}

.hot-game:hover {
    border: 2px solid #006e98;
    box-shadow: 0 0 10px #006e9850;
}

.hot-game .img-box {
    width: 70%;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #ccc;
}

.hot-game .img-box::before {
    content: '';
    padding-top: 100%;
    display: block;
}

.hot-name {
    width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
}

.hot-type,
.game-type {
    width: 90%;
    padding: 4px;
    border-radius: 6px;
    background-color: #f6f6f6;
    font-size: 12px;
    display: flex;
    gap: 5px;
    overflow: hidden;
}

.hot-type span:first-child,
.game-type span:first-child {
    color: #61bc17;
}

.hot-type span:last-child,
.game-type span:last-child {
    color: #1e73a9;
}

#new h2,
#recommend h2 {
    background-color: #db3030;
    color: #fff;
}

#all h2 {
    background: rgb(228, 96, 42);
    color: #fff;
}

#new h2::before,
#recommend h2::before,
#all h2::before {
    background-image: url(../images/love.png);
}

.big-box {
    row-gap: 20px;
}

.game-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 6px;
    row-gap: 6px;
}

.game-box:hover {
    background-color: #fff8de;
    border-color: #c25117;
    box-shadow: 0 0 5px 0 #ffbb42;
}

.game-box:hover .game-name {
    color: #743e2b;
}

.game-box .img-box {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
}

.game-box .img-box::before {
    content: '';
    padding-top: 100%;
    display: block;
}

.game-name {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #000;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.game-type {
    padding: 4px 8px;
    width: 100%;
}

.more {
    background-color: rgb(122, 79, 40);
    color: #fff;
    display: block;
    margin: 20px auto;
    width: 100%;
    padding: 15px 0;
    font-size: 18px;
    border-radius: 30px;
    overflow: hidden;
}

@media (min-width:800px) {
    .hot-game {
        width: 14.3%;
        padding: 10px;
        background-color: #fff;
        border: 2px solid gray;
    }

    .game-box {
        width: calc((100% - 100px)/6);
        margin-right: 20px;
    }

    .game-box:nth-of-type(6n) {
        margin-right: 0;
    }
}

@media (max-width:799px) {
    .big-box {
        row-gap: 10px;
    }

    .hot-game {
        width: 50%;
        padding: 10px;
        background-color: #fff;
        border: 2px solid gray;
    }

    .game-box {
        width: calc((100% - 10px)/2);
        margin-right: 10px;
    }

    .game-box:nth-of-type(2n) {
        margin-right: 0;
    }

    .hot-box {
        animation: loop 15s infinite linear;
    }
}

@keyframes loop {

    0% {
        transform: translateX(0);
    }

    10% {
        transform: translateX(0);
    }

    90% {
        transform: translateX(-452%);
    }

    100% {
        transform: translateX(-452%);
    }
}

@keyframes hotLoop {

    0%,
    100% {
        transform: translateX(var(--lefscr-one));
    }

    20% {
        transform: translateX(var(--lefscr-one));
    }

    25% {
        transform: translateX(var(--lefscr-two));
    }

    45% {
        transform: translateX(var(--lefscr-two));
    }

    50% {
        transform: translateX(var(--lefscr-three));
    }

    70% {
        transform: translateX(var(--lefscr-three));
    }

    75% {
        transform: translateX(var(--lefscr-four));
    }

    95% {
        transform: translateX(var(--lefscr-four));
    }
}