/* 正方形纯图片游戏卡片 */
.game-square-img {
    display: inline-block;
    position: relative;
    width: 12%;
    margin: 0.25%;
    overflow: hidden;
    cursor: pointer;
    border-radius: 15px;
    box-sizing: border-box;
    box-shadow: 0 3px 5px 3px rgba(0, 0, 0, .2);
}

.game-square-img  .game-icon{
    width: 100%; /* 图片宽度占满父元素 */
    height: 100%; /* 图片高度占满父元素 */
    object-fit: cover; /* 图片尺寸不足时按比例放大填充 */
    top: 0;
    left: 0;
    border-radius: 15px;
}
.game-square-img  .game-title{
    font-size: .8rem;
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2px;
    text-align: center;
    color: white;
    background-color: rgba(0, 0, 0, 0.25);
    overflow: hidden;
    white-space: nowrap;
}


/* 正方形图片，但是鼠标移动上去会有变化 */
.game-animation-square {
    position: relative;
    width: 12%;
    margin: 0.25%;
    aspect-ratio: 1;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 3px 5px 3px rgba(0, 0, 0, .2);
    -webkit-transition: -webkit-transform 1s ease;
    transition: -webkit-transform 1s ease;
    transition: transform 1s ease;
    -webkit-transform: 1s ease;
    text-align: center;
    cursor: pointer;
}
.game-animation-square .game-icon{
    width: 100%; /* 图片宽度占满父元素 */
    height: 100%; /* 图片高度占满父元素 */
    object-fit: cover; /* 图片尺寸不足时按比例放大填充 */
    top: 0;
    left: 0;
    border-radius: 15px;
}
.game-animation-square .game-icon:hover{
    transform: scale(1.2) translateY(-2px);
}
.game-animation-square .game-title{
    font-size: 0.8rem;
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2px;
    text-align: center;
    color: white;
    background-color: rgba(0, 0, 0, 0.25);
    overflow: hidden;
    white-space: nowrap;
}


/* 长方形游戏卡片 */
.game-rectangle-img {
    position: relative;
    width: 24%;
    margin: 0.5%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 3px 5px 3px rgba(0, 0, 0, .2);
    -webkit-transition: -webkit-transform 1s ease;
    transition: -webkit-transform 1s ease;
    transition: transform 1s ease;
    -webkit-transform: 1s ease;
    text-align: center;
    cursor: pointer;
}
.game-rectangle-img .game-icon{
    width: 100%;
    aspect-ratio: 1.7;
    background-position: center;
    background-size: cover;
}
.game-rectangle-img .game-title{
    padding: 1px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-decoration: none;
    color: #6b4698;
}


/* 长方形游戏卡片 */
.game-rectangle-card {
    width: 32%;
    margin: 0.667%;
    background-color: #fff;
    box-shadow: 0 0 8px rgba(0, 0, 0, .2);
    -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, .2);
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: flex;
    border-radius: 15px;
    overflow: hidden;
}
.game-rectangle-card .game-icon{
    width: 50%;
    min-width: 50%;
    aspect-ratio: 1.7;
    background-position: center;
    background-size: cover;
}
.game-rectangle-card .game-info{
    padding: 5px;
    width: 50%;
    background-color: #f8f0ff;
}
.game-rectangle-card .game-name{
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #6b4698;
}
.game-rectangle-card .game-desc{
    color: var(--game-desc-color);
    font-size: .8rem;
    margin-top: .5rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

@media screen and (max-width: 476px){
    .game-list{
        gap: 2px;
    }
    .game-square-img  .block-title{
        font-size: 1.2rem;
    }
    .game-square-img{
        width: calc((100% - 28px)/4);
    }
    .game-animation-square{
        width: calc((100% - 16px)/4);
    }
    .game-rectangle-img{
        width: 48%;
    }
    .game-rectangle-card{
        width: 99%;
    }
}