main {
    background: var(--bg);
}

.section-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px;
}

.tab-bar {
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 4px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 28px;
    overflow-x: auto;
    scrollbar-width: none;
}

.tab-bar::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    border: none;
    background: none;
}

.tab-btn.active,
.tab-btn:hover {
    background: var(--primary);
    color: #fff;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px;
}

.game-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: block;
    border: 1px solid var(--border);
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.game-thumb {
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
}

.game-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.game-card:hover .game-thumb img {
    transform: scale(1.06);
}

.game-hover-info {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.2s;
}

.game-card:hover .game-hover-info {
    opacity: 1;
}

.play-btn-round {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
}

.hover-play-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.game-info {
    padding: 10px 12px 12px;
}

.game-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.game-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.game-cat-tag {
    font-size: 11px;
    color: var(--text-muted);
}

.game-rating {
    font-size: 11px;
    color: var(--accent);
    font-weight: 700;
}

.top-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    margin-bottom: 40px;
}

.sidebar-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.sidebar-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-list {
    padding: 8px 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    transition: background 0.15s;
    text-decoration: none;
    cursor: pointer;
}

.sidebar-item:hover {
    background: var(--bg);
}

.sidebar-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--border);
}

.sidebar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-info {
    flex: 1;
    min-width: 0;
}

.sidebar-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-cat {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.sidebar-rank {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-light);
    width: 20px;
    text-align: center;
}

.section-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title .pill {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.see-all {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    transition: opacity 0.2s;
}

.see-all:hover {
    opacity: 0.7;
}

@media (max-width: 1024px) {
    .top-layout {
        grid-template-columns: 1fr;
    }

    .sidebar-card {
        display: none;
    }
}
