/* 顶部：搜索统计 */
.search-results-header {
    position: sticky;
    top: 0;
    z-index: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 61px;
    padding: 0 20px;
    box-sizing: border-box;
    border-bottom: 5px solid #eeeeee;
    background: #ffffff;
}

@media (max-width: 768px) {
    .search-results-header {
        height: 49px;
        padding: 0 15px;
    }
}

.search-results-count {
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-size: 16px;
    color: #283043;
    white-space: nowrap;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .search-results-count {
        font-size: 14px;
    }
}

.search-results-count strong {
    color: #E63946;
}

.search-clear {
    border: none;
    padding: 5px 20px;
    border-radius: 30px;
    background: #1678ff;
    font-size: 14px;
    color: #ffffff;
    cursor: pointer;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .search-clear {
        padding: 5px 15px;
        font-size: 12px;
    }
}

.search-clear:hover {
    background-color: #0d5bbf;
}

/* 内容 */
.category-container {
    display: flex;
    height: 100%;
    overflow: auto;
    background: #ffffff;
}

/* 左侧：纵向分类 */
.category-sidebar {
    display: block;
    width: 200px;
    height: 100%;
    align-self: stretch;
    border-right: 1px solid #eeeeee;
    background: #ffffff;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .category-sidebar {
        width: auto;
    }
}

.category-item {
    padding: 20px;
    border-left: 5px solid transparent;
    font-size: 16px;
    color: #283043;
    cursor: pointer;
}

@media (max-width: 768px) {
    .category-item {
        padding: 15px;
        font-size: 14px;
    }
}

.category-item:hover {
    background: rgba(125, 125, 125, 0.2);
}

.category-item.active {
    border-left: 5px solid #1678ff;
    background: rgba(22, 120, 255, 0.07);
    font-weight: bold;
    color: #1678ff;
}

/* 右侧：正文 */
.category-content {
    flex: 1;
    padding: 20px 20px 0;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .category-content {
        padding: 15px 15px 0;
    }
}

/* 板块介绍 */
.category-card {
    padding: 20px 20px 5.6px;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(22, 120, 255, 0.07);
}

@media (max-width: 768px) {
    .category-card {
        padding: 15px 15px 4.8px;
        margin-bottom: 15px;
    }
}

.category-card-content {
    margin-top: -5.6px;
    font-size: 14px;
    color: #283043;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .category-card-content {
        margin-top: -4.8px;
        font-size: 12px;
    }
}

.category-card p {
    margin-bottom: 8.8px;
}

@media (max-width: 768px) {
    .category-card p {
        margin-bottom: 5.4px;
    }
}

.category-card-content ul {
    margin: -8.8px 0 8.8px 25px;
}

@media (max-width: 768px) {
    .category-card-content ul {
        margin: -6.2px 0 5.4px 20px;
    }
}

.category-card-content li {
    color: #7d7d7d;
}

/* 横向分类 */
.sub-tabs-section {
    margin-left: -20px;
    margin-right: -20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .sub-tabs-section {
        margin-left: -15px;
        margin-right: -15px;
        margin-bottom: 15px;
    }
}

.sub-tabs-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
}

@media (max-width: 768px) {
    .sub-tabs-container {
        gap: 15px;
    }
}

/* 为支持悬停的设备（桌面/非触摸）显示滚动条 */
@media (hover: hover) {
    .sub-tabs-container {
        padding-bottom: 0;
    }

    .sub-tabs-container.has-scrollbar {
        padding-bottom: 5px;
    }

    .sub-tabs-container::-webkit-scrollbar {
        height: 5px;
    }

    .sub-tabs-container::-webkit-scrollbar-track {
        border-radius: 2.5px;
        background: #f1f1f1;
    }

    .sub-tabs-container::-webkit-scrollbar-thumb {
        border-radius: 2.5px;
        background: rgba(125, 125, 125, 0.2);
    }

    .sub-tabs-container::-webkit-scrollbar-thumb:hover {
        background: #7d7d7d;
    }
}

/* 为不支持悬停的设备（移动/触摸）隐藏滚动条 */
@media (hover: none) {
    .sub-tabs-container {
        padding-bottom: 0;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .sub-tabs-container::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }
}

