/* 基础样式 */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #121212;
    color: #e0e0e0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
header {
    background-color: #1a1a1a;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

nav {
    display: flex;
    text-align: center;
}

nav .logo {
    margin-right: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

nav .logo a {
    color: inherit;
    text-decoration: none;
}

nav .logo img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    vertical-align: middle;
}

nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
}

nav ul li {
    margin-right: 20px;
}

nav ul li a {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: bold;
}

nav ul li a:hover {
    color: #ffffff;
}

/* 轮播样式 */
.carousel {
    position: relative;
    margin: 30px 0;
}

.carousel-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

.carousel-slide {
    flex: 0 0 195px;
    scroll-snap-align: start;
    padding: 0 10px;
    /*height: 220px;*/
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 热点游戏区域 */
.hot-games-section {
    margin: 40px 0;
}

.hot-games-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #ffffff;
}

.hot-games {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.hot-game-card-container {
    flex: 0 0 calc(50% - 10px);
    max-width: calc(50% - 10px);
    margin-bottom: 20px;
}

.hot-game-card {
    background-color: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.hot-game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.hot-game-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.hot-game-info {
    padding: 15px;
}

.hot-game-info .game-title {
    font-size: 1.1rem;
    margin: 0 0 8px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hot-game-info .game-rating {
    color: #ffc107;
    margin-bottom: 8px;
}

.hot-game-info .game-popularity {
    color: #aaaaaa;
    font-size: 0.9rem;
    margin: 0;
}

/* 页脚样式 */
footer {
    background-color: #1a1a1a;
    padding: 30px 0;
    margin-top: 40px;
}

.footer-links {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.footer-links a {
    color: #e0e0e0;
    margin: 0 15px;
    text-decoration: none;
}

.footer-links a:hover {
    color: #ffffff;
}

.copyright {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}

ul.pagination{
    display: flex;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 20px;
    list-style: none;
    width: 100%;
    font-size: 18px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav .logo{
        font-size: 0.8rem;
    }
    nav .logo img   {
        margin-right: 5px;

    }
    .carousel-slide {
        flex: 0 0 160px;
        /*height: 200px;*/
    }

    .hot-game-card-container {
        flex: 0 0 calc(50% - 15px);
        max-width: 205px;
    }

    .hot-game-card {
        width: calc(50vw - 25px);
    }

    .hot-game-card img {
        height: 180px;
    }
}

@media (min-width: 1200px) {
    .hot-game-card-container {
        flex: 0 0 calc(33.333% - 14px);
        max-width: calc(33.333% - 14px);
    }
}
.game-card-container{
    width:190px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 0 15px;
    margin: 0;
}
/*!* 游戏卡片行容器 *!*/
.row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between; /* 均匀分布 */
    gap: 10px;
}

.col-6 {
    width: 50%;
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0;
}


.col-sm-6 {
    padding: 0 7.5px;
}

/*!* 游戏卡片列容器 *!*/
/*.col-md-3,*/
/*.col-sm-6 {*/
/*    flex: 0 0 calc(50% - 15px); !* 每行两个，减去间距 *!*/
/*    max-width: calc(50% - 15px);*/
/*    padding: 0 7.5px;*/
/*    margin-bottom: 20px;*/
/*    box-sizing: border-box;*/
/*}*/

/* 游戏卡片容器 */
/*.game-card-container {*/
/*    width: 100%;*/
/*    height: 280px; !* 固定高度 *!*/
/*    display: flex;*/
/*    flex-direction: column;*/
/*}*/

/* 游戏卡片样式 */
.game-card {
    background-color: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%; /* 固定宽度 */
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* 游戏图片区域 */
.game-card img {
    width: 100%;
    height: 160px; /* 固定图片高度 */
    object-fit: cover;
    display: block;
    padding-top: 5px;
}

/* 游戏信息区域 */
.game-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.game-title {
    font-size: 1.1rem;
    margin: 0 0 8px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-rating {
    color: #ffc107;
    margin-bottom: 8px;
}

.game-popularity {
    color: #aaaaaa;
    font-size: 0.9rem;
    margin: 0;
    margin-top: auto; /* 将播放量信息推到底部 */
}

/* 响应式调整 */
@media (max-width: 768px) {

    /*.game-card-container {*/
    /*    height: 260px;*/
    /*}*/

    .col-6 {
        flex: 0 0 calc(50% - 15px); /* 保持每行2个 */
        max-width: calc(50% - 15px);
    }

    .game-card img {
        height: 140px;
    }
}

@media (min-width: 992px) {

    .col-6 {
        flex: 0 0 calc(50% - 15px); /* 保持每行2个 */
        max-width: calc(50% - 15px);
    }
}
