/**
 * Free Mini Games - Category Button Fix
 * Ensures category buttons align properly with page content
 * 2024-04-02
 */

/* 分类导航样式 - 与截图完全一致 */
.categories-nav {
    background-color: #222;
    border-bottom: none;
    padding: 0;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

/* 去除导航底部的渐变线，避免视觉上的不对齐 */
.categories-nav::after {
    display: none;
}

/* 确保容器宽度一致且没有额外边距 */
.container,
.categories-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* 移除左边距，确保完全贴合左侧 */
.categories-list {
    display: flex;
    padding: 0;
    margin: 0;
    flex-wrap: nowrap;
    align-items: center;
    list-style: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.categories-list::-webkit-scrollbar {
    display: none;
}

/* 调整按钮间距 */
.categories-list li {
    margin: 0;
}

/* 按钮样式优化 */
.categories-list button {
    padding: 10px 18px;
    background-color: transparent;
    color: #fff;
    border: none;
    border-radius: 0;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: background-color 0.2s;
    text-align: center;
    box-shadow: none;
    position: relative;
    white-space: nowrap;
}

.categories-list button:hover {
    background-color: #333;
    transform: none;
    box-shadow: none;
}

.categories-list button.active {
    background-color: #0078D7;
    color: #fff;
    box-shadow: none;
    font-weight: normal;
}

/* 修复容器对齐问题 */
.categories-nav .container {
    display: flex;
    justify-content: flex-start;
    padding: 0;
}

/* 确保各个内容区域使用相同的容器宽度 */
.site-header .container,
.game-section .container,
.categories-nav .container {
    width: 100%;
    max-width: 1200px;
    padding-left: 15px;
    padding-right: 15px;
}

/* 修复导航包装区域的填充和对齐 */
.categories-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0;
    width: 100%;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .categories-list button {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    .categories-nav .container {
        justify-content: flex-start;
    }
    
    .categories-list li {
        margin: 0 4px;
    }
    
    .site-header .container,
    .game-section .container,
    .categories-nav .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

@media (max-width: 576px) {
    .categories-list button {
        padding: 7px 12px;
        font-size: 12px;
    }
    
    .container,
    .categories-wrapper {
        padding: 0 10px;
    }
    
    .categories-list li {
        margin: 0 3px;
    }
} 