.sub-tag {
    padding: 10px 20px;
    border-radius: 30px;
    background: #f1f1f1;
    font-size: 14px;
    color: #283043;
    cursor: pointer;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .sub-tag {
        padding: 5px 15px;
    }
}

.sub-tag:first-child {
    margin-left: 20px;
}

@media (max-width: 768px) {
    .sub-tag:first-child {
        margin-left: 15px;
    }
}

.sub-tag:last-child {
    margin-right: 20px;
}

@media (max-width: 768px) {
    .sub-tag:last-child {
        margin-right: 15px;
    }
}

.sub-tag:hover {
    background: rgba(125, 125, 125, 0.2);
}

.sub-tag.active {
    background: #1678ff;
    font-weight: bold;
    color: #ffffff;
}

/* 游戏列表 */
.category-panel {
    display: none;
}

.category-panel.active {
    display: block;
}

/* 游戏列表：List */
.games-list {
    overflow: hidden;
}

.game-item {
    display: flex;
    height: auto;
    padding: 15px 15px 10.2px;
    margin-bottom: 20px;
    border-radius: 10px;
    background: #f1f1f1;
}

@media (max-width: 768px) {
    .game-item {
        padding: 15px 15px 11px;
        margin-bottom: 15px;
    }
}

.game-item:hover {
    background: rgba(125, 125, 125, 0.2);
}

.game-item.hidden {
    display: none;
}

.game-img {
    width: 50px;
    height: 50px;
    margin-right: 15px;
    border-radius: 25%;
    object-fit: contain;
    vertical-align: top;
    align-self: flex-start;
}

.game-info {
    flex: 1;
    vertical-align: top;
}

.game-title {
    padding-bottom: 5px;
    margin-bottom: 10.2px;
    border-bottom: 1px solid #cdcdcd;
    font-size: 16px;
    font-weight: bold;
    color: #283043;
}

@media (max-width: 768px) {
    .game-title {
        margin-bottom: 11px;
        font-size: 14px;
    }
}

.game-tags {
    display: flex;
    margin-top: -5.2px;
    margin-bottom: 10.2px;
}

@media (max-width: 768px) {
    .game-tags {
        margin-bottom: 11px;
    }
}

.game-device-card {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 25px;
    height: 25px;
    margin: 0 5px 0 0;
    padding: 0;
    border: 1px solid #1678ff;
    border-radius: 25%;
}

@media (max-width: 768px) {
    .game-device-card {
        width: 16px;
        height: 16px;
    }
}

.game-device-icon {
    width: 15px;
    height: 15px;
    margin: 0;
    padding: 0;
    color: #1678ff;
}

@media (max-width: 768px) {
    .game-device-icon {
        width: 10px;
        height: 10px;
    }
}

.game-pj-card {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 25px;
    height: 25px;
    margin: 0 5px 0 0;
    padding: 0;
    border: 1px solid #7d7d7d;
    border-radius: 25%;
}

@media (max-width: 768px) {
    .game-pj-card {
        width: 16px;
        height: 16px;
    }
}

.game-pj-icon {
    width: 15px;
    height: 15px;
    margin: 0;
    padding: 0;
    color: #7d7d7d;
}

@media (max-width: 768px) {
    .game-pj-icon {
        width: 10px;
        height: 10px;
    }
}

.game-description {
    font-size: 12px;
    color: #7d7d7d;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .game-description {
        font-size: 10px;
    }
}

/* 无匹配结果提示 */
.no-results {
    display: none;
    padding: 40px 20px 60px;
    text-align: center;
}

@media (max-width: 768px) {
    .no-results {
        padding: 45px 15px 60px;
    }
}

.no-results-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 5px;
    margin-left: auto;
    margin-right: auto;
    color: #7d7d7d;
}

.no-results h3 {
    padding-bottom: 5px;
    font-size: 16px;
    color: #7d7d7d;
}

@media (max-width: 768px) {
    .no-results h3 {
        font-size: 14px;
    }
}

.no-results p {
    font-size: 14px;
    color: #b0b2bf;
}

@media (max-width: 768px) {
    .no-results p {
        font-size: 12px;
    }
}