@import url('nav.css');
@import url('footer.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

body {
    background-color: #dedffe;
    
}

body::-webkit-scrollbar {
    display: none;
}
/* 主体布局 */
.main-container {
    display: flex;
    min-height: calc(100vh - 70px);
    overflow-y: scroll; /* 允许滚动 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
} 

/* Chrome/Safari */
.main-container::-webkit-scrollbar {
display: none;
}
/* 侧边栏 */
.sidebar {
    overflow-y: auto;
    /* 关键属性 */
    margin-left: 20px;
    margin-top: 40px;
    border-radius: 12px;
    height: 70%;
    width: 130px;
    padding: 20px;
    background: white;
    position: fixed;
    top: 70px;
    padding-right: 17px;
    /* 补偿滚动条宽度 */
    box-sizing: content-box;
    /* 保持内容宽度 */

    /* 隐藏所有浏览器滚动条 */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.category-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.category-item {
    display: block;
    text-decoration: none;
    color: inherit;
    font-size: 14px;
    padding: 10px;
    margin: 8px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.category-item:hover,
.category-item.active {
    background: #babdff;
    color: var(--primary-color);
}

.swiper {
    width: 100%;
    padding: 20px 0;
    /* 增加滑动区域 */
    margin-top: 30px;
}

.swiper-slide {
    transition: transform 0.3s;
    /* width: 1010px !important; */
    display: flex;
    height: 155px;
    gap: 20px;
}

/* 导航按钮样式 */
.swiper-button-next,
.swiper-button-prev {
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 18px;
    color: #333;
}

/* 修复内容区域定位 */
.content-area {
    margin-left: 180px;
    flex: 1;
    padding: 30px 30px 30px 60px;
    /* 增加右侧 padding */
    height: calc(100vh - 70px);
    /* 限制高度 */
}

.section-title {
    position: static;
    /* 移除 fixed 定位 */
    font-size: 22px;
    margin: 0px 0 15px;
    color: #333;
}

.section-title .more-link{
    font-size: 15px;
    /* 去掉文字下划线 */
    text-decoration: none;
    color: blueviolet;
}

.game-list {
    display: flex;
    /* 改为 flex 布局 */
    gap: 30px;
    padding: 10px 0;
    width: 980px;
    /* 关键：允许横向扩展 */
}

.game-card {
    scroll-snap-align: start;
    width: 150px !important;
    height: 155px !important;;
    aspect-ratio: 1;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: 0.3s;
    flex-shrink: 0;
    text-decoration: none;
    color: black;
}

.game-card:hover {
    transform: translateY(-5px);
}
.game-image {
    width: 150px !important;
    height: 110px !important;
    /* object-fit: cover; */
}

.game-name {
    margin-top: -5px;
    padding: 10px;
    text-align: center;
    font-weight: 500;
    width: 150px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.swiper-button-next {
    margin-right: 15px;
}

.swiper-button-next.swiper-button-disabled {
    opacity: 0.3 !important;
    cursor: not-allowed;
    pointer-events: none !important;
}

.swiper {
    padding: 0%;
    margin-top: 10px;
    margin-bottom: 20px;
}

.svg-icon {
    vertical-align: text-bottom;
}

.section-title .svg-icon {
    vertical-align: bottom;
}

.section-title a {
    text-decoration: none;
    color: inherit;
}

/* 基础移动端样式 */
@media (max-width: 1280px) {
    /* 主容器布局调整 */
    .main-container {
        flex-direction: column;
    }
    
    /* 侧边栏调整为水平滚动 */
    .sidebar {
        margin-right:10px !important;
        width: 90%;
        height: auto;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        padding: 10px 0;
        display: flex;
        flex-direction: row;
        position: relative;
        top: auto;
        left: auto;
        margin-top: 0px !important;
    }
    
    .category-item {
        display: inline-block;
        padding: 8px 12px;
        margin: 0 5px;
        border-radius: 20px;
        white-space: nowrap;
    }
    
    .category-item .svg-icon {
        margin-right: 5px;
    }
    
    /* 内容区域调整 */
    .content-area {
        width: 100%;
        padding: 10px;
        margin: 10px !important
    }
    
    .section-title {
        font-size: 18px;
        margin: 15px 0 10px;
    }
    
    .section-title .svg-icon {
        width: 25px;
        height: 25px;
    }
    
    /* 游戏卡片调整 */
    .game-card {
        width: 100px !important;
        height: 100px !important;
    }
    
    .game-image-container {
        width: 120px;
        height: 120px;
    }
    
    .game-image {
        width: 100px !important;
        height: 100px !important;
    }
    
    .game-name {
        display: none;
    }
    
    /* Swiper导航按钮调整 */
    .swiper-button-next, 
    .swiper-button-prev {
        width: 30px;
        height: 30px;
        background-size: 15px 15px;
    }
    
    .game-list {
        gap: 10px;
    }

    .cate-list {
        display: flex;
        width: 100%;
        flex-wrap: wrap;
    }

    .game-footer {
        height: auto;
    }
}
        